This content has been marked as final.
Show 2 replies
-
1. Re: Make layer a link?
Rob Dillon Jan 25, 2008 6:08 AM (in response to superflashlove)A layer is simply a space in the timeline. It may contain frames. In any given frame you can place an instance of a symbol. If you name the symbol instance then that instance can be addressed by actionscript. In actionscript you can define a function that will cause an internet call to occur.
If you place an instance of a movieClip or a button in a frame and give that instance a name then you can attach actionscript to it.
AS2:
instanceName.onRelease = function() {
getURL("yourURL.com");
}
AS3:
instanceName.addEventListener(MouseEvent.MOUSE_UP,NavigateToURLExample);
function NavigateToURLExample(Event:MouseEvent):void {
var url:String = "yourURL.com";
var variables:URLVariables = new URLVariables();
var request:URLRequest = new URLRequest(url);
navigateToURL(request);
} -
2. Re: Make layer a link?
Promethe2000 Nov 11, 2013 5:03 AM (in response to superflashlove)First you should make a visible (transparent) button on your banner. (Insert -> New Symbol (select button)
When you see your button on the group toolbar on right side, drag and drop your button on to your Scene. Make sure this button cover to all your banner. After that right click this transparent button on to scene and select action. Write this script :
Example:
on (release) {
getURL ("http://www.myurl.com", target="_parent");
}
İf you want to use this banner with an html in the frame, and you want to open page on same window, you shoul use target="_parent". If you want to open a new window, you should use target="_blank"


