Hello all:
I am new to Flash language in general, and AS3 in particular. So, would be grateful if anyone helps me with my problem.
Here is a scope:
There’s AS3 script with fluid objects. One of them is button (button1). I need this button to do one of the following:
-
to call a load of external swf to the stage, and unload it when another swf is called by the second button.
-
to call a library movie clip to the stage, and unload it when another library movie clip is called by the second button.
Thanks a lot in advance.
Here is the script FYI:
package {
import flash.display.*;
import FluidLayout.*;
public class Website extends MovieClip{
public function Website()
{
/* Set the Scale Mode of the Stage */
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
/* Add the symbols to stage */
var bg = new Background();
addChild(bg);
var title = new Title();
addChild(title);
var menu = new Menu();
addChild(menu);
var middle = new Middle();
addChild(middle);
var footer = new Footer();
addChild(footer);
**var button1 = new Button1();
addChild(button1);**
/* Apply the alignment to the background */
var bgParam = {
x:0,
y:0,
offsetX: 0,
offsetY: 0
}
new FluidObject(bg,bgParam);
/* Apply the alignment to the title */
var titleParam = {
x:0,
y:0,
offsetX:0,
offsetY:0
}
new FluidObject(title,titleParam);
/* Apply simple alignment to the title */
/*var titleParam = {
alignment: "TOP_LEFT",
margin: 0
}
new SimpleFluidObject(title,titleParam);*/
/* Apply the alignment to the menu */
var menuParam = {
x:1,
y:0.8,
offsetX: -menu.width - 140,
offsetY: 20
}
new FluidObject(menu,menuParam);
/* Apply the alignment to the content */
var middleParam = {
x:0.5,
y:0.5,
offsetX: -middle.width/2,
offsetY: -middle.height/2
}
new FluidObject(middle,middleParam);
**/* Apply the alignment to the button */
var button1Param = {
x:1,
y:1,
offsetX: -button1.width - 10,
offsetY: -button1.height -10
}**
new FluidObject(button1,button1Param);
/* Apply the alignment to the footer */
var footerParam = {
x:1,
y:1,
offsetX: -footer.width - 10,
offsetY: -footer.height -10
}
new FluidObject(footer,footerParam);
}
}
}