flex4

How to play youtube videos on IOS using Actionscript 3

瘦欲@ 提交于 2020-01-05 10:16:09
问题 I am trying to fetch youtube playlist and play videos on IOS. My app works fine on Android and Flex simulators but does not work on IOS. Looks like there is a limitation on loading swfs in IOS here. I am using as3-youtube-data-api for the purpose. Can anyone guide me on how can I embed or play youtube videos using as3 (Flash Builder 4.5) on IOS or is there any other way available? Note: There is "Cisco Technical Support" app in app store, which plays youtube videos embedded in the app. Update

Dynamic ItemRenderer for Flex Datagrid

亡梦爱人 提交于 2020-01-05 04:02:38
问题 I have DataGrid with Dynamic Columns. The columns will contain ItemRendrer. I'm not familiar with dynamically adding ItemRenderer. My code is: var column:DataGridColumn = new DataGridColumn(); column.headerText = item; column.width=150; column.dataField=item; column.itemRenderer = WorkNatureRenderer ; cols.push(column); WorkNatureRenderer is a mxml component.( Hbox containing TextInput and Button ) <?xml version="1.0" encoding="utf-8"?> <mx:HBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns

How to set an image's source in a Flex stylesheet (not Embed)

假装没事ソ 提交于 2020-01-05 03:32:44
问题 This works: <mx:Image styleName="image" source="done.png"> </mx:Image> This doesn't: <fx:Style> @namespace mx "library://ns.adobe.com/flex/mx"; @namespace s "library://ns.adobe.com/flex/spark"; .image { source : url("done.png") } </fx:Style> <mx:Image styleName="image" > </mx:Image> Driving me crazy. How it this supposed to be done? Same results if I do: .image { source : "done.png" } Complete source code is: <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com

Adobe AIR: Controls flipped (mirrored) in certain build environments

◇◆丶佛笑我妖孽 提交于 2020-01-03 02:49:08
问题 I'm having an issue where certain controls are flipped, depending on the machine that I'm building my project on. On my development machine, when I build it, everything is okay. However, when I build it on our build server, some things are flipped. It seems to be things that are on a higher layer - for instance, options in the select control (see first image below), alerts/overlays (see second image below), etc. It's not just the text, either - the entire content is flipped, images and all. I

Connecting any database directly from flex

徘徊边缘 提交于 2020-01-02 19:37:10
问题 Is it possible to connect any database from flex directly? 回答1: Not unless you use Adobe AIR for desktop at which time you'd be using the SQLLite api's to create/connect to a sqlite database file. http://livedocs.adobe.com/flex/3/html/help.html?content=SQL_01.html Anything else is going to require a back end service to handle such transactions. 回答2: You can use asSQL as mentioned by michael, or use the Adobe Air runtime. However, this must be said about using this library: It is EXTREMELY

Actionscript Compiler directive

寵の児 提交于 2020-01-02 18:39:13
问题 I have an established pattern for lazy loading data from a server via AMF. private var _XeventDispatched:Boolean; private var _X:ArrayCollection; public function get X():ArrayCollection{ if(!_XeventDispatched && (_X==null || _X.length==0)){ var evt:Event = new Event();//whatever event is need for this data member dispatcher.dispatchEvent(evt); _XeventDispatched = true; } return _X; } public function set X(ac:ArrayCollection):void{ return _X; } This way the data is not loaded from the server

How would I include an MXML file inline another MXML file?

佐手、 提交于 2020-01-02 04:44:29
问题 I would like to include an MXML file in my MXML file in the same way you can include an external file in AS3 using the include directive. Using the include directive brings the code from the external file into the original file at compile time placing it in the same scope. For example, Application.mxml: <Application> <source="external.mxml"/> </Application> External.mxml: <Styles/> <Declarations> <Object id="test"/> </Declarations> I need to keep this code/mxml/xml in the external file in

changin the default width and height of the dropdownlist

三世轮回 提交于 2020-01-01 19:31:51
问题 i want a dropdownlist that is wide enough to accommodate the larger item in the dropdown in display area of the main control.(.i.e. dropdownlist with the functionality of MX Combobox) please guide me on this . 回答1: You should create custom DropDownList (extending original) and override dataProvider setter and measure() method. In dataProvider setter you should invoke invalidateSize() and in measure you should iterate your data provider and find the largest label (you can assign new text to

How to run an external SWF inside a Flex Application?

匆匆过客 提交于 2019-12-31 10:53:11
问题 EDIT: Due to the answer I change the code posted. I've added the Security.allowDomain("*") line and that line throws me an error. So, how can that be made? I want to run an Action Script 3.0 Application into a Flex Application. To do this I've done the following: <?xml version="1.0" encoding="utf-8"?> <mx:WindowedApplication windowComplete="loadSwfApplication()" xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ private function loadSwfApplication() { // The next line throws me

How to bottom-align cells in a DataGroup using TileLayout?

匆匆过客 提交于 2019-12-31 06:49:45
问题 I'd like to bottom-align cells in a tiled DataGroup, so that rows grow bottom-top instead of top-bottom. I guess what i'm looking for is something like RowAlign.BOTTOM , but that doesn't seem to exist. Rows should have fixed heights and gap, so RowAlign.JUSTIFY_USING_GAP and RowAlign.JUSTIFY_USING_HEIGHT won't work for me. Any hints? 回答1: Yes i want to answer my own question. What i wanted to do was extend TileLayout and override updateDisplayList(), but due to excessive use of privates in