MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 418

Director scripting reference
Table of Contents

Advertisement

After the line has been executed,
member just created:
put newMember
-- (member 1 of castLib 1)
If you are using JavaScript syntax to create a new cast members, use the movie object's
method. This statement creates a new bitmap cast member:
newMember()
var tMem = _movie.newMember(symbol("bitmap"))
The following startMovie script creates a new Flash cast member using the
newly created cast member's
external file, and then sets the cast member's
on the World Wide Web:
on startMovie
flashCastMember = new(#flash)
member(flashCastMember).pathName = "http://www.someURL.com/myFlash.swf"
end
When the movie starts, this handler creates a new animated color cursor cast member and stores
its cast member number in a variable called
castMemberList
on startmovie
customCursor = new(#cursor)
member(customCursor).castMemberList = [member 1, member 2, member 3]
cursor (member(customCursor))
end
These statements from a parent script include the
parent script is a script cast member named Bird, which contains these handlers.
on new me, nameForBird
return me
end
on fly me
put "I am flying"
end
The first statement in the following example creates a child object from the above script in the
preceding example, and places it in a variable named
bird fly by calling the fly handler in the Bird parent script:
myBird = script("Bird").new()
myBird.fly()
This statement uses a new Bird parent script, which contains the property variable
property speed
on new me, initSpeed
speed = initSpeed
return me
end
on fly me
put "I am flying at " & speed & "mph"
end
418
Chapter 12: Methods
newMember
property so that the cast member's assets are stored in an
linked
property of the newly created cursor and to switch to the new cursor.
will contain the member reference to the cast
property to the location of a Flash movie
pathName
. This variable is used to set the
customCursor
handler to create a child object. The
on new
. The second statement makes the
myBird
command, sets the
new
:
speed

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Director mx 2004

Table of Contents