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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

including swf files on keypress

Status
Not open for further replies.

defboyuk

Technical User
Jan 6, 2006
14
GB
hi i posted a few days ago about sound on keypress and i cant work out now how to assign an swf clip to my opn keypress code... whats the handle etc? any code ideas?
 
ive made a seperate (small) swf clip and want it to play when a key is pressed.
 
In this example if you press "p" then the Flash movie in the sprite 1 starts playing.

[tt]-- Movie script
on startMovie
sprite(1).stop()
the keyUpScript = "handleKeyUp"
end startMovie

on handleKeyUp
if the key = "p" then
sprite(1).play()
end if
end handleKeyUp
--[/tt]

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top