-
1. Re: Nested movie clips with buttons and external .as file hyperlink for buttons not working
Ned Murphy May 30, 2014 10:19 AM (in response to ManC_FLASH)What code are you using and where have you placed it? Are you testing using a browser?
-
2. Re: Nested movie clips with buttons and external .as file hyperlink for buttons not working
ManC_FLASH May 30, 2014 12:52 PM (in response to ManC_FLASH)Hi Ned,
Thankyou very much for your reply.
The code in the .as file I am using is
MC4.Mc3.mcmov.btn.onRelease = function()
{
getURL("http://www.google.com", "_blank");
}
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
#include "style1.as"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.
-
3. Re: Nested movie clips with buttons and external .as file hyperlink for buttons not working
Ned Murphy May 30, 2014 2:45 PM (in response to ManC_FLASH)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.


