1 Reply Latest reply on May 4, 2008 7:53 AM by clbeech

    About flash, help

    konary Level 1
      I downloaded a trial version to get to know the software while I WAIT on corporate to buy it but I am having trouble with something as simple as creating a link. I created a button but I can't figure out how to make it link to something. I looked in the help section but all of this action script jargon is CONFUSING! I don't want to have to type in any functions in order for my link to work.

      funny cats
        • 1. Re: About flash, help
          clbeech Level 3
          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');
          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.