Method 1(in button) :-
on (release) { getURL("http://www.zopy.blogspot.com", '_blank'); }
Method 2 (in action panel) :-
zopylogo.onRelease = function(){ getURL("http://www.zopy.blogspot.com", '_blank'); }
AS3 :-
import flash.events.MouseEvent; import flash.net.URLRequest; import flash.net.navigateToURL; zopylogo.addEventListener(MouseEvent.MOUSE_UP, onClick); function onClick(e:MouseEvent):void { var click_url:String = "http://www.zopy.blogspot.com"; if(click_url) { navigateToURL(new URLRequest(click_url), '_blank'); } }
Note :- _blank :- redirects another tab
_self :- redirects same tab
If you want to link to an email address you use the same code as above in AS 2 and 3 but you replace the object with 'mailto:yourMail@yourEmail.com'.
AS 2
AS 3
No comments:
Post a Comment