|
Interactive Digital Multimedia
Instructor: Barbara Lattanzi
LINGO
Examples of navigation:
on exitFrame me
go to frame 30
end
on mouseUp me
go to frame "my next video"
end
Examples of event handlers for "behavior" scripts
- on mouseEnter me
- on mouseLeave me
- on mouseDown me
- on mouseUp me
- on exitFrame me
Note that any event handler is followed by any number of "statements" (commands), completed with the keyword "end".
Example:
on mouseUp me
sprite(me.spriteNum).member = "red ball"
end
Examples of some properties for graphic sprites
- .blend -- refers to fading in and out a sprite (percentage)
- .rotation --refers to rotation of sprite
- .height -- height of sprite
- .width -- width of sprite
- .locH -- same as the ._x property in Flash
- .locV -- same as the ._y property in Flash
- .member -- you can change the cast member associated with any sprite by changing this property
- .visible -- toggle the visibility of the sprite on and off by setting this property = TRUE or FALSE
Example:
on exitFrame me
sprite(15).locH = sprite(15).locH + random(10)
sprite(3).blend = sprite(3).blend - 50
go to frame "choice 3"
end
Examples of properties for quicktime video sprites
- .locH, .locV, .member, .height, .width -- same as with graphics (above)
- .movieRate --refers to speed of video. This can be a positive or negative number, and can be a decimal number
- .movieTime -- refers to the time location that the video can be made to start at or jumpt to, triggered by any event handler.
- .member.filename -- refers to the external video file associated with the castmember. This can be changed, triggered by any event handler. (Note that for the screen to redraw, you may need to move the playback head to another frame. Another strategy is to force a screen redraw with the simple command statement: the stagecolor = the stagecolor)
- .member.directToStage -- a TRUE or FALSE property value. The benefit of a FALSE value is that you can layer graphics on top of the video. Disadvantage is that you cannot have the video's sound play.
- .member.sound -- a TRUE or FALSE property value, to toggle the video's soundtrack on or off
- .member.video -- a TRUE or FALSE property value, to toggle the video's video track on or off (the sound will continue to play)
- .member.duration -- a measure of duration of the quicktime video.
- .member.filename -- at the start of the movie associate the castmember with the quicktime video that you want in the castmember slot. During the movie change the quicktime video that you want in the castmember slot (and, therefore, the sprite "child" of the castmember will change too.)
Examples of sound actions
- turn on sound with this script:
puppetSound "soundcastmembername", systemsoundchannelnumber
example: puppetSound "bird song", 2
- turn off sound with this script:
example: puppetSound "bird song", 0
- fadeIn sound with this script:
sound(systemsoundchannelnumber).fadeIn(milliseconds)
example that fades in a sound over 2 seconds:
puppetSound "bird song", 2
sound(2).fadeIn(2000)
- fadeOut sound with this script:
example that fades out a sound over 3 seconds:
sound(2).fadeOut(3000)
|
|