Using ActionScript 2.0 Components |
|
|
|
| Creating an Application with Components > Create the checkout screen > Add an event listener to the Checkout button | |||
Now you will add code to display the Checkout screen when the user clicks the Checkout button.
// When the Checkout button is clicked, go to the "checkout" frame label.
var checkoutBtnListener:Object = new Object();
checkoutBtnListener.click = function(evt:Object) {
evt.target._parent.gotoAndStop("checkout");
};
checkout_button.addEventListener("click", checkoutBtnListener);
This code specifies that, when the user clicks the Checkout button, the playhead moves to the Checkout label in the Timeline.
|
|
|
|