A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: actionscript confusion (flex - flash)

  1. #1
    Member
    Join Date
    Oct 2008
    Posts
    48

    actionscript confusion (flex - flash)

    Hello

    I have recently started learning flash (actionscript 3).

    I've been wondering if its possible to compile .as (actionscript files) using just flash cs3 or do I need flex for that? If yes, how can I do that? Is there any good tutorial online? Maybe a right phrase that I should search for?

    If no, how is it possible to extend the own flash project with using those actionscript source files?

    I've been searching internet but couldnt find an answer.

    Many thanks in advance!

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    You don't need Flex for that. There are many tutorials. Check the resource thread of this forum.
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    You can compile .as files using just flash. All you have to do is set your Document class to the main class of your code. It must extend Sprite or MovieClip.

  4. #4
    Member
    Join Date
    Oct 2008
    Posts
    48
    So there are no limitations when doing this with flash?

  5. #5
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    Well, you don't have the flex specific libraries. What other limitations were you thinking of?

  6. #6
    Member
    Join Date
    Oct 2008
    Posts
    48
    I think I read somewhere there can be only one class in this .as file and no nested classes?

    Is there any possibility to use the flex specific libraries as well?

  7. #7
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    Yes, one class per .as file. But you can have as many .as files as you want. The ones that are necessary to compile will automatically be compiled and included.

    You could technically download the flex sdk and use the classes, but it's an entire framework, and if you want those classes you should probably be using flex in the first place.

  8. #8
    Member
    Join Date
    Oct 2008
    Posts
    48
    So if I want to include the rest I need to specify that inside the main .as file?

    Are there the same restrictions for flex - one class per file?

  9. #9
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    No, you only need to include when the class you're trying to use is in a different package. Otherwise it'll automatically be found as long as it's on your classpath.

    Flex has the same one class per file restriction.

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