Adobe 65036570 - Director - PC User Manual page 296

User guide
Hide thumbs Also See for 65036570 - Director - PC:
Table of Contents

Advertisement

if ( sprite(me.spriteNum).locH > window("stage").rect.right ) then
sprite(me.spriteNum).locH = window("stage").rect.left
else
sprite(me.spriteNum).locH = sprite(me.spriteNum).locH + 5
end if
end
on mouseUp me
sprite(me.spriteNum).foreColor = random(255)
sound(noise)
end
on getBehaviorDescription(me)
return "This changes sprite position"
end
on getPropertyDescriptionList(me)
description = [:]
description[#movement] = \
[#default: 5, \
#format:#integer, \
#comment: "Set motion to the right:", \
#range: [#min:1, #max:10] \
]
description[#noise] = \
[#default:"", \
#format: #sound, \
#comment:"Sound cast member name" \
]
return description
end
// JavaScript syntax
function enterFrame() {
if (sprite(spriteNum).locH> _movie.stageRight) {
sprite(spriteNum).locH = _movie.stageLeft
} else {
sprite(spriteNum).locH += movement
}
}
function mouseUp() {
sprite(spriteNum).foreColor = Math.floor(Math.random())*255
sound(noise)
}
function getBehaviorDescription() {
return "This changes sprite color and position"
}
function getPropertyDescriptionList {
description = new Array();
description["Movement"] = new Array();
description["Movement"]["default"] = 5;
ADOBE DIRECTOR 11.0
285
User Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Director 11

Table of Contents