|
-
Hi...
I wanna drag an object...when drop/release...i want to
goto scene 2.
I just cant remember the way to do this ?
Here is my actions....("/dyna") is the dragable movieclip.
Everything works exept the (goto next scene)..so whats wrong ?
___________________________________
on (press) {
startDrag ("/dyna");
}
on (release) {
gotoAndPlay ("Scene 2", 1);
stopDrag ();
}
___________________________________
-
Senior Member
Try having a framelabel at the beggining of the next scene.
then gotoAndPlay("startofscene2").
Regards,
Leo Lima
-
Hi Leo Lima....
Thanx for helpin out, I just tryed the "lable" thing in
ur suggestion....but no luck.
Any other suggestions ?????
Thanx.
Tor
-
Hi.....
Does anybody else know how to do this ?
Please help me
Tor
-
Is it at all possible ???
help?
Tor
-
hehe =)
This is my code =)
on (press) {
startDrag ("/dyna");
}
on (release) {
tellTarget ("_root") {
gotoAndStop ("scene2");
stopDrag ();
}
}
So the thing is u have to do is to go back to your root and do a blank keyframe (i have put a label on it called "scene2")
On the label u can tell go to scene 2 and play =)
That s it =)
Cya.
-
Hi pixel_in_motion.....
Thanx for responding.. 
excuse my lack of actionscript nowhow....but i dont
uderstand this part:
tellTarget ("_root") {
"go back to your root "
??? wel.....i guess i need a step by step guide.
Tor
-
_root is the main timeline-you could also try / or ../
-
ok
easy =)
Imagine u are on a hard drive 
a schema:
________________
________________
+ROOT
- scene 01
- scene 02
- movie clip dyna
-button (in the movie clip)
________________
________________
Sorry I ll have to say :
U have to go back to your scene01 and do a blank keyframe (i have put a label on it called "scene2")
SO:
u tell the button to go to scene02 but scene02 is not in the same "directory" . so u "tell target" and like the target is scene01 u just have to tell to go bak to "_root" this way u can command action on the scene01 =)
Hope u understand my way of thinking...
sorry for the lack of explanations but english is not my native language =/
Cya =)
-
-
Drag and Drop and Action!? but where?
Pixel-in-motion!
I tried that your script and did it work!
you cannot imagine how happy i was...
but i have further problem.
Action happens everwhere when i release the mouse.
I guess i have to set property? but how?
Do i have to give then an exact number of x and y position?
Since i am a kind of biginner,
I really appreciate if you or anybody can explain to me with simple words....
Thank you in advance!
-
yes
yes you need to constrain it to coordinates or anytime you push, but I didn't really look at the script. Is it set on clip event in flash 5 or is this in the main timeline or on a button in a movieclip?
-
..
Hey leo
Of course it happens anywhere...
U have to define a hit test if u want to drop the movie clip on a specific zone and then play the action u want. So if pos_x of movie clip = pos_x of the hit zone then go to and play blablabla if pos_x different than pos_x of hit then go to frame 1 or all u want.
The best way is to make a button with only a hitzone (no shape in the other states of the button only the hit one) like that u can view ur testzone on the movie while creating it, but can t see it when u render the movie =)and like that u can scale ur hitzone (that is the way to do a puzzle and adjust the difficulty : more tiny hitzone = more hard puzzle)
Hope this give you some tips on how to do that and open u some new ideas .
Damn 07H35 AM here just wake up hope my english is not that bad in the mornin lol =)
Cya.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|