SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Guru aamonkey's Avatar
    Join Date
    Sep 2004
    Location
    kansas
    Posts
    953
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    gotoAndStop not working...

    I have a 50 frame animation set up. When I put the command:

    gotoAndStop(50) it PREVIEWS correctly (using Control>test movie) but when I publish it the swf pauses at frame 17 ???

    I've also tried:

    gotoAndStop("endAnimation"); (I have a frame label set up on frame 50) - this previews correctly but the animation plays all the way through when published.

    _root.gotoAndStop(50) - no effect
    _level10.gotoAndStop(50) - no effect

    any ideas?

  2. #2
    SitePoint Evangelist ferrari_chris's Avatar
    Join Date
    Mar 2008
    Location
    NP, New Zealand
    Posts
    576
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your second code snippet wants to be _level0.gotoAndStop(50), not _level10 - but that's not important.

    Try putting another action on the frame that calls the gotoAndStop() to check that it is executing. It'll need to update something on the stage though (like a textbox) as outside of Flash any trace() won't work.

  3. #3
    SitePoint Guru aamonkey's Avatar
    Join Date
    Sep 2004
    Location
    kansas
    Posts
    953
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ferrari_chris View Post
    Your second code snippet wants to be _level0.gotoAndStop(50), not _level10 - but that's not important.
    yeah--typo on my part. I had it right in flash...

    Quote Originally Posted by ferrari_chris View Post
    Try putting another action on the frame that calls the gotoAndStop() to check that it is executing. It'll need to update something on the stage though (like a textbox) as outside of Flash any trace() won't work.
    I had tried that actually--I had a simple if statement like
    Code:
    if (condition met) {
         myTxt.text = 'this animation should STOP';
         gotoAndStop(50);
    } else {
         myTxt.text = 'this animation should PLAY';
    }
    both in the preview and publish file the text says "this animation should STOP", but in the published file the animation still plays.....
    I'm sure this has something to do with my flash incompetence, but I don't know what...

  4. #4
    SitePoint Evangelist ferrari_chris's Avatar
    Join Date
    Mar 2008
    Location
    NP, New Zealand
    Posts
    576
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm. It seems like everything is as it should be, and I can't think of any reason why it wouldn't do what it's supposed to.

    Flash is good like this sometimes...

    Can you post your FLA for me to have a look at, or is that out of the question?


Bookmarks

Posting Permissions

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