-
(Flash 8) Drag and Drop Targets/Main timeline
In all of the drag and drop tutorials I've looked at, when you drag the object to the target, It goes to a keyframe within the target's timeline. Instead, how would I make the playhead switch to a different keyframe in the main timeline? This is the code I am working with (Inserted into the drag-able object):
on (press) {
startDrag (this, true);
}
on (release) {
stopDrag ();
if (this._droptarget == "/target") {
_root.target.gotoAndStop(2);
}
}
The '_root.target.gotoAndStop(2);' part makes it go to frame 2 inside "target" (which is a movie clip), but i'd like it to go to frame two in the main timeline. How would I edit the script to make this happen? Ahaha... the board description said nothing is a stupid question. I hope that holds true. Thanks for any help! (By the way I'm working on a simple flash game, but i'm pretty inexperienced with actionscript)
-
Senior Member
hi annelili, can you post the .fla?
-
Senior Member
try removing the word .target from the _root.target.gotoAndStop(2)
i.e
PHP Code:
_root.gotoAndStop(2)
-
Originally Posted by EQFlash
try removing the word .target from the _root.target.gotoAndStop(2)
i.e
PHP Code:
_root.gotoAndStop(2)
Thank you so much! That seems to have done the trick.
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
|