PDA

View Full Version : Drawing a set image wherever the user clicks


maxgallagher
02-27-2004, 09:15 AM
Hey, I am totally new to Flash. Just started it this semester in school. So here's a dead-easy question for anyone kind enough to help me out...

Basically what I want to do is have three or four different images, and whenever the user clicks on the screen it draws one of those images centered on where they clicked.

It seems like it should be simple to do. I can't quite figure out how, though. Any tips would be appreciated.

Cheers,
max

maxgallagher
02-27-2004, 01:31 PM
update:

ok, i figured out how to create movie clips and have them duplicated wherever the user clicks. Here's the next problem.

What I want to do is have a page where the text is the same colour as the background, and thus invisible. When the user clicks, I want the movie clips (which are just static, simple shapes) to be duplicated /underneath/ the text, so that they make it visible.

Problem right now is the duplicated movie clips are all created on top of all the existing layers.

Any thoughts?

scousehouse
02-27-2004, 02:25 PM
Can you not put the text on the top layer? If not, you could try the 'loadmovie' command...er, depending on how new to Flash you are, that might be a bit difficult but not TOO difficult...

Alternatively:

Layer 1(at the bottom): background
Layer 2: picture
Layer 3(on the top): text

divarch
02-27-2004, 08:09 PM
Put the text in a movieclip, and use 'swapDepth()' method when U want to reveal it.

maxgallagher
02-27-2004, 11:02 PM
Ah, thanks divarch! That's exactly what I was looking for. Works perfectly.

Much appreciated! :D

annexion
02-27-2004, 11:39 PM
You could use a textfield object and toggle it's _visible property...

That way you're not having to reference two instances for every switch.