I have two states when I switch from OFF to A, it resizes properly, but when I change A Back off, it happens without a smooth shape change What am I doing?
This is my code:
& lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; S: VGroup xmlns: fx = "http://ns.adobe.com/mxml/2009" xmlns: S = "library: //ns.adobe.com/flex/spark" xmlns: mx = "library: // Ns.adobe.com/flex/mx"> & Lt; Fx: script & gt; & Lt ;! [CDATA [Safe function but A_ change handler (E: Event): Zero {if (e.target as toggle). Selected) {this.currentState = "A"; } And {this.currentState = "off"; }}]] & Gt; & Lt; / Fx: script & gt; & Lt; S: states & gt; & Lt; S: state name = "closed" /> & Lt; S: state name = "A" /> & Lt; / S: States & gt; & Lt; S: transition & gt; & Lt; S: Infection from STEAT = "OFF" toState = "A" autoReverse = "true" & gt; & Lt; S: parallel period = "300" & gt; & Lt; S: Change the size of the goal = "{content}" height = "{ca.height}" /> & Lt; S: Feed target = "{ca}" /> & lt; / S: parallel & gt; & Lt; / S: Infection & gt; & Lt; S: Infection from STT = "A" TOSTATE = "OFF" AutoRover = "True" & gt; & Lt; S: parallel period = "300" & gt; & Lt; S: Change the size of the goal = "{content}" height = "0" /> & Lt; S: Feed target = "{ca}" /> & lt; / S: parallel & gt; & Lt; / S: Infection & gt; & Lt; / S: Infection & gt; & Lt; S: Group ID = "content" excluded = "off" width = "100%" from the clip and enable crawling = "true" & gt; & Lt; S: group id = "ca" includeIn = "one" width = "100%" & gt; & Lt; S: label FONTSIZE = "70" text = "A" /> & Lt; / S: group & gt; & Lt; / S: Group & gt; & Lt; S: HGroup & gt; & Lt; S: ToggleButton id = "butA" label = "A" change = "but A_ change handler (event)" /> & Lt; / S: HGroup & gt; & Lt; / S: VGroup & gt; Thanks in advance, noon
You should use both These and excluded properties included in the form of AddAction and RemoveAction are processed prior to infection.
& lt; S: Infection & gt; & Lt; S: Infection from STEAT = "OFF" toState = "A" autoReverse = "true" & gt; & Lt; S: Sequence & gt; & Lt; S: AddAction target = "{content}" /> & Lt; S: parallel period = "300" & gt; & Lt; S: Change the size of the goal = "{content}" height = "{ca.height}" /> & Lt; S: Feed target = "{ca}" /> & lt; / S: parallel & gt; & Lt; / S: Sequence & gt; & Lt; / S: Infection & gt; & Lt; S: Infection from STT = "A" TOSTATE = "OFF" AutoRover = "True" & gt; & Lt; S: Sequence & gt; & Lt; S: parallel period = "300" & gt; & Lt; S: Change the size of the goal = "{content}" height = "0" /> & Lt; S: Feed target = "{ca}" /> & lt; / S: parallel & gt; & Lt; S: RemoveAction target = "{content}" /> & Lt; / S: Sequence & gt; & Lt; / S: Infection & gt; & Lt; / S: Infection & gt; & Lt; S: group id = "content" width = "100%" clip and enable crawling = "true" & gt; & Lt; S: group id = "ca" includeIn = "one" width = "100%" & gt; & Lt; S: label FONTSIZE = "70" text = "A" /> & Lt; / S: group & gt; & Lt; / S: Group & gt; Start resizing from those dimensions, which you want to use height, frame and width, so that they really live.
* Note: Using an InInIn = "A" means you also show that the content will be excluded = "Off" property. This means that you will not be able to mix Add / RemoveAction and include / IncludeFrom (to add one idea and delete another).
Comments
Post a Comment