Skip navigation
Currently Being Moderated

What is the best approach to multi-platform development on Flash Pro CS6?

May 25, 2013 9:41 AM

Tags: #as3 #android #ios #browser #flash_professional #cs6 #best_practices #game_design #app_design

Hello everyone,

I have been writing Flash games for a while and now I would like to write games for browser, Android and iOS.  I am very comfortable with AS3 (coming from Java) have read through books and tutorials, had online trainining from Lynda.com you name it.  I would like to hear from real developres some best practice approaches to the 'write once, deploy anywhere' feature of Flash Professional.  Namely I would like to know:

  • Should I use timeline code?
  • Should I include third party engines like Tween Lite.  For example, if I have a Tween Lite com folder in my app or game will that compile to native iOS code?
  • How should I approach sound clips and music?

 

These are the main things I would like to know.  Feel free to add any hands-on knowledge you would offer me and users of this forum.  I think this is a great discussion to have that would elimate a lot of the 'fire extinguishing' that takes place on help forums.  I am running CS6 Web Premium on Windows 7.

 
Replies
  • kglad
    72,227 posts
    Jul 21, 2002
    Currently Being Moderated
    May 25, 2013 10:13 AM   in reply to fastalgebra
    • Should I use timeline code?
    • no.  only use timeline code for simple projects (and i can't think of any game that's simple coding-wise) and for testing code snippets.  otherwise, you can have relatively complex scope issues to resolve and/or problems working on your code after you've forgotten where each snippet is located.
    • Should I include third party engines like Tween Lite.  For example, if I have a Tween Lite com folder in my app or game will that compile to native iOS code?
    • yes, tweenlite is an excellent choice and there's no problem using it with any flash target platform.
    • How should I approach sound clips and music?
    • there's no problem with sound and android/iOS.  for the web, sound file size is a consideration so, you may want to (pre)load your sounds.
     
    |
    Mark as:
  • kglad
    72,227 posts
    Jul 21, 2002
    Currently Being Moderated
    May 25, 2013 2:48 PM   in reply to fastalgebra

    that's another benefit of class coding: you'll never end up with an unrecoverable class file.

     

    be aware of the stage size differences between your target platforms and decide asap if you can live with one of the stagescalemode settings (so you can easily code one fla/one swf to publish for iOS, android and web platforms).  otherwise, use a liquid layout so you can use one fla and publish 3 swfs.

     
    |
    Mark as:
  • kglad
    72,227 posts
    Jul 21, 2002
    Currently Being Moderated
    May 26, 2013 8:01 AM   in reply to fastalgebra

    all timer events and enterframe loops are approximate.  meaning, you can expect  accuracy on all platforms that can maintain the average enterframe rate.  ie, if you overload a platform, the average enterframe rate (and every timer rate) will fall behind the expected rate.

     

    however, flash only attempts to maintain the average frame rate and timer intervals.  the duration between loops can and does very tremendously which is not a problem for most games.  it is a problem for anyone trying to maintain a musical beat.

     
    |
    Mark as:
  • kglad
    72,227 posts
    Jul 21, 2002
    Currently Being Moderated
    May 26, 2013 11:14 AM   in reply to fastalgebra

    you're welcome.  and, good luck!

     
    |
    Mark as:
  • kglad
    72,227 posts
    Jul 21, 2002
    Currently Being Moderated
    May 27, 2013 11:53 AM   in reply to fastalgebra

    yes, it will compile for all the publishable platforms.

     
    |
    Mark as:
  • kglad
    72,227 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 5, 2013 6:57 PM   in reply to fastalgebra

    using scenes in as3 doesn't have any unexpected problems that i know of.  i never use them but that may be a hold-over from as2 which had a problem with scenes.

     

    you just have to be aware that at frame 1 of the next scene all objects created in the ide are gone.  anything created with actionscript will still exist from one scene to the next.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 6, 2013 10:54 PM   in reply to fastalgebra

    fastalgebra, I'm going to go off the rails (sorry, kglad) and say that I've had tremendous success with timeline code.  I've done some class work, but I'm really a procedural programmer at heart.  I've done some extremely large and complex stuff with timeline code, albeit with a ton of trial-and-error over many years to learn what works and what doesn't.  My code placement is consistent, it's reusable, and it's easy for me to go back to projects from years ago to find things.  Granted, I don't use the timeline for actual animation or timing... I just use the timeline as a "filing cabinet" for all my code.

     

    While I haven't done any Android work, I've built apps that work on all iPhones and the iPad, with one .fla and one .swf (or .ipa). 

     

    I think there are simply a lot of ways to skin the cat.

     
    |
    Mark as:
  • kglad
    72,227 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 10, 2013 7:41 AM   in reply to fastalgebra

    an object can have only one instance name at any one time.

     

    it can have different paths depending where the code is that references the object and you can use different references/variables to reference the object but you can't assign different instance names.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points