Groups | Blog | Home
all groups > flash actionscript > february 2004 >

flash actionscript : Drag & Drop


jwalds
2/21/2004 7:19:13 PM
Hi, I've been having a problem with this for awhile now - any help is much
appreciated.

I have a record player which can be found here:
[L=http://jesse.gnsdeca.com/7up2/turntable]http://jesse.gnsdeca.com/7up2/turntab
le[/L]

As a standalone .swf it works fine, however when I try to import it into
another movie using the loader component..the turntable loads but I cannot pick
up, drag, and drop the records as I can in the standalone turntable.swf. The
actionscript attached to the records is as follows. If anybody can help me I
would appreciate it! Thanks!



on (press) {
startDrag("/PF03", true);
if (getProperty("/PF03", _droptarget) eq "/target") {
tellTarget ("_root") {
gotoAndPlay("F02#3");
}
}
}
on (release, dragOut) {
stopDrag();
if (getProperty("/PF03", _droptarget) eq "/target") {
tellTarget ("_root") {
gotoAndPlay("Freitag#3");
}
}
}
ShadowKnyte
2/22/2004 11:53:56 PM
When you attach a movie into another movie be carefull when you reference
'[b]_root[/b]' as it will point to the 1st movieclip and not the one that is
embedded as a 2nd movieclip. In you situation it is best to name your movieclip
you are attaching so you can reference it by that name to control its
properties etc.
jwalds
2/22/2004 11:56:40 PM
jwalds
2/23/2004 12:03:10 AM
In replacing instances of "_root" in the actionscripting with "Turntable", the
name of the movie clip. I get the following error when testing the movie:
Target not found: Target="Turntable" Base="_level0.PF03". If anyone is willing
to take a look at the .fla for the turntable the file is attached to this post.
Thanks.
AddThis Social Bookmark Button