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.
thankyou
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.
thankyou
hmm
I dont understand the problem fully. I had to do a few things to make it work.
function onPress() {
this.startDrag(false);
}
function onRelease() {
this.stopDrag();
if (this._droptarget==“whatever”)
doWhatever();
}
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”.
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!!
[AS]
onClipEvent(enterFrame){
if(this.hitTest(_root.brown)){
_root.textbar=“hit”}
else{
_root.textbar=""}
}
[/AS]
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…
http://www.informit.com/isapi/product_id~{7171FE6E-FE0D-4706-B08C-C2BBF1EE3227}/element_id~{FB477920-5822-44D1-AC6F-98FF608EAC8B}/st~{2468EBAC-018A-401F-A52B-D23A1FD08348}/content/articlex.asp
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.
clownstaples:
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…
clownstaples,
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.
thanks:rambo:
no prob
:: Copyright KIRUPA 2024 //--