A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Just checking...

  1. #1
    Senior Member evolbeagle's Avatar
    Join Date
    Oct 2000
    Location
    Nashville, TN
    Posts
    355
    It wouldn't do me any good to make a preloader in Swish and import it with the load movie function would it? Don't you lose the actions on the imported movie?

  2. #2
    Super Moderator
    Join Date
    Jun 2000
    Posts
    3,512
    I don't see how that would help because the "if frame is loaded" test would need to be performed in KoolMoves and that test is not possible through the GUI at the moment.

    I can see the lack of this action is becoming a problem so I will try to add it for the next release maybe next week.

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    Evol- No they don't loose thier actions I think. Let me double check that one though.

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    I tested it. You don't loose your actions when you use the load movie command.

    Also I am going to write a Javascript preloader script and place it here a little later. You will then have a real preloader since there have been so many questions on this.

  5. #5
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    I haven't tested it yet but this is the header portion of A preloader script.


    <SCRIPT language="JavaScript">
    function preload(){
    var Name = window.document.movie;
    var percent = Name.PercentLoaded();
    if (percent == "100"){Name.GotoFrame(13);Name.Play();}
    }
    </script>

    You must name your change the var Name to window.document. The name of your Movie as it is listed in the object tag

    Also I have set the Movie to start at Frame 13.

    What you are going to do is call the preload function from a repeating animation. Once the animation is completely preloaded it will play.

    Okay I'm gonna go test this script now and post corections as needed.

  6. #6
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    The script works in IE.

    This is what you do

    First Make both your Preloader in Kool Moves and at the end of the preloading animation you need to add 2 actions:

    1. Get URL in the URL box add javascript: preload(); with nothing as the target

    2. Goto Key Frame 1 (or whatever frame you want to start the new frame on) and play.

    Finish your Movie. Then export as HTML and SWF.

    You put my preloader script into the HTML's Head section. Adjust it so that it starts up at the correct Frame (count both Key and twens in your movie +1 to find what to set your GotoFrame level at).

    That's it happy preloading.


  7. #7
    Senior Member evolbeagle's Avatar
    Join Date
    Oct 2000
    Location
    Nashville, TN
    Posts
    355
    Let me see if I follow the logic.

    Using your example, my preloader would be frames 1 through 12. At frame twelve I'd go to frame 1. At frame 1 I'd "get url" the javascript command to see if 100% of the movie is loaded. If it is, the script kicks the movie over to frame 13 and goes from there. If it isn't, the script has no effect and the 1-12 loop continues.

    Is that how it works?

  8. #8
    Senior Member evolbeagle's Avatar
    Join Date
    Oct 2000
    Location
    Nashville, TN
    Posts
    355
    Okay, I was posting my previous reply as you were posting yours, so I get it. Thanks.

  9. #9
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    I'm gonna upload the example so that people can see it in action- The example isn't much to look at though.

  10. #10
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087

    The working example

    http://www.geocities.com/jsnider.geo/movie.html

    I told you that it is not much to look at but it preloads.

  11. #11
    Senior Member evolbeagle's Avatar
    Join Date
    Oct 2000
    Location
    Nashville, TN
    Posts
    355
    Works like a charm in IE5. I also looked at it in Netscape 4 (which you did not indicate any testing for). In NS4 the preloader loops infinitely, piling up errors on each loop until the browser shuts down. Maybe it needs a browser detect routine with an if else preloader in browser specific lingo. If I have time later today, I'll see if I can come up with something. (But I'm really excited at the prospect that Bob might be able to add the if frame loaded feature in the near future, making all of this unnecessary.)

  12. #12
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    Yes, I knew that it wouldn't work in NS. NS has a different DOM and you would have to write a cross browser script. That is why I set the variable NAME and Percent. I did that so a Cross browser script would be easier to finish.


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