Siêu thị PDFTải ngay đi em, trời tối mất

Thư viện tri thức trực tuyến

Kho tài liệu với 50,000+ tài liệu học thuật

© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Tài liệu Targeting the Current Movie pptx
MIỄN PHÍ
Số trang
8
Kích thước
25.1 KB
Định dạng
PDF
Lượt xem
767

Tài liệu Targeting the Current Movie pptx

Nội dung xem thử

Mô tả chi tiết

< Day Day Up >

Targeting the Current Movie

Whenever a script is placed in a timeline, such as on a frame or on a button, and the

target for those actions is that same timeline, the target for the actions in that script is the

current movie. This is sort of like telling yourself to do something. For example, if you

were to tell yourself to stand up, that action could be said to be targeting the "current"

person—you—because you gave and responded to the command (you're both the

commander and the person taking orders). If you were to script this action, it would look

like this:

standUp();

Note that the action doesn't include a target path. This is because the action targets the

current movie: if you were to tell yourself to stand up, you wouldn't normally address

yourself prior to giving the command. In much the same way, Flash understands that

when an action doesn't include a target path, it's meant to affect the timeline where the

script resides.

Another way to address the current movie in a script is by preceding an action with the

term this, like so:

this.standUp();

In essence, you're saying, "With this timeline, take the following action." We'll provide

greater detail about this later in the book. For now, remember that in all cases, the

following syntax is interchangeable when addressing the current movie:

action ();

this.action ();

Keep in mind that your project may contain many scripts on various timelines that don't

Tải ngay đi em, còn do dự, trời tối mất!