Kineticz Interactive

  • Archive
  • RSS
  • Ask me anything

JSFL command: Get Asset Names

Whenever I code ActionScript projects in FlashBuilder I usually need to disable the option to automatically declare stage instances in the Flash IDE. This is so I can specify the the variable names in the class that a library item is associated with. One irritation with that was going back and forth between the Flash IDE and FlashBuilder to write out all the stage instances and data types. About 2 years ago I wrote this JSFL script to handle outputting all that data so I can copy it into Flash Builder easily. Last year while working with the guys from Blitz Agency they took it and made it even better.

What you get now is a simple command that will get all the assets on stage and will then copy the list to your clipboard for easy pasting into your FlashBuilder class in the following format:
public var {INSTANCE_NAME} : {DATA_TYPE};

It loops through the items and tries to find them in the library, if a class is associated to it then you will get the exact data type, if no class is assigned it will output as MovieClip or TextField.

Download the latest version here:
http://code.kineticz.s3.amazonaws.com/jsfl/Get_Asset_Names.zip


    • #flash
    • #flashbuilder
    • #jsfl
  • 2 years ago
  • Permalink
  • Share
    Tweet

TLF Text breaks swfs Embedded in FlashBuilder

I just spent quite awhile trying to figure out a pretty obnoxious bug I just discovered in CS5. My workflow typically includes a .fla file with all of the assets for a project that I will embed as a byte array in Flash Builder using code like this:

[Embed(source=”assets/PROJECT_library.swf”, mimeType=”application/octet-stream”)]
private var AssetLibrary : Class;

Then in my library I have a MovieClip and the Class set to com.test.TLFText. The mc has just one textfield in it with an instance name of tlf_txt.

If you have a Class assigned to a MovieClip that contains a TLF TextField and try to load that swf into flashbuilder like I explain above, you will not be able to create any classes out of elements in your library.

Open that fla up and change it back to Classic Text and you are good to go.

This all happened because I was importing psds into flash, and all the text is added in as TLF text from PSD if you choose to make it editable.

You can download the project here if you want to see it happen or look more at the code:
http://code.kineticz.s3.amazonaws.com/bug_tlf_embed.zip

    • #flash
    • #flashbuilder
    • #bugs
  • 2 years ago
  • 6
  • Permalink
  • Share
    Tweet

About

kineticz interactive specializes in all facets of web and mobile development.

Twitter

loading tweets…

  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr