This content has been marked as final. Show 13 replies
Your problem is likely somewhere else in your code where you're referring to _root. Try adding _lockRoot=true; to the main timeline of the swf you're loading.
I already have this._lockroot = true; in the main timeline of the swf I'm loading. I also tried lockroot in the calling swf where I load the external swf. That doesn't seem to be the problem.
what are you dropping it on?
I'm basically dropping a word (movieclip) on a picture (movieclip). I'm dragging the movieClip "drag_1_1" onto a drop movieClip "drop_1_1". Is there something I need to watch for on the drop movieClip?
you do see the path.name of (Drop_1_1) when you release Drop_1_1 (after it's loaded into your main swf)?
you are able to drop your Drag_1_1 movieclip?
if yes to both of those, are you sure there's no button overlying your Drop_1_1 movieclip after it's loaded into your main swf?
The eval function returning "undefined" seems to be the problem. The eval works in the original swf file, but not once loaded in the master movie. When I remove the eval function and simply trace the droptarget in the master movie, I get the following :
trace (this._droptarget); shows the path as
trace ("/Drop_1_1"); shows the path as
When I add the eval function, "(eval(this._droptarget));" it comes back as undefined in the master movie even though it works in the swf I'm loading.
do you have any components in your main swf? if so, which?
if none, post a link to your flas and specifiy the location where you load your swf that contains the drag and drop.
I have a ProgressBar component in the main swf. I use it as part of the preloader where I load the external swf which is having the problem.
Here is a link to fla files where I'm having the problem:
I've removed most of the unnecessary parts of the program, just leaving the main program calling the external file, and the external file with the drag and drop.
There is a layer called Learning Module in the main ReadingVocab program. It has a movie called animalsLessonHolder that loads the external swf with the drag and drop.
remove this._lockroot from your external swf. then correct your _droptarget paths.
I don't understand the comment to correct the _droptarget paths. It works as a standalone module. Since they are relative paths, how/why do they need to change when loaded into the main program?
what makes you think _droptarget returns a relative path? the help file is pretty clear about that being an absolute path.
use your trace() function and check. and remove _lockroot from the main file, too.
and _droptarget is a movieclip property, not a button property. but for whatever reason, it still seems to work for buttons.
I removed the button within the movieclip, so I'm just dragging the movieclip with static text. The eval function now works. Thanks.