mathus the seconth -> RE: Flash Q&A Thread 4 (1/5/2008 4:29:12)
|
In fact... here is something I found about avoiding _root: quote:
Avoiding _root There are several ways to target instances that let you avoid using _root; these are discussed later in this section. Avoid using _root in ActionScript because it can cause SWF files that load into other SWF files to not work correctly. The _root identifier targets the base SWF file that is loading, not the SWF file using relative addressing instead of _root. This issue limits code portability in SWF files that are loaded into another file, and, particularly, in components and movie clips. You can help resolve problems using _lockroot, but only use _lockroot when necessary (such as when you are loading a SWF file but do not have access to the FLA file). For more information on using _lockroot, see Using _lockroot. Use this, this._parent, or _parent keywords rather than _root, depending on where your ActionScript is located. The following example shows relative addressing: myClip_mc.onRelease = function() { trace(this._parent.myButton_btn._x); }; All variables must be scoped, except for variables that are function parameters and local variables. Scope variables relative to their current path whenever possible, using relative addressing, such as the this keyword. For more information on using the this keyword, see this in Flash ActionScript Language Reference. Taerzik: It just says "Connecting..." and nothing. Also... Does anybody know how to save an fla as Flash MX in CS3? Thanks.
|
|
|
|