reference a fla component in an actionscript project? - actionscript-3

How do I reference a fla component from an actionscript project? I use flex builder.

I think that the answer depends on what component you are using, but inside flash IDE toggle the option of exporting the component to actionscript, or using the component code libraries should work.

Related

How to use MXML mx.controls.Label in ActionScript

I have one AS3 application which was developed entirely in AS3 without using single line of code in MXML. Of late I am realizing that MXML has some rich controls which are not provided in open source Apache Flex SDK. One library which is of most interest to me in mx.controls, it includes Label, DataGrid etc.
Now, I want to extend my AS3 application to call mxml compiled into swf file. I tried to import mx.controls inside my AS3 programs but it does not sense that. Please tell me if I am doing anything wrong. If I am able to import mx.controls inside as3 class it would save me a lot of time. Can I do this?
Alternatively, I am trying to write a few applications in mxml and then call (.swf) in AS3. Is it possible?
I tried Googling but all examples are pointing to using ActionScript inside MXML with [CDATA[]]. But I want the inverse. Calling MXML from ActionScript.
Please explain me at nuts and bolts level as I am struggling with this a lot.
thanks in advace
You can't do that because Flex, that uses MXML, is framework built on top of the Actionscript. But you can do reverse. In Flex MXML you can use Actioscript code, and you can also use Flash components like Sprite, MovieClip... by using UIComponent or SpriteVisualElement as their parent container.

FLVPlayback without Flash CS

I'm implementing Google video Ads in flash game, using FlashDevelop. Google has a sample where they're using FLVPlayback component to display video... problem is, I don't have this class anywhere.
I've searched how to add it, but all solutions say "link to C:\Adobe\Flash CS\Components\etc" path, which obiouvsly without Flash CS I don't have... and don't want to install it just for this :)
I wonder if there is a way to get the FLVPlayback without installing Flash CS?
You can try import external adobe components swc through Flashdevelop interface.
Maybe this can help you: link
I quit and just installed the Flash Professional CC, and there linked to the component path, but it didn't work for some reason. Then I included the FLVPlayback.swf component inside my AS3 app, which compiled etc. but as I learned FLVPlayback wasn't really what I needed.
After some fumbling I made it work with Flex Spark component - VideoPlayer, used inside AS3. You can find some code on the devlist: https://developers.google.com/interactive-media-ads/community?place=msg%2Fima-sdk%2Fc3KH11vxSd0%2FeLuYneYpch4J

How to use ArrayCollection and ArrayList in AS3.0 in flash professional mx.collection

Can we use the mx.collection package in as3.0 flash professional (not in flash builder) ? If yes, from where can i get the whole mx package?
ArrayCollection is part of the Flex framework, you would need to include the Flex framework in your CS5 project. I'm not sure if this is possible.

Flex Toast style windows

How can i create toast style windows in Flex MXML application like following?
http://www.adobe.com/devnet/air/flex/quickstart/articles/creating_toast-style_windows.html
I want to use this component in flex MXML where as this component is based on Action Script.
Was anyone able to recreate or use it in MXML project?
I reused some of the files and made it work in Flex Builder 3. :)

How can I add a class to my flash cs4?

I am about to create a simple demo in flash where I have 3 layers, 3 keyframes.
Currently I am just use some simple gotoAndStop() to move to the next keyframe.
But now I need a custom event to do that but I can't create a class inside the action of a keyframe so I am not able to create a custom event.
I just have AS3 developing experience in flex so far.
Thanks in advance.
you can import any class to your flash ide application:
import com.warren.events.CustomEvent;
after this you just have to do the regular usage you would do in flex. Don't forget to have you Custom Event class in the source path folder as your fla, or to configure your fla to have the correct source path of your classes.
(Publish settings/Actionscript-settings...source path)