actionscript 3 - Mouse Event Click Problems -


When you click on the ageImg button (pink image in SDF), it calls the next function, which is to hide everybody It should take other words and words above the age of the stage, but for some reason it becomes empty after one second and the age flash function again produces the whole animation to start from the beginning. I do not know why it loops.

  Import com.greensock.TweenLite; Import com.greensock.TimelineLite; Import com.greensock.plugins *; Import flash.events.MouseEvent; Miscellaneous Ordnance Timeline: Timeline Lights = New Timelines (); Function Init (): Zero {ageFlash (); AgeImg.ageism.visible = false; RacImg.racism.visible false =; HatImg.hate.visible = false; SexImg.sexism.visible = False; } Function Age Flash (): Zero {ageImg.visible = false; AgeImg.buttonMode = true; AgeImg.addEventListener (MouseEvent.CLICK, stopPicLoop); TweenLite.delayedCall (1, racFlash); } Function racFlash (): zero {racImg.visible = false; TweenLite.delayedCall (1, hatFlash); } Function hatFlash (): zero {hatImg.visible = false; TweenLite.delayedCall (1, sexFlash); } Function SexFlash (): Zero {TVLlight DellAid Call (1, Age Flash); AgeImg.visible = true racImg.visible = true; HatImg.visible = true} function stop pixel (Event: mouse Event): zero {switch (event. Type) {case "click": trace (event.type); AgeAni (); break; Case 2: Break; Case 3: Break; }} Function ageAni (): zero {racImg.visible = false; HatImg.visible = false; SexImg.visible = false; AgeImg.visible = true ageImg.ageism.visible = true ageismTimeline.from (ageImg.ageism, .5, {y: stage.stageHeight}); Detection ('ageism'); } in this();    

You have the racFlash method which you ageFlash method otherwise your code will continue on your way to your pleasure. You can use the TweenLite.killDelayedCallsTo method to do this:

  function AgeAni (): zero {racImg.visible = false; HatImg.visible = false; SexImg.visible = false; AgeImg.visible = true ageImg.ageism.visible = trueTweenLite.killDelayedCallsTo (racFlash); // Call Arbitration Kill Delay Terminal. From (Age: Img. Agesam, .5, {Y: Stage. Stage Heights}); Detection ('ageism'); }  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -