rameshV
rameshV

Reputation:

Redirect a asp page clicking on flash button

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

Answers (2)

amoeba
amoeba

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

waqasahmed
waqasahmed

Reputation: 3835

Scoll to end of timeline where u have stop(). Replace with:

getURL("http://URL_HERE");

Upvotes: 0

Related Questions