header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
LLLL
Points:0
Posts:0

4/6/2011 11:52:41 PM

Title: replacing - removing the Stage


hi i am trying to load an external swf on to my site but in the process i want the stage to be removed or replaced with the swf My script is liek this - i dont want to add it as child i want to replace the exisitng movie Which is the main Movie/stage

harta.addEventListener(MouseEvent.CLICK, buttonClick)

function buttonClick(e:MouseEvent):void
{
var loader_mc : Loader = new Loader();
var urlRequest : URLRequest = new URLRequest("Harta e Vogel.swf");
loader_mc.load(urlRequest);
addChild(loader_mc);

}



1
Rayan
Points: 700
Posts:0
4/7/2011 9:55:08 PM



In AS3 there is no way to replace root ,you can remove the previously loaded objects using

removeChildAt(0)

and then use "addChild()" to add new loaded Movie to root


2
LLLL
Points: 0
Posts:0
4/9/2011 2:09:51 AM



thanx


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 5+4 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions