Using a Flash CS4 asset in Flash Builder AIR application - actionscript-3

I have written a flash cs4 custom button class in actionscript 3 with its unique look-and-feel and transitions on up/down etc events. How can I import the Flash assets and use it Flash Builder for an AIR application?

Export your flash cs4 document as a swc that you can then add to your Library path in your FlashBuilder project, but before doing so, you should consider linking your button to an external class which would be accessible in FlashBuilder.

Related

Keep bitmaps in MovieClips when exporting a swc from Flash CS6

I am having troubles including bitmaps in swc files created in Flash CS6. I am working on an AIR project, and I am using Flash Builder 4.7 with AIR SDK 17.0 to compile it, and Flash CS6 for the artwork.
I keep the application screens as MovieClips in Flash (with buttons, backgrounds, some text fields, etc.) and link them to classes so I can instantiate them in Flash Builder. I am exporting the Flash file as a SWC, that I use later in the Flash Builder project.
It is working, but...the background images of the screens are wiped out. I can instantiate the screens, add listeners to their components, and so on, but when I compile the project they have no backgrounds. I am using 1024x768 bitmaps (png) as background on each screen.
I tried giving the bitmaps a class too, but it is still the same.
Just to test it, I converted the bitmaps to shapes and this way they are shown well. but what I need is a nice bitmap, not flat shapes.
Does anyone know how to get this done?

Embed Adobe AIR application in html with swfobject

I've a .fla program that decompresses ZIP files using BiteArray.
In order to use this BiteArray I change the publish settings of the document in Adobe AIR.
I tried to embed this app in an HTML page as you would for a swf file, so with SWFObject, but nothing is shown, even if I run the swf locally.
There is a particular way to manage an swf in Adobe AIR?
There is no way you can embed an AIR app in a html. AIR is for desktop applications (or mobile).
But you do not need AIR to use ByteArray ...
The code you found may use the File class. This one is AIR only.
You'll have to work that around.

How to know for sure something was made in Flash?

If you right-click on a game of movie in a website and see a box with the bottoim line "About Adobe Flash Player..." does that necessarily mean that the content was made with Flash (Either Flash Pro, Flash Builder, FDT, Flash Develop)?
Does it mean that the creators for sure used AS3, or could you in thery have an html5 or union project running in flash player?
Yes, it means the content is made in Flash. If you view source for the website, contents made in flash have .swf extension.
But the creators may not have used AS3, it may be made using AS2 if older.

Is there any way to render HTML in ActionScript3 - FlashPlayer SWF?

I already know about StageWebView and HTMLLoader, but that only works in Adobe AIR. Is there any way (maybe third party) to do the same in a SWF.
Reason:
I'm building a game in AS3 that will run on mobile devices with Adobe AIR, and there is also a web version that will run as a SWF.
The game has some links, URLs that open in a StageWebView for mobile. My problem is that the SWF has to open these URLs in a browser popup or i-frame... I don't like it :(
What you're trying to accomplish isn't possible in a SWF. However, on the web you will have access to javascript and HTML, and with that, you could replicate the functionality with an iframe that sits directly over your SWF.

Disabling sound of embedded flash object with html

Was wondering how to disable sound from an embedded flash object with html?
You can't control the sound of a Flash movie in HTML I am afraid. What you can do is set up Javascript functions with the ExternalInterface object in Flash and you can call those functions from Javascript.
ExternalInterface in the AS3 LangRef:
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html
If you don't have your Flash source files only the SWF I think you won't be able to do this.
Rob