Flash Help (1 Viewer)

3bor

Member
Joined
Jul 23, 2005
Messages
46
Website
www.3bor.net
Hey , just wondering if there is a way to control movie clips in flash using your keyboard. I know you can use the arrows and a few other keys but was wondering if you can say, play a movie clip by pressing a on your keyboard and another using s etc.
Any help is appreciated. :)
 
okay. you can...

an example:

say you want a particular movie clip to play when you press "a" or whatever.

• make a movie with a stop(); action on the first frame
• drag it onto the stage
•*highlight the clip, give it the following action

on (keyPress "a") {
this.gotoAndPlay(2);
}

if you want to play an embedded movie inside that one I guess you could use instance names etc. to target different movies... yadda.

hope this helps!
 
Cool, good to know its possible but how hard will it be to do, my action script skills aren't too flashy.:rolleyes:
I want to make something like a sampler to put in an intereactive song type thing. I did something small here
Theres no preloader so u might have a blank screen for a bit.
Its not for a job or anything so theres no deadline , just thought it would be a fun thing to have on the website.
I was thinking of having a photo of a keyboard with letters on the keys and you press the keys to play the notes.
Anyway thanks for the help.
 
Thanks ill try that out , I think i may have tried something similar yesterday with the keypress but it say the key was not valid or something.
Ill try that one though , thanks.
 
Hey thanks Plug that works. Now i just have to build a flash sampler instrument.
That other detector looks interesting but alot more complicated.
Thanks for the help.
 
3bor said:
Cool, good to know its possible but how hard will it be to do, my action script skills aren't too flashy.:rolleyes:
I want to make something like a sampler to put in an intereactive song type thing. I did something small here
Theres no preloader so u might have a blank screen for a bit.
Its not for a job or anything so theres no deadline , just thought it would be a fun thing to have on the website.
I was thinking of having a photo of a keyboard with letters on the keys and you press the keys to play the notes.
Anyway thanks for the help.
nah, it's very simple really... there are probably a lot of different ways to do it, but the quickest way would be to create a different movie for each key. each movie containing a stop(); command on frame one, and a sound starting on frame 2. plus graphics etc. I suppose... then give each movie clip the code as above, each with its own assigned key. note: don't put this actionscript into the movies; drag the movies into the timeline, select them and assign the actionscript there. I guess the on () command is a way of assigning the same type of control to movie clips as with buttons... I suppose.

this is probably a bit of an antiquated approach to a certain degree; more than one way to skin a cat etc., but it's simple, fast and I assume it'll work just fine. try it out.. any problems let us know!
 
Yeah the simplest way is the best and if theres any mistakes it should be handy enough to fix. Just lots of copying and pasting of the same code , i like it. :)
I'll let you know when i finish it , all i have at the moment is a photo of the keys of my piano.
Thanks again for the help.
 
Plans-20993.jpg
 
Anyone have a good link for basic action script in flash 8 actually?
Its driving me a bit crazy at the moment, cant seem to get the most simple thing to work properly.Thanks!
 

Users who are viewing this thread

Activity
So far there's no one here
Old Thread: Hello . There have been no replies in this thread for 365 days.
Content in this thread may no longer be relevant.
Perhaps it would be better to start a new thread instead.

Support thumped.com

Support thumped.com and upgrade your account

Upgrade your account now to disable all ads...

Upgrade now

Latest threads

Latest Activity

Loading…
Back
Top