Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá.. Antes de chegar aqui eu revirei o pai:
seguinte tenho minha funcao liquido:
function inx_liquido(event:Event):void {
var sw:Number=stage.stageWidth;
var sh:Number=stage.stageHeight;
Tweener.addTween(inx_linha, {width:sw, time:1, transition:"easeInOut"});
Tweener.addTween(inx_quad_bg_menu, {height:sh, y:0, x:100, time:1, transition:"Bounce"});
inx_dark.width=sw;
}
e tenho a função bulinhas(haha):
function bulinhas() {
for (var qnt:int = 0; qnt < 100; qnt++) {
var sw:Number=stage.stageWidth;
var sh:Number=stage.stageHeight;
var novabola:bg_ball = new bg_ball();
var misto:Number=Math.random()*1;
novabola.x=Math.random()*sw;
novabola.y=Math.random()*sh;
novabola.scaleX=novabola.scaleY=misto*2;
novabola.alpha=misto/4;
this.addChild(novabola);
}
}
bulinhas();Tudo funciona perfeitamente.. (xeguei aqui sozinho) óó!porém não consigo adicionar a funcao bulinhas a liquido.
quando tento ciria a funcao liquido e exporto ele me diz:
>
TypeError: Error #1006: addChild não é uma função.
at MethodInfo-117()
at inx_fla::MainTimeline/inx_liquido()
at inx_fla::MainTimeline/frame1()
isso porque eu não to sabendo como trabalhar o "this.addChild(novabola);"
nao consigo joar ele na root..
alguem me explica isso..
?
Carregando comentários...