How to make flash display at end of animation

Discussion in 'HTML & Website Design' started by cpsarros, Mar 4, 2009.

  1. #1
    Is there anyway to display the flash file at its completed stage, at the end of its animation.

    I want to be able to display the flash at the top of the page as in the home page but I don't want it to play, I just want it to be there already at its end.

    For example, when I click on Contact Us I don't want the flash to run on that page I just want it to display as if it has already run.
     
    cpsarros, Mar 4, 2009 IP
  2. JoshFizgerts

    JoshFizgerts Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Replace it with a picture?
    IFrames?
    Put all your content on a single page and have the links just change the content, not the actual page. Or make it look even nicer with some jQuery?
     
    JoshFizgerts, Mar 4, 2009 IP
  3. cpsarros

    cpsarros Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    surely there must be a switch in flash that lets you just display from the last frame as if it has already played.
     
    cpsarros, Mar 5, 2009 IP
  4. JoshFizgerts

    JoshFizgerts Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    But if you are linking to a new HTML document which is reloading the swf file, then its goign to start again from the begining.

    But yes there is. on the last frame put a keyframe, open the actions window and type "stop();"
     
    JoshFizgerts, Mar 5, 2009 IP
  5. Vbot

    Vbot Peon

    Messages:
    107
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I don't really know what you're trying to do, but have you try:
    gotoAndStop(10);
    Code (markup):
    Where 10 is the last keyframe. Just put that script in the first keyframe.
     
    Vbot, Mar 5, 2009 IP
  6. JoshFizgerts

    JoshFizgerts Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Remember though, this will not play the start of the animation at all. It will GO TO the 10th keyframe and STOP there. so you'll just see that one frame. If you put stop(); on the last frame, it will play the animation THEN stop and stay there.

    Just to make sure your not confused.
     
    JoshFizgerts, Mar 5, 2009 IP
  7. cpsarros

    cpsarros Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I guess I should clarify things a bit.

    I want one flash file to play on my home page and for every subsequent page I want the exact same flash file but with no playing or loading I just want it to appear and the end, as if it had already played.
     
    cpsarros, Mar 7, 2009 IP
  8. Vbot

    Vbot Peon

    Messages:
    107
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I see what you mean. You can do that by passing variables to flash movie in your embeded code.
    In your home page, you embed your movie like this:
    <script type="text/javascript">
    	var fo = new FlashObject("movie.swf", "movie", "770", "180","9", "#ffffff");
    	fo.addVariable("playMovie", "yes");
    	fo.write();
    </script>
    Code (markup):
    and in other pages that you don't want your movie to play just remove the addVariable line:
    <script type="text/javascript">
    	var fo = new FlashObject("movie.swf", "movie", "770", "180","9", "#ffffff");
    	fo.write();
    </script>
    Code (markup):
    Then in your movie.swf: place this code in the first keyframe.
    if(_root.playMovie != "yes") {
    gotoAndStop(10);
    }
    Code (markup):
    Where 10 is the number of keyframe that you want your movie to stop.
     
    Vbot, Mar 7, 2009 IP
  9. JoshFizgerts

    JoshFizgerts Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thats what I was explaining to you before in my first post.


    Yes, this will work, BUT: if you put the play one on your homepage, it will play everytime someone goes back to your homepage after viewing other pages. If the user doesn't go to your homepage first, then it wont play then and there. And, if its in the middle of the animation when the user goes to another page, it will skip right to the ending (or in this example, the 10th frame).
     
    JoshFizgerts, Mar 7, 2009 IP