Results 1 to 3 of 3

Thread: Preloading external swf's - Action Script 2

  1. #1
    Join Date
    May 2008
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Preloading external swf's - Action Script 2

    Hey,

    I'm having an issue with a movie I'm making, I have my main swf and then the external swfs which are loaded into the clip holder.. easy enough.

    At the start of the external swf's I have the preloader, this is the same preloader that I have used for the main swf (which works). However, when I post the files live, the external swf's preloader doesnt work.

    Any suggestions for this?

    Cheers!

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Do you have any components or external classes within the external swf files? What's the code for your preloader? Which method are you using to load in your external swf files?

    Some of the following tutorials might be helpful:
    External SWF Preloading
    Basic Flash Preloader
    Advanced Flash Preloader

  3. The Following User Says Thank You to Medyman For This Useful Post:

    jamie_di (07-10-2008)

  4. #3
    Join Date
    May 2008
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Cheers for those links, extremely helpful!

    I now have another problem, followed the External SWF Preloading tutorial (learnt a lot about preloading in that).

    If you go to this link and click on one of the links in the flash file, the internal clip begins loading, but then loads again for some reason. The code the preloader is as follows:
    Code:
    var mcl:MovieClipLoader = new MovieClipLoader();
    
    var mclL:Object = new Object();
    
    mclL.onLoadProgress = function(target,loaded,total) {
    	loader.percent.text = Math.round((loaded/total) * 100)
    }
    
    mclL.onLoadInit = function() {
    	loader._visible = false;
    	loader.percent.text = "";
    }
    	
    mcl.addListener(mclL);
    
    mcl.loadClip("http://www.design-image.co.uk/flash/print.swf",holder_mc);
    
    b1.onRelease = function() {
    	loader._visible = true;
    	mcl.loadClip("http://www.design-image.co.uk/flash/print.swf",holder_mc);
    }
    
    b2.onRelease = function() {
    	loader._visible = true;
    	mcl.loadClip("http://www.design-image.co.uk/flash/large.swf",holder_mc);
    }
    
    b3.onRelease = function() {
    	loader._visible = true;
    	mcl.loadClip("http://www.design-image.co.uk/flash/websites.swf",holder_mc);
    }
    Obviously changing the mcl.loadClip("http://www.design-image.co.uk/flash/print.swf",holder_mc); part for each section. And the loader movie clip is a layer above the holder clip which disappears once completed.

    Any ideas on what's causing preloader to start, complete and then repeat itself? I've had a go at removing parts of code and seeing what happens, but I am having no joy, so any help would be much appreciated!

    Thanks in advance.

    ** Fixed it!**
    It turns out that I have fixed it without even realising, I moved the external clips start frame back by a couple and boom, it worked a treat.

    Check it out at www.design-image.co.uk
    Last edited by jamie_di; 07-11-2008 at 08:46 AM. Reason: Update again

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •