ne peut pas supprimer MovieClip avec bouton.

  • djarot
  • Born
  • Born
  • No Avatar
  • Inscription: Nov 12, 2008
  • Messages: 2
  • Status: Offline

Message Novembre 12th, 2008, 9:15 pm

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 ..

Code: [ Select ]

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){}}
  1. flash.display.MovieClip;
  2. var mc1:loadLoad = new loadLoad();
  3. var mc2:aaMc = new aaMc();
  4. var mc3:bbMc = new bbMc();
  5. var tT:testTest = new testTest();
  6. [*]/*load when SWF is loaded*/
  7. showLoad();
  8. function showLoad(){
  9.     this.addChild(mc1);
  10.     /*this.addChild(tT)
  11.     tT.y= 100;*/
  12.     }
  13. btn1.addEventListener(MouseEvent.CLICK, btn1Load);
  14. function btn1Load(e:MouseEvent):void{
  15.     try{//this.removeChild();
  16.     this.addChild(mc1);
  17.     removeChild(mc3);
  18.     removeChild(mc2);
  19.     
  20.     }catch(e:Error){}
  21.     
  22.     
  23.     }
  24. btn2.addEventListener(MouseEvent.CLICK,btn2Load);
  25. function btn2Load(e:MouseEvent):void{
  26.     try{er.play();
  27.     this.addChild(mc3);
  28.     removeChild(mc1);
  29.     removeChild(mc2);
  30.     
  31.     }catch(e:Error){}
  32.     }
  33.     
  34. btn3.addEventListener(MouseEvent.CLICK,btn3Load);
  35. function btn3Load(e:MouseEvent):void{
  36.     try{
  37.     addChild(mc2);
  38.     removeChild(mc3);
  39.     removeChild(mc1);
  40.     
  41.     }catch(e:Error){}}


>> qui est le code ActionScript intégrée dans. fla ..
please..., aide.
  • Anonymous
  • Bot
  • No Avatar
  • Inscription: 25 Feb 2008
  • Messages: ?
  • Loc: Ozzuland
  • Status: Online

Message Novembre 12th, 2008, 9:15 pm

Afficher de l'information

  • Total des messages de ce sujet: 1 message
  • Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 40 invités
  • Vous ne pouvez pas poster de nouveaux sujets
  • Vous ne pouvez pas répondre aux sujets
  • Vous ne pouvez pas éditer vos messages
  • Vous ne pouvez pas supprimer vos messages
  • Vous ne pouvez pas joindre des fichiers
 
 

© 2011 Unmelted, LLC. Ozzu® est une marque déposée de Unmelted, LLC