PDA

Click to See Complete Forum and Search --> : Just checking...



evolbeagle
12-21-2000, 11:39 AM
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?

Bob Hartzell
12-21-2000, 12:03 PM
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.

johnie
12-21-2000, 12:23 PM
Evol- No they don't loose thier actions I think. Let me double check that one though.

johnie
12-21-2000, 06:01 PM
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.

johnie
12-21-2000, 07:30 PM
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.

johnie
12-21-2000, 08:34 PM
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.

evolbeagle
12-21-2000, 08:38 PM
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?

evolbeagle
12-21-2000, 08:39 PM
Okay, I was posting my previous reply as you were posting yours, so I get it. Thanks.

johnie
12-21-2000, 10:35 PM
I'm gonna upload the example so that people can see it in action- The example isn't much to look at though.

johnie
12-21-2000, 10:45 PM
http://www.geocities.com/jsnider.geo/movie.html

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

evolbeagle
12-22-2000, 10:38 AM
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.)

johnie
12-22-2000, 12:18 PM
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.