FORUMS: list search recent posts

Need to make external .swf files play with click of a button in main swf?

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Marlon Tomera
Need to make external .swf files play with click of a button in main swf?
on Feb 4, 2015 at 7:36:45 pm

I have one main swf, within this main I have a list with 4 buttons and the UILoader. Below is my current code, but the movie clips are all running at the same time. How do I make them stop so I can just click the buttons to start them one by one.

var swf1:MovieClip;

var loader1:Loader = new Loader();



var defaultSWF1:URLRequest = new URLRequest("addition.swf");

loader1.load(defaultSWF1);

addChild(loader1);





var swf2:MovieClip;

var loader2:Loader = new Loader();



var defaultSWF2:URLRequest = new URLRequest("subtraction.swf");

loader2.load(defaultSWF2);

addChild(loader2);

loader2.x=50;

loader2.y=50;



var swf3:MovieClip;

var loader3:Loader = new Loader();



var defaultSWF3:URLRequest = new URLRequest("multiplication.swf");

loader3.load(defaultSWF3);

addChild(loader3);

loader3.x=100;

loader3.y=100;



var swf4:MovieClip;

var loader4:Loader = new Loader();


var defaultSWF4:URLRequest = new URLRequest("division.swf");

loader4.load(defaultSWF4);

addChild(loader4);

loader4.x=150;

loader4.y=150;


Return to posts index

Sam Mattern
Re: Need to make external .swf files play with click of a button in main swf?
on Feb 5, 2015 at 3:49:22 pm

I think loaded swfs play automatically. Try putting a stop on frame 1 of each swf you're loading. Then use the button to tell the swf to play:
loader4.gotoAndPlay(1);

-Sam


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]