Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What would happen if a behavior is added to the stage?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi there, I have a silly question...
what would happens if a behavior script is added to the stage...

Infact, I want to detect the click location during a presentation... and I wrote a behavior script like this:

on mouseup
alert "Attention !!!"
if the clickLoc.inside( someRect ) then
playSound_subroutine -- play some sound effect
end if
end mouseup

and set the "type" property in the to behavior inspector to "behavior"...
then I drag-and-drop this behavior to the stage...
but when I play it and click on some empty space on the stage..., nothing happen... the alert function doesn't works and no sound is being played(assume that the playSound subroutine works fine. ^^)

Can someone help??
 
Use a mouseDownScript. Basically you will be able to define a script to run when the mouse is clicked. Full details in lingo dictionary.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top