A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: going from as2 to as3

  1. #1
    Member
    Join Date
    Jan 2008
    Posts
    82

    going from as2 to as3

    I'm moving an application from Flash 8 to Flash 9.
    When I tried running the copied/pasted code in Flash 9 I got a huge number of errors (as was expected).
    One type of output error I get is this:
    "The component 'ComboBox' requires ActionScript 2.0"

    I get this same error for TextInput, TextArea, and Button.
    How can I solve this problem? I'm sure it's merely a coding syntax issue 'cause of AS3 more of a Java-like structure.
    Thanks in advance.

  2. #2
    Junior Member
    Join Date
    Jul 2007
    Posts
    9

    You need to change the components from Flash 8 to Flash 9

    You need to change the components from Flash 8 to Flash 9. The Flash 8 components are bundled with all the AS2 inside of them. These won't work with the new language changes. Just drag them from your library and then rewrite the code from there.

    Thanks,

    Curtis J. Morley
    Get all your Flash Errors solved.

  3. #3
    Member
    Join Date
    Jan 2008
    Posts
    82
    Does this mean I have to "redraw" all the components (buttons, textareas, etc) from within Flash 9? All buttons are custom images. I dragged all those components from flash 8. So if I understand correctly....I should kill all that stuff and redo them in Flash 9.

    Thanks again.

  4. #4
    Member
    Join Date
    Jun 2008
    Posts
    30
    you don't have to redraw the buttons and stuff just need to recode the actionscript

  5. #5
    Member
    Join Date
    Jan 2008
    Posts
    82
    I ended up doing it all from scratch again anyway....there was some stuff I wanted to change. Thanks again for the help.
    While you're here...I was wondering if you know a good way to have dragable graphics for a whiteboard. I did make a very simple whiteboard for the first Flash 8 app...but I really need to add a series of math symbols that can be used in the new whiteboard. I don't really want to have movie clips for each symbol....but I also don't want to have predefined coordinates like I tried with Flash 8. Do you know of anything in CS3 that might work for me?

    Thanks....yet again.

  6. #6
    Member
    Join Date
    Jun 2008
    Posts
    30
    I think this should work

    function initDragger(mc:MovieClip):void
    {
    mc.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    mc.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    }

    function mouseDownHandler(e:MouseEvent):void
    {
    e.currentTarget.startDrag();
    }
    function mouseUpHandler(e:MouseEvent):void
    {
    e.currentTarget.stopDrag();
    }

    // Set up drag
    initDragger(boxMC);
    Last edited by dukes90; 06-05-2008 at 05:42 AM.

  7. #7
    Member
    Join Date
    Jan 2008
    Posts
    82
    ahhh...cool. I'll definitely give that a try....thanks.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center