A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: It seems as if my stop(); isn't working.

  1. #1
    Senior Member
    Join Date
    Jun 2001
    Location
    Bay Area, CA
    Posts
    170

    It seems as if my stop(); isn't working.

    Ok, on my main timeline, I have 4 total frames. On the third frame, there is a stop(); function. When I test the movie, the movie goes straight to frame 4. Please help!!!

  2. #2
    I have had problems like this before.

    It was my mistake... I thought I had a key frame on frame three but didn't so the actionscript I wrote went to the nearest keyframe. So make sure you have a keyframe on frame 3 in your timeline.

    The other thing you have to watch out for is if the stop() is withing a movie clip. I had a stop() within a movie clip and the movie clip stopped but the parent timeline kept going.

    Other than that, if you say stop() it should stop....

  3. #3
    Senior Member
    Join Date
    Jun 2001
    Location
    Bay Area, CA
    Posts
    170
    The stop is on the main timeline and each frame has a keyframe.

  4. #4
    I wanna see... can you post up what you have so far? Or link me to your .fla file so I can download it and check it out....

  5. #5
    Senior Member
    Join Date
    Jun 2001
    Location
    Bay Area, CA
    Posts
    170
    here. If you remove the fourth frame, it works. But I need that fourth frame to be there. I dunno why the stop isn't stopping the movie.
    Attached Files Attached Files

  6. #6
    Damn, that is hella weird! You have a lot of actionscript running, so I'm guessing it has to do with something in there... I'll keep looking...

  7. #7
    You can always do it like this if you need that fourth frame... but I know it's not what you are looking for. At least it works though.... Temp fix! =)
    Attached Files Attached Files

  8. #8
    No worries I fixed it! =D

  9. #9
    Senior Member
    Join Date
    Jun 2001
    Location
    Bay Area, CA
    Posts
    170
    Originally posted by RUFFyamahaRYDER
    You can always do it like this if you need that fourth frame... but I know it's not what you are looking for. At least it works though.... Temp fix! =)
    Thanks though, but frame 4 needs the majority of those blank.

  10. #10
    This one works with frame 4 blank! I think you wanted it this way. No more temp fix... =D
    Attached Files Attached Files

  11. #11
    Senior Member
    Join Date
    Jun 2001
    Location
    Bay Area, CA
    Posts
    170
    Originally posted by RUFFyamahaRYDER
    This one works with frame 4 blank!
    hmmm...the loading part needs to be gone from frame 3 because its the preloader, but you gave me a few ideas. Thanks! I'll post back if I get it to work. The problem lies in the loader i think.

  12. #12
    Member
    Join Date
    Jun 2003
    Location
    germany
    Posts
    31
    The problem was the preloader code. Don´t really know what the actual problem was but I didn´t bother looking since I´m too lazy Anyways what I´ve done is stretch your loader movie to 100 frames, then I put this code into the second keyframe:

    Code:
    if(_framesloaded >= _totalframes){
    	gotoAndStop(3);
    }else{
    	loadedbytes = this.getBytesLoaded();
    	totalbytes = this.getBytesTotal();
    	percent = math.ceil((loadedbytes/totalbytes)*100);
    	loader.gotoAndStop(percent);
    	gotoAndPlay(1);
    }
    I´ve uploaded the fla so you can have alook at it.

    cheers
    Attached Files Attached Files

  13. #13
    Senior Member
    Join Date
    Jun 2001
    Location
    Bay Area, CA
    Posts
    170
    WOW! Thanks! You solved my preloader problem as well!

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