Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
to tentando carrgar um arquivo swf. nele contem um arquivo .as que uso pra fazer as posições e resizes dos moviesclips.
depois que todo o carregamento é concluido ele acusa esse erro:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at cirurgia_resizeAnima$iinit()
nao sei se tem algo a ver, mas o arquivo que carregará tambem usa um arquivo .as, que também uso para posições e resize.
é um arquivo .fla e um arquivo .as pro swf que ira carregar, e um .fla e um .as pro arquivo a ser carregado.
esse é o arquivo .as do swf que vai ser carregado (eu copiei ele do arquivo que carregará e apenas mudei o nome e posições dos movieclips ):
package
{
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.display.MovieClip;
import flash.display.*;
import flash.events.ProgressEvent;
import flash.events.*;
import flash.net.URLRequest;
import flash.events.MouseEvent;
import flash.display.*
import flash.events.TimerEvent;
import flash.utils.Timer;
import flash.text.*;
import caurina.transitions.Tweener;
import flash.display.StageScaleMode;
import flash.display.StageAlign;
import flash.display.Stage;
public class cirurgia_resizeAnima extends MovieClip
{
private var tamStageW;
private var tamStageH;
public function cirurgia_resizeAnima()
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = "TL";
stage.addEventListener(Event.RESIZE, onResize);
tamStageW=stage.stageWidth;
tamStageH=stage.stageHeight;
logotipo.x = 50;
menu_principal.x = 70;
topo.width = tamStageW;
////////////////////////////////////////// THUMBS
thumb1.x = tamStageW / 2
thumb1.y = topo.y + topo.height + 60;
thumb2.x = thumb1.x + thumb1.width + 10;
thumb2.y = thumb1.y
thumb3.x = thumb2.x + thumb2.width + 10;
thumb3.y = thumb1.y
mulher.y = topo.y + topo.height + 130
mulher.width = tamStageW;
slogan.x = tamStageW /2 - slogan.width/2;
slogan.y = fundo_rodape.y - 120;
comoChegar_txt.y = fundo_rodape.y + 40;
dicasSaude_txt.y = fundo_rodape.y + 40;
fundo_rodape.y = tamStageH - fundo_rodape.height;
fundo_rodape.width = tamStageW;
fundo.width=stage.stageWidth;
fundo.height=stage.stageHeight;
}
public function onResize(evt:Event):void
{
var sw:Number=stage.stageWidth;
var sh:Number=stage.stageHeight;
topo.width = sw;
////////////////////////////////////////// THUMBS
thumb1.x = sw / 2
thumb1.y = topo.y + topo.height + 60;
thumb2.x = thumb1.x + thumb1.width + 10;
thumb2.y = thumb1.y
thumb3.x = thumb2.x + thumb2.width + 10;
thumb3.y = thumb1.y
mulher.y = fundo_rodape.y - 440
mulher.width = sw;
slogan.x = sw /2 - slogan.width/2;
slogan.y = fundo_rodape.y - 120
comoChegar_txt.y = fundo_rodape.y + 40;
dicasSaude_txt.y = fundo_rodape.y + 40;
fundo_rodape.y = sh - fundo_rodape.height;
fundo_rodape.width = tamStageW;
fundo.width = sw;
fundo.height = sh;
}
}
}Carregando comentários...