Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: It's time to start using external code

  1. #11
    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 evan View Post
    I did catch something I missed from the document class tutorial in the properties I forgot to set up the script in the Document class window. It figures it would be something dumb like that.

    How do I create more than one script and appy it to an fla?
    Are you still working on your drawing application? If so, the schematic would look something like this:

    A class for the pencil tool is attached to your pencil movieclip/object.
    A class for the eraser tool is attached to your eraser movieclip/object.

    It's called object oriented programming for a reason.

    If you need to call multiple classes within your Document class, use the import directive.

  2. The Following User Says Thank You to Medyman For This Useful Post:

    evan (11-11-2008)

  3. #12
    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
    hmmm... interesting. In 3 versions of Flash we went from not using .as at all to relying on them completely.. funny.
    Doesn't it have to? Adobe is adding a lot more power to the timeline -- CS4 is an example. But, as Flash gets more powerful as a platform, it has to increase the flexibility, extensibility and capability of ActionScript.

    I don't think that it's a matter of relying on AS completely, but that's where more of the innovation is going to be in the future.

  4. #13
    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

    don't misunderstand me... :P I meant relying on the external .as files, not AS itself.

    Other than organizational abilities I see nothing wrong with putting script on the MC or timeline as needed. But Adobe is making it so we MUST use external files for the projects.

    Not saying it's a bad thing, just something I have noticed.
    {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

  5. #14
    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
    don't misunderstand me... :P I meant relying on the external .as files, not AS itself.

    Other than organizational abilities I see nothing wrong with putting script on the MC or timeline as needed. But Adobe is making it so we MUST use external files for the projects.

    Not saying it's a bad thing, just something I have noticed.
    Oh...I see what you mean. Sorry about the confusion.

    To your point though, it's not so much Adobe that's making it so we MUST use external files. You can still do everything within Flash.

    The desire for using external AS files is two-fold:
    1) More organization through OOP
    2) Better coding environment. The Flash IDE has been horribly neglected. If nothing else, they should just merge in the Flex 3 IDE into Flash.

  6. #15
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default

    actually you don't even have to rely on them completely. As I have been learning to code I have been doing all timeline based code -but as my project grew I realized down the road I will evidently need to take this step.

    3000 lines and counting...........

    I use alot of comments and keep it clean but it will have advantages once I figure this out.

    Hard core coders do this almost exclusively.

  7. #16
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default

    A class for the pencil tool is attached to your pencil movieclip/object.
    A class for the eraser tool is attached to your eraser movieclip/object.

    It's called object oriented programming for a reason.
    tha's where this is going

    unless I use several different .as files and place them in a folder

    keeping the files seperate also allows work to be shared and edited instead of having poeple take turns on the same .as file or swf


    as it is now I have it all in one .fla in one script -a pain to edit -great for learning how to code but the project needs to be planned better now.

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
  •