Reputation:
I am new to flash..i need a code which redirects to a asp page on clicking a flash button..please tell me where i have to write that code
Thanks in advance
Upvotes: 0
Views: 1198
Reputation: 571
It depends on if you are writing Actionsscript 2 or 3. And also there are some different ways to do it but here is my recommendation for you:
Select your button and set instance name e.g "myButton" in properties panel.
In frame 1 in the main timeline enter:
// AS3 myButton.addEventListener(MouseEvent.CLICK, myButtonFunction); function myButtonFunction(event: MouseEvent) { var request:URLRequest = new URLRequest("http://www.example.com"); navigateToURL(request); }
// AS2 myButton.onRelease = function() { getURL("http://www.example.com"); }
Upvotes: 1
Reputation: 3835
Scoll to end of timeline where u have stop(). Replace with:
getURL("http://URL_HERE");
Upvotes: 0