PDA

View Full Version : Loading onclip events in a loaded movie



brapoport
February 4th, 2003, 06:34 PM
Ok here it is. I'm very new to flash, and need your guys help. I have a timeline, with an instance iDropZone. I am loading an SWF into that instance. The .swf that i'm loading has an OnClip (MouseUp) event in its Action script. Which i use to open a new browser window when the clip is clicked. When I run the swf by itself it works fine, but when I load it into my main movie, the blank window opens even if I click outside of the iDropZone. I understand that it has to do with the path to target. But Flash gives me an error when i do _root.iDropZone.OnClipEvent....
Any ideas on how to work this out?

Thanks
Boris

kode
February 4th, 2003, 07:34 PM
well .. the mouseDown and mouseUp events checks whenever the mouse is up or down in the whole movie .. no matter where the action is if your press or release the mouse the action is executed

use press and release handlers instead

also note that if you're using those handlers from the timeline it's a little different. example

if you place the actions in some movie clip or button you use
on (release) {
}

if you place the actions in the timeline you use
instanceName.onRelease = function {
}

which also explains why you got the error ..


hope it helps :)