A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [RESOLVED] looping swf in container...make it stop!

  1. #1
    Junior Member
    Join Date
    Apr 2008
    Posts
    6

    resolved [RESOLVED] looping swf in container...make it stop!

    Hey guys

    Hope all is well.

    please view the code below:

    i have added this code on its own layer on the main stage. everything gets loaded into a container(instance name: container);
    i have a numeral preloader("loada") that comes up with every new button (buttons = b1, b2,b3,b4) clicked.

    the initial stop is to halt the main stage animation.

    what i am trying to do is stop/end each loaded swf once it has completed playing. instead it loops continously, however if i click another button... another swf is loaded..which is great... i just need them to stop looping.

    any help would be voondervar!!!!!



    stop();

    var mcl:MovieClipLoader = new MovieClipLoader();

    var mclL:Object = new Object();

    mclL.onLoadProgress = function(target,loaded,total) {
    loada.percent.text = Math.round((loaded/total) * 100) + "%";
    }
    mclL.onLoadInit = function() {
    loada._visible = false;
    loada.percent.text = "";
    }
    mcl.addListener(mclL);

    mcl.loadClip("",container);

    b1.onRelease = function(){
    loada._visible = true;
    mcl.loadClip("1.swf",container);
    }

    b2.onRelease = function(){
    loada._visible = true;
    mcl.loadClip("2.swf",container);
    }

    b3.onRelease = function(){
    loada._visible = true;
    mcl.loadClip("3.swf",container);
    }

    b4.onRelease = function(){
    loada._visible = true;
    mcl.loadClip("4.swf",container);
    }

  2. #2
    Junior Member
    Join Date
    Apr 2008
    Posts
    6
    27 views and not one suggestion or comment????

  3. #3
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Don't you have a stop in the SWF you're loading?
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  4. #4
    Junior Member
    Join Date
    Apr 2008
    Posts
    6
    i do... and when i play the swf's independantly they do stop...

    its only when playing through the container that the stop gets bypassed.

  5. #5
    Junior Member
    Join Date
    Apr 2008
    Posts
    6
    hey guys solved the problem... turns out my main stage was in AS2 and my swfs were being published as AS3.

    lol.... i'm such a newb!

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