A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Preloader problem

  1. #1
    Member
    Join Date
    Oct 2006
    Posts
    36

    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);
    }
    } 
    }

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    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. -

  3. #3
    Member
    Join Date
    Oct 2006
    Posts
    36
    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);
    }
    } 
    }

  4. #4
    Member
    Join Date
    Oct 2006
    Posts
    36
    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....

  5. #5
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    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. -

  6. #6
    Member
    Join Date
    Oct 2006
    Posts
    36
    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.

  7. #7
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    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. -

  8. #8
    Member
    Join Date
    Oct 2006
    Posts
    36
    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.

  9. #9
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center