Component like HorizontalList for Flash - actionscript-3

I'm developing an Flash application in ActionScript 3.0. I need a component to render my items horizontally using an ItemRenderer. I used fl.controls.List to do this vertically and found that there's HorizontalList for Flex applications, but I can't migrate to Flex.
Is there a component that I can use or how can I create one?
Update:
I tried TileView with 1 row but it causes columns to overlap when the number of items is greater than the component's width. How can I achieve something like overflox: hidden in Actionscript 3.0?

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.

Creating view in advance in Flex mobile app

In my Flex mobile application, I have ViewNavigator and three Views.
As it is very important for final user to see the second view without a delay, I would like it to be created in advance (e.g. right after the first one is created).
Is it possible to achieve it with Flex mobile?
View extends SkinnableContainer which has a property "creationPolicy".
view.creationPolicy = "all";

Accessing List and TextInput inside a movieClip

I have a problem accessing a List and TextInput fields placed inside an MC.
What I'm trying to do is an animation for a menu. So I placed buttons and List and a TextInput inside a MC which I want to animate.
I'm trying to access them like this:
string_variable = mc_name.textInput_Name.text;
Everything worked fine before I placed those controls inside an MC. The code was, of course, without mc_name. prefix before that.
What am I doing wrong and how can I fix this? My goal is to make a complex keyframe animation of a clip with buttons and other controls inside it, specifically List and TextInput ones.
Thanks.
Most animations, especially UI, like menu blocks, lists, could be done with tweening engines. You will have more control over animated elements. MovieClip isn't a nice choice to use as mechanism to animate UI components that should be accessed.
Anyway, If you want MovieClips in your project, give same names to the components on the timeline on every keyframe. It will help, a bit...

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 do I manipulate layout of spark/mx components via actionscript?

I know I can create an actionscript loop in a script block that can create an array of objects. The problem is when doing that I don't know how to have those objects interact with the overall layout structure of the mxml document itself. They just default to 0,0.
What If I wanted to arrange a loop of dynamically generated objects inside of a tilegroup and under another dynamically generated item using actionscript for instance? (without individually specifyin x&y)
I need to know how to give them an automatic layout (like horizontal) and then determine where they fall in the order of other objects declared via mxml?
You can just add them as elements to the container group of your choice, just use:
myVGroup.addElement( myComponent );
Inside your loop. Where myVGroup is a VGroup that already exists in your layout.
You may also find this of interest. http://evtimmy.com/2009/06/flowlayout-a-spark-custom-layout-example/