Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

Results 1 to 10 of 10

Thread: When can stop() not actually stop? (AS3)

  1. #1
    3
    posts
    Registered User

    When can stop() not actually stop? (AS3)

    Heres a tough one for you experts. I have a game where occasionally all the stop() actions that I put in the first frame of my movieclips decide to go on strike at the same time. The resullt? a blinking mess. They just keep loopping endlessly ignoring the stop() action on the first frame. The strange thing is that everything else works perfectly. Even gotoAndStop will stop the madness.

    So, i'm wondering what in the world could possibly be causing this. A list of possibilities even is good.

    Many thanks.

  2. #2
    10,202
    posts
    Registered User
    Something else causing all of them to play()?

  3. #3
    3
    posts
    Registered User
    The only action associated with them is gotoAndStop(). I forgot an important detail. They all work fine 99.9% of the time. It is only on hte very rare ocasion that this happens.

  4. #4
    Quote Originally Posted by arby View Post
    The only action associated with them is gotoAndStop(). I forgot an important detail. They all work fine 99.9% of the time. It is only on hte very rare ocasion that this happens.
    come on. you need to figure out what is actually happening that .1 % of the time or be more specific as to how you have things in your game set up. for starters, using code in timelines is generally a bad idea.
    you = function(){
    setEnabled( true );
    live();
    setEnabled( false );
    }

  5. #5
    10,202
    posts
    Registered User
    Quote Originally Posted by therobot View Post
    for starters, using code in timelines is generally a bad idea.
    For starters ? Care to elaborate? For starters, AS3 is difficult enough to grasp IN the timeline. Rather than programming outside of the .fla.

  6. #6
    3
    posts
    Registered User
    There is no error that pops up when it happens. It is happy to just blink away quietly. I have no real way of finding the root problem as I have only ever seen the problem once. Mostly it's discovered by my players.

    The etup is as follows: I have functions declared on one layer of the main timeline, code on the main timeline in different sections of the game and then just the stop code in the movieclips. The movieclips show state or have a cool little flicker effect on one of the frames. I use them along with gotoAndStop() and no other timeline control.

    You say coding on timelines is bad, is there any way that the code in my movieclips could stop working/be ignored?

  7. #7
    Hi,
    Maybe there is no problem at all. Because I once faced the same predicament. The solution was simple probably using the right Flash player. AS3 is supported in Flash 9 player onwards. If you try to open the swf or exe from Flash player 8 which might be happening default you will find the project blinking because the actions are not being processed. Try opening in Flash 9 standalone player or run from within CS3. I hope this might be what might be causing the problem. Anything else and I would like to know too.

  8. #8
    As for your players they might be using Flash plugin 8. Either do a version detection so as to avoid this problem and get your players to download the latest flash or scale your application down to version 8 which I think would be inappropriate considering its already done.

  9. #9
    never use gotoAndPlay(1); if it is already in first frame it does the same as play();

    for frame 1 use gotoAndStop!

    "A human can interpret missing logic but a computer can't." - wkt
    "That goes into the 'too bad' box." - TOdorus
    "This is a three year old thread, there's no reason to post here..." - flyingmonkey456
    "Despite beeing the oposite, they look very similar to me." - SparK

  10. #10
    10,202
    posts
    Registered User
    Quote Originally Posted by SparK_BR View Post
    never use gotoAndPlay(1); if it is already in first frame it does the same as play();

    for frame 1 use gotoAndStop!
    Why not? Is there any like, mathematical conclusion as to why play(); is better (besides it being half a second quicker to type)?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012