How to solve this problem?
hi, i was making this button... the button(my_site_btn) when clicked, goes to a website(URLRequest class)
i want this button enabled only when clicked another button(enable_btn) like toggle button...
i did everything, but the problem is when the button(my_site_btn) is false then also it goes to the link.
this is the code i have been working on(i didn't use any package, i just placed it on timeline)
| my code |
|---|
import flash.events.MouseEvent; import flash.net.URLRequest; my_site_btn.enabled=false; enable_btn.addEventListener(MouseEvent.CLICK, enable_site); my_site_btn.addEventListener(MouseEvent.CLICK, gotomysite); function enable_site(event:MouseEvent):void { my_site_btn.enabled=!my_site_btn.enabled; } function gotomysite(event:MouseEvent):void { navigateToURL(new URLRequest("http://google.com"), "_blank"); } |
do i have to use if/else conditionals?
and this is my swf file.
thank you.....
