A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [RESOLVED] Small Preloader Issue...

Hybrid View

  1. #1
    Member
    Join Date
    Sep 2006
    Posts
    36

    resolved [RESOLVED] Small Preloader Issue...

    Hi All,

    I have a preloader.swf that loads the main "content" swf of my website. All is working alright, except once the preloader is done, the content swf doesn't start at frame one.

    Basically in the content swf I have some images and text that scroll onto the screen at frame one before the 'home' screen, but when preloader finishes it skips the animation and goes straight to the home screen. This isn't a big deal, but obviously it would be nice it people could see the animations at the start...

    The script for the preloader is:

    var l:Loader = new Loader();
    l.contentLoaderInfo.addEventListener(ProgressEvent .PROGRESS, loop);
    l.contentLoaderInfo.addEventListener(Event.COMPLET E, done);
    l.load(new URLRequest("content.swf"));

    function loop(e:ProgressEvent):void
    {
    var perc:Number = e.bytesLoaded / e.bytesTotal;
    percent.text = Math.ceil(perc*100) + '%'.toString();
    }

    function done(e:Event):void
    {
    removeChildAt(0);
    percent = null;
    addChild(l);
    }
    If anyone has any suggestions I would be most grateful!

    Cheers

    Leesome

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Try this in your done function:

    PHP Code:
    MovieClip(l.content).gotoAndPlay(1); 
    Please use [php] or [code] tags, and mark your threads resolved 8)

  3. #3
    Member
    Join Date
    Sep 2006
    Posts
    36
    Oh bugger... The site's stopped working now...

    Hi Neznein,

    OK some strange things are now happening... I changed the code and then uploaded the new swf to my ftp server. The site has since stopped working - the background comes up, but the swf never loads and if you right click on the screen, the flash menu says 'movie not loaded'. I then changed the code back and uploaded the original swf, and now that won't load either... Usually the swf is embedded in html, so I thought I'd try loading just the swf by itself, and that doesn't work now either... I've no idea what's going on as I assume your code wouldn't have affected things this much...?

    Do you have any suggestions? Thanks very much!

    Cheers

  4. #4
    Member
    Join Date
    Sep 2006
    Posts
    36
    Ok... I'm a complete moron... A week ago, I changed the upload settings on my FTP client and forgot to change them back... All working again... Thanks again Nez!

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