what i mean is, is there a way in AS3, or in programming in general(php, js etc) to make an event fire/activate “WHEN” something does something, as oppose to an if/else if / else statements ?
for example, say i want to make an event fire /activate ***ONLY ******when ***a frame label is hit, and thereafter , do something else etc, essentially making it do things one by one down the line according to ***WHEN ***certain objectives are met. is there a “when” type of statement etc that will do this as oppose to if/else if etc???
for example, using the above example, instead of me doing something like this:
xyz.addEventListener(Event.ENTER_FRAME / or INIT , btn);
function btn(e:Event):void{
***if*** ( externalSwf.currentFrameLabel == " label here "){
do something code here.
}
}
is there a way to do it like this:
xyz.addEventListener(Event.ENTER_FRAME / or INIT , btn);
function btn(e:Event):void{
***when*** ( externalSwf.currentFrameLabel == " label here "){
do this.
when (this happens){
do this next
}
}
}
etc…
how can one accomplish that?
reason i ask is because i have a little project im working on (smooth transitions of external swfs code) that is partly working but i cant for the life of me, figure out how to implement a structure like what i have directly above.
hope its not confusing.
any tips ideas etc i gladly appreciate.
thank you.