how to embedd assets in flashbuilder

By : Magnus
Source: Stackoverflow.com
Question!

I have this air application where I want to add a swf file o the assets folder and then be able to define it in my mxml file, what is the correct way to do this so that the added swf file is included in the air instalation package? Will it automatically be included if I just add it to my assets folder?

By : Magnus


Answers

If you embed the assets with the [Embed] tag the assets will be included in the application during the compilation and you don't need to include it separately in the build package settings. Basically you only need to include the files into your build manually if you want to load them at runtime. For example,if you have some images in your assets folder that you want to LOAD (not embed) at runtime then you would need to include the assets folder into the build so that they're there when the application is running on the client.

You can embed whole swfs:

[Embed(source="mySWF.swf")] 
public var mySwfClass:Class;

Or just some symbols from a swf:

[Embed(source='mySWF.swf', symbol='mySymbolLinkageName')] 
public var mySwfClass:Class;

Remember that for the symbols you have to assign a linkage name to that symbol (and maybe mark it as "Export for actionscript" - don't remember if you really need to do that though)

Then you can declare your stuff like that:

// if your swf or swf symbol has multiple frames it will become a MovieClipAsset
var myMovieClip:MovieClipAsset = new mySwfClass() as MovieClipAsset;

// if it has only one frame it is a SpriteAsset:
var mySpriteAsset:SpriteAsset = new mySwfClass() as SpriteAsset;

If you are only working with MXML you often can pass the class to the components directly without casting and instantiation:

<mx:Button id="myButton" label="Button" icon="{mySwfClass}" />
By : Philarmon


Sorry I don't get how to put pictures or code into the comments field.... Very confusing...

This is the code I am using. Does this make sense?

Stage:Stage 1
Loop: 1
    The contents of this loop will run repeatedly while: Current Item:Survey Distribution Date is less than 1901-01-13 12:00:00
        Pause until Current Item:Survey Distribution Date
        If Current Item:Survey Distribution Date equals (ignoring time) Today
        and Current Item:Survey Email Sent equals No
        and Current Item:Ultrabook deployed Y/N equals Yes
            Email Current Item:Recipient
            Update item in Current Item

Transition to stage Go to End of Workflow

By : barnie206


I think you could rewrite this as a single query on the status table, using ORs to test each scenario, like so:

SELECT ss.int_tran_id
FROM   status SS
WHERE  ss.stage in ('ACHPayment_Confirmed', 'HIFV4', 'HIFV5_FTRINF', 'Payment_HIFV5_FTRINF')
OR     (ss.stage = 'PREVDAY'
        AND (EXISTS (SELECT NULL
                     FROM   references rf
                     WHERE  ss.int_tran_id = rf.int_tran_id
                     AND    rf.mid_ref IS NOT NULL)
             OR EXISTS (SELECT NULL
                        FROM   app_data ad
                               INNER JOIN ach aa
                                 ON (ad.app_data_id = aa.ach_id)
                        WHERE  ss.int_tran_id = ad.int_tran_id
                        AND    aa.par_number IS NOT NULL)));
By : Boneist


This video can help you solving your question :)
By: admin