dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: preloader question...

  1. #1
    Member
    Join Date
    Jul 2009
    Posts
    72

    preloader question...

    I made a preloader that works perfectly to load one of my .swf's on my machine, but how do I make it work on a site? I'm mocking up a site currently just using local files. Will it not work if it's not on a server?

    Can anyone offer up any advice? I've got a nice preloader made, I just don't know how to use it...

  2. #2
    Member
    Join Date
    Jul 2009
    Posts
    72
    Ok,

    So I'm STILL having issues figuring this out so I'd really like it if someone could at least tell me something.

    I have this preloader set up already...
    Code:
    var l:Loader = new Loader();
    l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
    l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
    l.load(new URLRequest("INSERT HERE.swf"));
    
    function loop(e:ProgressEvent):void
    {
    	var perc:Number = e.bytesLoaded / e.bytesTotal;
    	percent.text = Math.ceil(perc*100).toString();
    	preloader.SetProgress(perc)
    }
    
    function done(e:Event):void
    {
    	removeChildAt(0);
    	percent = null;
    	addChild(l);
    	preloader.visible  =  false;
    }
    But I don't know how to use it. Do I place this in the first frame of another swf? I've gotten it to work locally on my machine by just having it in the same folder, but I'm not sure what to do.

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