dcsimg
A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25

Thread: evt.target.name only works once

  1. #21
    Senior Member
    Join Date
    Oct 2005
    Posts
    198
    Well, I guess I need a similar safeguard in the retractStick function--Ideas?

    or maybe a Boolean so that if the animation is retracting to wait until it finishes?

    Thanks,
    ---Yvette

  2. #22
    Senior Member
    Join Date
    Oct 2005
    Posts
    198
    Actually, if I just let it play for a bit--that happens and no errors were thrown-- What happens is the flag just appears and disappears without any tweens --I was incorrect(surprise)before when I said it was just happening while retracting--it happens in both functions--no emerging animation, no retracting animation--just stick and flag and no stick and flag-

    Help?



    Thanks,
    ----Yvette

  3. #23
    Senior Member
    Join Date
    Oct 2005
    Posts
    198
    Hi,

    Quick ?---Do you think that I'd be better served if I just took out that evt.currentTarget statement altogether and just had duplicate functions for each menu item ex:
    Code:
    		function retractStick1(evt:MouseEvent):void
    		{
    			
    			lifering1.splash.gotoAndPlay(2);
    			TweenMax.to(lifering1.cont, .5 ,{x:8.1,y:36.3,ease:Back.easeOut});
    			TweenMax.to(lifering1.stick, .5 ,{x:120.45,y:464,ease:Back.easeOut,onComplete:endSplash1});
    			
    
    		}
    		function retractStick2(evt:MouseEvent):void
    		{
    			
    			lifering2.splash.gotoAndPlay(2);
    			TweenMax.to(lifering2.cont, .5 ,{x:8.1,y:36.3,ease:Back.easeOut});
    			TweenMax.to(lifering2.stick, .5 ,{x:120.45,y:464,ease:Back.easeOut,onComplete:endSplash2});
    			
    
    		}
    etc?

    Thanks,
    ---Yvette

  4. #24
    Senior Member
    Join Date
    Oct 2005
    Posts
    198
    Hi,

    That didnt work--nor did adding a boolean to check if the initial animation was playing and to prevent the others from playing if not--In fact, it just seems to get slower and slower for no apparent reason......though, I never receive an error in this script is causing the Flash player to run slowly mssg
    Is it possible to email you the files for inspection?

    Thanks again,
    ----Yvette
    Last edited by yvillicana; 07-09-2010 at 03:31 AM.

  5. #25
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    Since you're dealing with frame stuff, I assume you're doing this in frame based code in a .fla file. I don't have Flash to open those, so sending the file wouldn't help.

    The progressive slowness would seem to indicate that you are stacking up event listeners. Could you be adding the same listeners multiple times?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center