Ok so i hacked it and made it like this: After i press start button the swf should have visible variale = false; and i writed like this(ill put some additional code):
[Embed(source = "../assetsLOGO.swf")]private const movie:Class;
[Embed(source="../assets/NEWintro.swf")]private const moviePublisher:Class;
private var swf:MovieClip;
private var swfPublisher:MovieClip;
private var timerSwfs:int = 60;
private var playerOnce:int = 0;
public function SwfPlayer()
{
FP.stage.scaleMode = StageScaleMode.SHOW_ALL;
FP.stage.align = StageAlign.TOP;
}
override public function update():void
{
if (timerSwfs > 0)
timerSwfs--;
if (playerOnce == 0 && timerSwfs == 0) {
swfPublisher = new moviePublisher();
FP.stage.addChild(swfPublisher);
swfPublisher.stage.frameRate = 24;
//swfPublisher.scaleX = 4;
//swfPublisher.scaleY = 4;
swfPublisher.x -= 115;
swfPublisher.y -= 80;
playerOnce = 1;
}
if (playerOnce == 2) {
swf = new movie();
FP.stage.addChild(swf);
swf.stage.frameRate = 30;
swf.scaleX = 4;
swf.scaleY = 4;
swf.x = -250;
swf.y = -360;
playerOnce = 3;
}
if (playerOnce==1) {
swfsPublisher();
}
if (playerOnce==3) {
swfs();
}
super.update();
}
private function swfsPublisher():void
{
if (swfPublisher.visible==false)
{
FP.stage.removeChild(swfPublisher);
var muteTransform:SoundTransform = new SoundTransform();
muteTransform.volume = 0;
swfPublisher.soundTransform = muteTransform;
//next swf
time = 126;
playerOnce = 2;
}
}
private function swfs():void
{
//Mouse.hide();
if (time > -500)
{
time--;
}
if (time == 0)
{
swf.stage.frameRate = 60;
FP.stage.removeChild(swf);
var muteTransform:SoundTransform = new SoundTransform();
muteTransform.volume = 0;
swf.soundTransform = muteTransform;
//world change
playerOnce = 3;
G.splash1 = false;
G.stateTrans = "outC2";
}
}
private function swfsPublisher():void
{
//Mouse.hide();
//if (time > -500)
//{
// time--;
//}
if (swfPublisher.visible==false)
{
FP.stage.removeChild(swfPublisher);
var muteTransform:SoundTransform = new SoundTransform();
muteTransform.volume = 0;
swfPublisher.soundTransform = muteTransform;
//next swf
time = 126;
playerOnce = 2;
}
}
The swf ,I see it invisible but still the swfPublisher.visible == false dosent work. Do i do something wrong?