Prev: Simple Flash
Next: Advice
From: clbeech on
sorry but you will need to do so if you're going to use Flash. so the first
thing to decide is: are you going to use ActionScript2 or 3?

in AS2 we use the getURL method - with an 'onPress' handler for you button -
however you also need to place your scripts on the timeline - so make a new
layer above the 'button' and call it a'ctions' - you will also need to place an
'instance name' on your 'button' -select in on the Stage and in the properties
panel enter a name in the box - then we use that name to 'point' to the element
when writing scripts. so for a 'linking' button - select the first frame in
the 'actions' layer and open the actions panel (F9) and then we'd type:

my_btn.onPress = function() {
getURL('http://www.thesite.com', '_self');
}

where 'my_btn' is the instance name of your button, and obviously the address
is where you navigating to.

now using AS3 it's a bit different - but similar rules apply - an actions
layer, and instance name but the script in will be written like:

function navTo(event:MouseEvent) {
var site:URLRequest = new URLRequest('http://www.thesite.com');
navigateToURL(site);
}
my_btn.addEventListener(MouseEvent.CLICK, navTo);

as you can see the two are quite different - however if I were you and you are
purchasing CS3 and just beginning your study - I would learn the newest
language AS3 - because although it is a bit more complicated it is a far more
powerful tool and up-to-date with the latest OOP standards.

 | 
Pages: 1
Prev: Simple Flash
Next: Advice