Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 12-04-2003, 04:39 AM   #1
Registered User
Join Date: Sep 2003
Location: Sydney, Australia
Posts: 29
Angry SWF Preloader within a SWF within a SWF x&*%

If you have a preloader (as per this site) ie...

onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
loadBar._width = per*1.5;
if (percent>99) {

Does it matter if it is being loaded into another SWf (at a level)..

For some reason my preloader within for a SWF being loaded into upper levels hangs and then loads after a delay (the delay which the preload should be Preloading)

This is driving me MAD!!!..

Check out what I mean at my WEBSITE

sambob is offline   Reply With Quote
Old 12-04-2003, 07:30 AM   #2
Dosed...By Flash!
Join Date: Feb 2001
Location: England - Nottm
Posts: 1,192
Send a message via Yahoo to JHallam

put a empty movieClip on your level where you'd like the other .SWF to be loaded into, give the empty mc the instance of "content"

then on your other .SWF, put this action on the first frame.

ActionScript Code:
this.onEnterFrame = function() {         if (this.getBytesLoaded()<this.getBytesTotal()) {         Total = this.getBytesTotal()/1000;         Received = this.getBytesLoaded()/1000;         Percentage = (Received/Total)*100;             _root.content.loadBar.gotoAndStop(int(Percentage));         trace(_root.content.loadBar._currentframe);     } else {         _root.WorkContent.play();         this.onEnterFrame = null;     } };

Obviously, the loadBar is the bar and the rest is the text to show the percentage etc, they all have to be in with the preloader in the external .SWF your loading in, which the code above is within.

Hope that helps.
JHallam is offline   Reply With Quote

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 05:19 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.