-
can't link to self
Hi!
Can anyone see a reason why When I put in this code I get buttons that do nothing? Not even sending me to the url in a new page.
var url1:String = "necessity.html";
var request1:URLRequest = new URLRequest(url1);
bl1_mc.addEventListener(MouseEvent.CLICK, ftemp3);
function ftemp3(e:MouseEvent):void{
try {
navigateToURL(request1, "_self");
} catch (e:Error) {
trace("Error occurred!");
}
}
-
If you're using standard button, you can't add MouseEvent.CLICK to it. Use ComponentEvent.BUTTON_DOWN instead
-
thanks, but I'm using MovieClips for the buttons
-
What's the structure of this movie clip?
Does it contain any children?
-
Its an imported png file I f8-ed into a MovieClip- nothing special. I also applied a code to make it grow on mouse over and get small again on mouse out and it works OK
-
have you tried running it without this mouseover effect?
-
it shows me
SecurityError: Error #2137
so if you are using the _self, then try not use _self, but some JS workaround
Flash -> button -> click -> JS -> redirect page
--
there is a place for those who dare to dream...
Flash Developer
VISTAPARK GMBH
BÄRENSTRASSE 11-13
D-42117 WUPPERTAL
-
or
go here: http://goo.gl/Hwz9V
And set the trusted folders, where all your project are. it will solve the problem.
Last edited by ifmi; 03-13-2011 at 07:19 AM.
--
there is a place for those who dare to dream...
Flash Developer
VISTAPARK GMBH
BÄRENSTRASSE 11-13
D-42117 WUPPERTAL
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|