Accessibility
 
Home > Products > Director > Support > Basics of Director 3D
Macromedia Director Support Center - Basics of Director 3D
Animating the sphere

Once the texture has been added, click the line of text that says "Set the Sphere in Motion" to run the Spin script. That script contains the following Lingo:

property pActive

on beginSprite(me)
    pActive = FALSE
end beginSprite

on mouseUp(me) 
    pActive = TRUE 
    go next  
end

on enterFrame(me)
    if pActive then
        tSprite = sprite(1)
        tMember = tSprite.member
        tMember.model("newSphere").rotate(0,0,-5)  
    end if
end

Here is what this script does:

When the user clicks the text sprite, the script sets pActive to TRUE , which causes the sphere to spin.
The script then rotates the sphere 5 units at each enterFrame event.

To Table of Contents Back to Previous document Forward to next document