-
Preloader problem
I am trying to create a preloader. Step one is to load the main swf (myswf.swf) into the parent swf. But for some reason myswf.swf is not appearing. Just a blank page. Here is the code...please help
Code:
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class preloader extends Sprite{
public function preloader(){
stage.scaleMode = "noScale";
stage.align = "TL";
var ldr:Loader = new Loader();
var urlReq:URLRequest = new URLRequest("myswf.swf");
ldr.load(urlReq);
addChild(ldr);
}
}
}
-
Senior Member
Your script works for me. How do you call it? I used it as the Document class.
- The right of the People to create Flash movies shall not be infringed. -
-
i typed 'preloader' in the document class section in properties. Does it afffect anything if i change the name of the document class to 'theloader' as shown below?
Code:
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class theloader extends Sprite{
public function theloader(){
stage.scaleMode = "noScale";
stage.align = "TL";
var ldr:Loader = new Loader();
var urlReq:URLRequest = new URLRequest("myswf.swf");
ldr.load(urlReq);
addChild(ldr);
}
}
}
-
ok .... here is the evidence the page is absolutely blank
final product (not working)
look here --> http://www.breezeland.com/myop/preload.swf
here is myswf.swf working fine
look here --> http://www.breezeland.com/myop/myswf.swf
here is the fla file
get it here --> http://www.breezeland.com/myop/preload.fla
and the actionscript
get it here --> http://www.breezeland.com/myop/tune.as
Please help me identify the problem....
-
Senior Member
Whatever you say I tested your script and put preloader in the box for the document class and the movie was loaded. When I clicked on one of your urls there was something for a second and then disappeared.
- The right of the People to create Flash movies shall not be infringed. -
-
So why is it not working then? The fact that it dissappears for you says something is wrong with it. For me, nothing loads at all. I have provided all the files. If anyone can take a look at this for me, i would really appreciate it.
-
Senior Member
The problem is the some other script you use. The fla and as file you link works for me.
- The right of the People to create Flash movies shall not be infringed. -
-
Please be specific, i have made available all files that i am using. Which one are you saying has the problem? there are only 4 files.
1. the fla file (you said this is fine)
2. as file ( you said this is fine )
3. myswf.swf ( I know this is fine, you can view it on the link)
4. preload.swf <-- this one?
So what file do you mean?
Last edited by 0gani; 12-10-2006 at 08:57 AM.
-
Senior Member
I have replaced myswf.swf with a link of my own files and the movie is loaded using your fla and as file. I don't know your preload file.
- The right of the People to create Flash movies shall not be infringed. -
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|