views:

30

answers:

1

My Flash file contains a movie-clip(Box1) that is exported for Action-script but it is not exported to Frame 1 in Linkage Dialog Box. Box1 has been put on frame-40 and the object is accessible in document Class but is not added to stage. However when it reaches to Frame 40, the object at Frame 40 get visible. My question is where is boxObj??

package  
{
import flash.display.MovieClip;
public class GetTimeLineObjects extends MovieClip 
  {         
    var boxObj:MovieClip
    public function GetTimeLineObjects()
    {
        boxObj = new Box1();
        addChild(boxObj)
    }
  }
}
A: 

You seem to be mixing both Timeline code & AS code. Isn't it possible to separate the logic in the AS files and only use the Timeline to design your graphic assets?

Why are you adding an instance of Box1 to the stage at frame 40? Isn't it something you can do in the code?

Why don't you want to export your linked asset to Frame1?

Separating concerns should make everything a lot clearer & easier to maintain. If you can avoid having any type of code in Flash CS , you will have a lot more control over your assets.

PatrickS
you are right PatrickS but i have no such requirement also but i feel the strange behavior that i mentioned that object is accessible but is not visible on stage. Why it is happening, boxObj is in memory, this can be accessed at Timeline. But it does not get visible at any Frame
Muhammad Irfan
SWF structure can be checked SWiX tool. This tool is very good as it shows which objects are loaded first before your document Class.
Muhammad Irfan