Results 1 to 7 of 7

Thread: What's the Deal with the Actionscript 3.0 in Flash CS3?

  1. #1
    Join Date
    Aug 2006
    Posts
    28
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default What's the Deal with the Actionscript 3.0 in Flash CS3?

    What did they do to my beloved flash!

    I have just started using Flash CS3 at work, after using Flash MX pro for a couple years now...

    I tried doing something extremely simple, like programming a button event. Click the button, it takes you to 'X' website. After creating the button, I first tried going through the 'behaviors' panel. Flash prompted me saying that I had to use an older version of actionscript.

    I also found it odd that I couldn't use the actions panel either. It said that "actionscript cannot be applied to this object." Or something of that sort...
    I was pretty disappointed with the help material provided. Anybody know why the developers changed up the actionscript? Anybody know how to pull off these simple 2.0 tricks in 3.0?

    I'm a designer, trying to learn how to program...

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by btelecky View Post
    What did they do to my beloved flash! :eek
    They bad it better!

    MX to CS3 is a pertty large jump to make. but once you get used to it, you'll grow to love it. It seems like a pain in the beginning, but believe me, it's SOO much more powerful.

    As for your questions...
    AS 3.0 doesn't support adding events to buttons. I suppose you were trying to do something like:

    Code:
    on(release) {
      getURL("website");
    }
    That's a no no! That's partially why I always tell people here to get away from that convention.

    The more proper way (with AS 2.0) is:

    Code:
    button_mc.onRelease = function() {
      getURL("website");
    }


    Now AS 2.0 vs. AS 3.0

    AS 2.0
    Code:
    button_btn.onRelease = function(){
            output_txt.text = “Button was clicked!”;
    }

    AS 3.0
    Code:
    function eventResponse(evt:MouseEvent):void {
            output_txt.text = “Button was clicked!”;
    }
    button_btn.addEventListener(MouseEvent.MOUSE_UP,eventResponse);

    I know...tedious and looks like nonsense. The mouse events are done in a more verbose if not more confusing way but AS 3.0 is a lot more powerful.

    With that said, there is a "Create a AS 2.0" Project option with CS3 (which I still use almost exclusively).


    For more: http://designfission.com/blog/2007/0...tep-into-as30/

  3. #3
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    MX to CS3 is a pertty large jump to make. but once you get used to it, you'll grow to love it. It seems like a pain in the beginning, but believe me, it's SOO much more powerfu
    And there are those of us that still use Flash 5, Flash 7 (cause 6 sucked) Flash 8 and CS3, and realize how pointless the changes to CS3 are and think the new version is crap.

    I am in that group. CS3 is a proprietary monolithic crap shoot that didn't do anything different except change the EMACs functions. Thus making you use silly code and longer code to accomplish the same thing.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  4. #4
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by BLiZZaRD View Post
    CS3 is a proprietary monolithic crap shoot that didn't do anything different except change the EMACs functions. Thus making you use silly code and longer code to accomplish the same thing.

    In Flash, absolutely agreed! That's why I still stick with AS 2.0 for Flash projects.

    But for some more feature-rich applications using say Flex, AS 3.0 is a godsend.

  5. #5
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Yeah.. but why re-invent the wheel, when a little JS or PHP can accomplish the same thing
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  6. #6
    Join Date
    Aug 2006
    Posts
    28
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I ended up using actionscript 2.0 for my behavior. So I just needed to make an invisible button with an 'on release' behavior to go to a URL. But for some reason when the button is clicked, nothing happens. I am no flash expert, but I am far from a novice. I don't understand why these simple things won't work, the way that they should. I hope that this isn't another CS3 type glitch.

    on (release) {

    //Goto Webpage Behavior
    getURL("http://www.adobe.com","_blank");
    //End Behavior

    }

  7. #7
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by btelecky View Post
    on (release) {

    //Goto Webpage Behavior
    getURL("http://www.adobe.com","_blank");
    //End Behavior

    }
    That should work...
    Are you sure it's on the right movieclip?

    Try adding the AS to a frame instead of the actual MC.
    Code:
    button_MC.onRelease = function() {
      getURL("http://www.adobe.com", "_balnk");
    }
    where button_MC is the instance name for the movieclip that you want to act as the button

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •