Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 12-05-2003, 05:43 AM   #1
dbeas
Registered User
 
Join Date: Nov 2003
Location: Tampa
Posts: 10
Unhappy Can't get preloader for external swf to work

I have a main .swf that's preloaded using the following:

onClipEvent (enterFrame) {
framesLoaded = (Math.ceil (( _parent.getBytesLoaded() / _parent.getBytesTotal()) * 100));
gotoAndStop (framesLoaded);
info.text = framesLoaded + "% completed";
if (framesLoaded >= 100) {
_root.gotoAndPlay (2);
}
}

I have an external swf loaded using:

_root.createEmptyMovieClip("container", 1);
loadMovie("externalmovie.swf", "container");
setProperty ("container", _alpha, "45");
container._x = 64 ;
container._y = 135 ;

Now, the problem!

I'm trying to preload the external swf in the same way I preloaded the main swf without it conflicting. Thanks to anyone who can help.....this has been driving me crazy! I've checked out a lot of tutorials, but none of them cover the way I'm trying to do this where the external swf preloads just like the main swf with no button event etc.....it just preloads when called. This seems like it should be so simple, but I have 3 hours gone that say othwerwise!
dbeas is offline   Reply With Quote
Old 12-05-2003, 07:13 AM   #2
oldnewbie
Banned by AS.org Staff
 
Join Date: Mar 2002
Posts: 10,533
Default

What's the rest of your setup?

Using the same code and preloader clip to preload this external movie?
If so, on what frame is it in the root movie?
Want the main movie playing while this external movie loads or should it wait for this external movie to fully load before doing so?

Only 3 hours?
oldnewbie is offline   Reply With Quote
Old 12-05-2003, 07:34 AM   #3
dbeas
Registered User
 
Join Date: Nov 2003
Location: Tampa
Posts: 10
Default Clarification (I think)

The main swf fully preloads and when the first frame of the main swf starts playing I'd like the external swf to start preloading, and actually I almost have it above. The main swf preloads, and the external swf loads into the main swf with no problem (but there is no preload). I'd like to use as close to the same code to preload the external as possible. I'd also rather not have any code in the main movie preloading the external movies, other than what I already have above to get it started. I'm hoping to use exactly what I have above to "call" the external swf, but have a "stand alone" preloader in the external swf. Thanks!
dbeas is offline   Reply With Quote
Old 12-05-2003, 07:52 AM   #4
oldnewbie
Banned by AS.org Staff
 
Join Date: Mar 2002
Posts: 10,533
Default

So are you saying you're using the exact same preloader code and clip (including your reference to _root) in the "to be loaded" movie itself?
oldnewbie is offline   Reply With Quote
Old 12-05-2003, 08:07 AM   #5
dbeas
Registered User
 
Join Date: Nov 2003
Location: Tampa
Posts: 10
Default

Yes,
Except for references to root made everything out of wack of course (conflicting with the main swf). I understand why that wouldn't work.....I just don't know how to change that code so that it won't conflict. Thanks......
dbeas is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:34 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.