salut..., im new here n nouveau sur ActionScript.
Im essayant de faire une présentation flash à l'aide ActionScript3 flash,
J'ai trois bouton chaque charger leurs MovieClip.
quand SWF est un jeu, puis MC1 est la charge,
quand btn2 cliquez dessus, puis mc1/mc3 est de retirer n mc2 s .. calcul et ainsi de suite.
quand btn1 cliquez dessus, puis MC1 est la charge,...
...tout comme le menu du site Web...
Le problème est..., le MovieClip qui a été saisi de charge ne peut être enlevé ..
voici l'actionscript ..
flash.display.MovieClip;
var mc1:loadLoad = new loadLoad();
var mc2:aaMc = new aaMc();
var mc3:bbMc = new bbMc();
var tT:testTest = new testTest();
[*]/*load when SWF is loaded*/
showLoad();
function showLoad(){
this.addChild(mc1);
/*this.addChild(tT)
tT.y= 100;*/
}
btn1.addEventListener(MouseEvent.CLICK, btn1Load);
function btn1Load(e:MouseEvent):void{
try{//this.removeChild();
this.addChild(mc1);
removeChild(mc3);
removeChild(mc2);
}catch(e:Error){}
}
btn2.addEventListener(MouseEvent.CLICK,btn2Load);
function btn2Load(e:MouseEvent):void{
try{er.play();
this.addChild(mc3);
removeChild(mc1);
removeChild(mc2);
}catch(e:Error){}
}
btn3.addEventListener(MouseEvent.CLICK,btn3Load);
function btn3Load(e:MouseEvent):void{
try{
addChild(mc2);
removeChild(mc3);
removeChild(mc1);
}catch(e:Error){}}
- flash.display.MovieClip;
- var mc1:loadLoad = new loadLoad();
- var mc2:aaMc = new aaMc();
- var mc3:bbMc = new bbMc();
- var tT:testTest = new testTest();
- [*]/*load when SWF is loaded*/
- showLoad();
- function showLoad(){
- this.addChild(mc1);
- /*this.addChild(tT)
- tT.y= 100;*/
- }
- btn1.addEventListener(MouseEvent.CLICK, btn1Load);
- function btn1Load(e:MouseEvent):void{
- try{//this.removeChild();
- this.addChild(mc1);
- removeChild(mc3);
- removeChild(mc2);
-
- }catch(e:Error){}
-
-
- }
- btn2.addEventListener(MouseEvent.CLICK,btn2Load);
- function btn2Load(e:MouseEvent):void{
- try{er.play();
- this.addChild(mc3);
- removeChild(mc1);
- removeChild(mc2);
-
- }catch(e:Error){}
- }
-
- btn3.addEventListener(MouseEvent.CLICK,btn3Load);
- function btn3Load(e:MouseEvent):void{
- try{
- addChild(mc2);
- removeChild(mc3);
- removeChild(mc1);
-
- }catch(e:Error){}}
>> qui est le code ActionScript intégrée dans. fla ..
please..., aide.