Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-09-2003, 10:50 PM   #1
Tex
...
 
Join Date: Aug 2003
Posts: 51
Exclamation loading external files

Hi, i'm trying to load an external swf into a an mc named home_container using a preloader. Everything loads fine, exept that the preloader never appears ! I have no idea why, if someone could help that would be great. Thanx
This is thed code i use:

Frame1:
ActionScript Code:
[COLOR=orange]this.home_container.loadMovie("http://www.vnstudios.com/ice.swf");[/COLOR] [COLOR=orange]_level0.home_container.loadMovie("http://www.vnstudios.com/ice.swf");[/COLOR]

Frame2:
ActionScript Code:
[COLOR=orange](empty)[/COLOR]

Frame3:
ActionScript Code:
[COLOR=orange]_level0.preloader.gotoAndStop(2);[/COLOR] [COLOR=orange]stop();[/COLOR]


And this is the code on my preloader:
ActionScript Code:
[COLOR=orange]this.onEnterFrame = function() {[/COLOR] [COLOR=orange]percent = (_root.home_container.getBytesLoaded()/_root.home_container.getBytesTotal())*100;[/COLOR] [COLOR=orange]  if (!isNaN(percent)) {[/COLOR] [COLOR=orange]if (percent == 0) {[/COLOR] [COLOR=orange]percent_display = "";[/COLOR] [COLOR=orange]} else {[/COLOR] [COLOR=orange]percent_display = Math.ceil(percent)+"% LOADED.";[/COLOR] [COLOR=orange]}[/COLOR] [COLOR=orange]this.bar._visible = true;[/COLOR] [COLOR=orange]this.bar._xscale = percent;[/COLOR] [COLOR=orange]if (percent>1) {[/COLOR] [COLOR=orange]this.reelmc._visible = true;[/COLOR] [COLOR=orange]}[/COLOR] [COLOR=orange]_root.home_container.stop();[/COLOR] [COLOR=orange]}[/COLOR] [COLOR=orange]if (percent == 100) {[/COLOR] [COLOR=orange]this.gotoAndStop(1);[/COLOR] [COLOR=orange]delete this.onEnterFrame;[/COLOR] [COLOR=orange]delete this.onEnterFrame;[/COLOR] [COLOR=orange]percent_display = "";[/COLOR] [COLOR=orange]this.bar._visible = false;[/COLOR] [COLOR=orange]_root.home_container.play();[/COLOR] [COLOR=orange]}[/COLOR] [COLOR=orange]};[/COLOR] [COLOR=orange]stop();[/COLOR]

If anyone could help me or send me an example that would be great.

Thanks again

Last edited by CyanBlue; 11-09-2003 at 11:47 PM.
Tex is offline   Reply With Quote
Old 11-09-2003, 11:11 PM   #2
Colin Campbell
Senior Member
 
Join Date: Jun 2003
Posts: 2,090
Default

Hello,

this is an automated message:

[useastags]

______________

From what I can see, you're loading the same .swf into a container and a level. It doesn't need to be done, you only need one.

Sorry I can't be of more help right now, Colin
Colin Campbell is offline   Reply With Quote
Old 11-09-2003, 11:40 PM   #3
oldnewbie
Banned by AS.org Staff
 
Join Date: Mar 2002
Posts: 10,533
Default

That's partly my code and I don't quite understand what you're trying to do!

Try this one...
http://www.kirupa.com/developer/mx/p...epreloader.htm
oldnewbie is offline   Reply With Quote
Old 11-10-2003, 01:03 AM   #4
Tex
...
 
Join Date: Aug 2003
Posts: 51
Default

hi oldnewbie, yes i did get that code from you but it wouldn't work.
What i'm trying to do is load an external swf into an already loaded site using a preloader.
When i use this code it loads the swf without showing the preloader.
I don't understand why.... If someone could help that would be great.

Thank you
Tex is offline   Reply With Quote
Old 11-10-2003, 01:07 AM   #5
oldnewbie
Banned by AS.org Staff
 
Join Date: Mar 2002
Posts: 10,533
Default

Can you attach your .flas or e-mail them to me?
Zipped up in MX only format, not MX2004.

PM me and I'll provide an e-mail if you want to go that route.
oldnewbie is offline   Reply With Quote
Old 11-10-2003, 01:33 AM   #6
Tex
...
 
Join Date: Aug 2003
Posts: 51
Default

Hi oldnewbie

Thanks for offering your help but i cannot post my .fla, the file is to big, I can show you an example of what i mean. http://www.3dcom.co.uk
On this site, there is a normal preloader and then other preloaders for external swf files. This is what i'm trying to do. Load external swfs using a preloader.

Maybe you could send me a quick example.

Thanks
Tex is offline   Reply With Quote
Old 11-10-2003, 01:40 AM   #7
oldnewbie
Banned by AS.org Staff
 
Join Date: Mar 2002
Posts: 10,533
Default

I know what you mean... And I don't know where you got hold of my code, but if you check the following thread on FK, then it should work fine...

http://www.flashkit.com/board/showth...hreadid=456020

You can allways check this other one also, and this one includes a transition between different loaded sections...

http://www.kirupa.com/developer/mx/p...transition.htm
oldnewbie is offline   Reply With Quote
Old 11-10-2003, 01:50 AM   #8
Tex
...
 
Join Date: Aug 2003
Posts: 51
Default

Actually this is where i got the code from... I just couldn't get it to work, thats why i posted it again.
But i f you say it works, then it should work, so i will try again.

thanks
Tex is offline   Reply With Quote
Old 11-10-2003, 09:31 PM   #9
Tex
...
 
Join Date: Aug 2003
Posts: 51
Default

Hi oldnewbie.

I tried to make it work with your code.. It loads the file, but withour ever showing the preloader. I have attached the file, if you could please have a quick look that would be great.
I'm sure its just a little mistake somewhere but i can't see it. I'm still new to Flash.

Thanx
Attached Files
File Type: zip main2.zip (5.9 KB, 226 views)
Tex is offline   Reply With Quote
Old 11-10-2003, 11:24 PM   #10
oldnewbie
Banned by AS.org Staff
 
Join Date: Mar 2002
Posts: 10,533
Default

Outside of the fact that this movie is not of the same size as your ice.swf (you should correct that!), the preloader seems to be working fine. I just checked it both on my cable connection and old 56 dial-up, and it displays correctly.
If you're on a fast connection, testing this locally and not emptying your cache before each test, then obviously you will not see it. You must clear you cache each time you want to check the peloader locally.
oldnewbie 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
loading an object from an array NateVeronica ActionScript 2.0 1 03-30-2004 10:53 PM


All times are GMT. The time now is 04:21 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.