flash - Relationship of code on first frame of main time line to class code and library objects -
Go to this point where the hole in my AS3 knowledge is getting bigger! Realizing that I have confusion about this relationship:
The code body on the first frame of the AS3 file. (Which I have used Library Objects to use the laid-back and used to call the class code). Is this code called codecode?
Library Objects (usually Graphical Objects)
Should it be done differently?
I have the following problems due to lack of understanding:
A complex complex from a class, but straight forward in the main body code. Cant call function on the main body code from class code, because class code does not know that the main body code exists?
So it seems that two languages can communicate easily?
Any indication greatly appreciated. The code on the first frame is called a 'timeline script' and it is minimized (depending on the project)
The document class is different, and can be considered a special case. It is automatically called when your SWF starts. This design is set by clicking on the stage on time and typing in the name of class in the area of the document class of the property class.
Behind the scenes, Flash captures all your timeline code and puts it in the form of a series of documents that apply when changing the timeline. If you did not create a document class flash, will make a default and still there will be a timeline code. This process is invisible to the developer, and some people know how it works.
Class / Stage / Timeline / Object / Movie Clip Communication When you start using the AddFram script (an advanced method such as methods), the result becomes obvious. Ah do not worry; admin does not worry; it is not easy for the guru; your illusion arises from the fact that Adobe has caught an object-oriented language and mixed it into a heritage based timeline system - Do not think a strongly typed language
There is a way to set up a class:
package {import flash.display. *; Expands Public Class Foo Sprite {Personal Work _Stage: Movieclip; Public Function Fu (Stage: Movie Clip) {_stage = stage; // Access to the forum) Public function generated box (N: et): for zero {{var i: int = 0; i & lt; n; i ++} {// call step function _stage.addBox (Math.random () * 50, Math. Random (* 50); }}}} then on the forum
var foo: Foo = new Foo (this); Foo.generateBoxes (10); // FU Function is called by addBox (x: number, y: number): zero {var b: box = new box (); Bx = x; Ba = y; AddChild (b); } Library should have an exported graphic for the action script called box (class name)
Comments
Post a Comment