PDA

View Full Version : loading 2 swf with 1 swf is over 2 swf


websoftexpert
07-31-2009, 06:50 AM
Hi

I am just started using Flash CS4 / AS3.

I am loading 2 swf files in another flash file

see http://64.131.70.95/~archit/flashdemo/final.html

1st swf is also created by actionscript 3

2nd swf (cloud scene) is created by actionscript 3

Now I am loading both swf in final flash file.


1st swf in layer 3(above layer1). Action has following script

==================================
var myLoader:Loader = new Loader();
addChild(myLoader);
var url:URLRequest = new URLRequest("CloudExampleLogoCS3Final.swf");
myLoader.load(url);
=======================================



2nd swf in layer 1(below layer3). Action has following script

==================================
var myLoader1:Loader = new Loader();
addChild(myLoader1);
var url1:URLRequest = new URLRequest("CloudExampleCS3Final.swf");
myLoader1.load(url1);
=======================================

I want 1 swf is above 2 swf. (Text above cloud).

How to do this?

Earlier we used level in early version of flash but it is removed from AS3.

Thx

flashInept
07-31-2009, 07:13 AM
Hi

I am just started using Flash CS4 / AS3.

I am loading 2 swf files in another flash file

see http://64.131.70.95/~archit/flashdemo/final.html

1st swf is also created by actionscript 3

2nd swf (cloud scene) is created by actionscript 3

Now I am loading both swf in final flash file.


1st swf in layer 3(above layer1). Action has following script

==================================
var myLoader:Loader = new Loader();
addChild(myLoader);
var url:URLRequest = new URLRequest("CloudExampleLogoCS3Final.swf");
myLoader.load(url);
=======================================



2nd swf in layer 1(below layer3). Action has following script

==================================
var myLoader1:Loader = new Loader();
addChild(myLoader1);
var url1:URLRequest = new URLRequest("CloudExampleCS3Final.swf");
myLoader1.load(url1);
=======================================

I want 1 swf is above 2 swf. (Text above cloud).

How to do this?

Earlier we used level in early version of flash but it is removed from AS3.

Thx

Hi,
have you tried reversing the layer order of the two holders? I think that would put the text on top of the clouds like you wanted.

websoftexpert
07-31-2009, 08:05 AM
I did inter change the layer but it is not working. Even put in one layer. here is modified script.

========================================

var myLoader:Loader = new Loader();
addChild(myLoader);
var url:URLRequest = new URLRequest("CloudExampleLogoCS3Final.swf");
myLoader.load(url);
/*loadMovieNum("CloudExampleLogoCS3.swf", 10); */
var myLoader1:Loader = new Loader();
addChild(myLoader1);
var url1:URLRequest = new URLRequest("CloudExampleCS3Final.swf");
myLoader1.load(url1);
swapChildren(myLoader,myLoader1);

=================================================

thx