What code are you using and where have you placed it? Are you testing using a browser?
Thankyou very much for your reply.
The code in the .as file I am using is
MC4.Mc3.mcmov.btn.onRelease = function()
MC4 is my main movie clip. In MC4, Mc3 movie slides in and set on a keyframe. mcmov is another movie clip nested in Mc3. And btn is the button nested in mcmov movie clip. And On the same button i need to insert the getURL script. But if I put everything on a single frame the script works fine. But as soon as I animate the movie clips the script does not work.
And in the fla file I have given the script
Above is the structure. Hope you are getting my point. Is there any option to upload the fla and .as file here?? I would have shared it.
If the btn object is not present when that code sets up/executes then it will not be assigned to the btn object... meaning if it lives down some timeline somewhere, it is not present. One way to conquer it is to place the code in the timeline where the btn exists. Another is to always have the btn present but only make it visible (btn._visible = true) when it needs to be.