Drag and goto sene 2

can anyone help please?

I want to drag a button to a rectangle and when i drop it, it’ll go to sene 2 i attached this fla so you get an idea of what i want ant tell me what did I do wrong.

I dont understand the problem fully. I had to do a few things to make it work.

  1. Buttons do not have a _droptarget property.
    Change circle_mc to a movieclip and put your code into frame 1 of the clip in this form…

function onPress() {
function onRelease() {
if (this._droptarget==“whatever”)

  1. If you trace(this._droptarget) you will find that it is not “\rec_mc” but instead…"\rec_mc\rec_mc" . Very strange. I don’t know why flash does this, but I fixed it by using rec_mc as a movie clip instead of a graphic (which was what you had it as). Then trace(this._droptarget) outputs “\rec_mc”.

  2. I couldn’t get the code gotoAndPlay(“Scene 2”, 1) to work from anywhere except the main timeline. So… put it in a function like this on frame one.

function doWhatever()
gotoAndPlay(“Scene 2”, 1);

These are out-of-the-ordinary problems, and I would blame flash not you. The _droptarget property is from Flash 4, and its kind of a pain to use slash notation in MX. As for the scene change problem, thats just inexcusable. You would think a movieclip could tell the maintimeline to switch scenes. Oh well.

I’ve responded a few times to this througout the night. Most of the time I was at work. I know that you can use hitTest to do what you want to acomplish. The hitTest tut here is from Flash 5 and I knew that it had changed. Everything that I thought would work, didn’t. If anyone could tell me why I couldn’t use this line of code, please tell me, it’s killin’ me!!

I saw some tuts that said to do it just like that, but I must be missing something (probably with levels). The attached has a working hitTest on it in dot syntax, but it puts the draggable movieClip in a different level. Boo!!
Here’s the tut that showed me the way. I didn’t go much further because it’s 3:52am, tired…

whew…I’ll still work on it because it’s bugging the crap out of me.


works on my computer

I’m just and amature using flash and action script , but one more question do action script comands work different Flash versions? and thanks for answering my question .
I appresiated

earlier flash versions wont have some commands, and the notation is different (dots or slashes)

other than that i dont think command should behave any differently in different versions.

Yeah, the .fla works. The only thing I don’t like is the layers/levels, but I know I can fix that. Can you see what’s wrong with the code that I typed out above? Cause that doesn’t work and it’s bummin’ me out…


if there is not much problem could you attach the fixed fla so I can see what i did wrong pleasssse?
because I couldn’t made it work.

no prob