mxml

How do I attach camera to Spark.components.VideoDisplay

时光总嘲笑我的痴心妄想 提交于 2019-12-21 05:28:09
问题 I'm using Flash Builder and created a spark-application Flex project that will stream video from the local camera. If I use mx.controls.VideoDisplay ; there is no problem since it has attachCamera(camera) method. But Spark's VideoDisplay component does not have that method. I know I can use mx controls inside a Spark app but I want to know: What is the real difference between spark.components.VideoDisplay and mx.controls.VideoDisplay ? How do I attach camera to spark.components.VideoDisplay ?

ActionScript MXML <mx:> vs <s:>

≡放荡痞女 提交于 2019-12-20 02:34:27
问题 Looks like I can use components for both <mx:> or <s:> . So, which has more advantages? 回答1: As other posters have mentioned, the spark (s:) namespace refers to the new components introduced with Flex 4, while the halo/mx (mx:) namespace refers to the older components. They can be used together, which is necessary since there are not spark equivalents for all of the mx components (notable omissions are DataGrid, Tree, DividedBox, among others.) Some of the motivations for the new spark

Compiling mxml files with ant and flex sdk

允我心安 提交于 2019-12-17 19:24:50
问题 I am just getting started with flex and am using the SDK (not Flex Builder). I was wondering what's the best way to compile a mxml file from an ant build script. 回答1: The Flex SDK ships with a set of ant tasks. More info at: http://livedocs.adobe.com/flex/3/html/help.html?content=anttasks_1.html Here is an example of compiling Flex SWCs with ant: http://www.mikechambers.com/blog/2006/05/19/example-using-ant-with-compc-to-compile-swcs/ mike chambers 回答2: I would definitely go with the ant

MXML: Spark skin a VGroups scrollbar

僤鯓⒐⒋嵵緔 提交于 2019-12-13 21:22:54
问题 I have a VGRoup which automatically gets a scrollbar if the content gets too long. I would like to skin the scrollbar (make it wider). how can i do that? <s:Panel title="Replay" width="95%" height="860" top="920" horizontalCenter="0"> <s:VGroup id="vgroup" left="10" right="10" top="10" bottom="10"> <s:List id="list" height="100%" width="100%" itemRenderer="ListRenderer" /> </s:VGroup> </s:Panel> 回答1: First you should know that it's not the VGroup that gets a scrollbar, it's the List. Groups

call AS function from javascript/jquery

无人久伴 提交于 2019-12-13 18:25:24
问题 Using jquery,JS can we call a function in flex code.Below is that i have a button which calls a AS code.Can this be done if so how ? <script> function callas() { addBody();//call flex function } </script> <input type="button" onclick="callas();" /> FLEX code <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ import mx.controls.Button; import mx.controls.Alert; import flash.display.InteractiveObject; import

Flex 4 Itemrenderer for List

北慕城南 提交于 2019-12-13 11:26:12
问题 I just started working with Flex. I know it's pathetic but it's a long story. Now, the problem I am facing is that I have a list component which has a dataprovider on it. What I would like to do is when an item on the list is clicked I would like to have a check sign right next to the label. Below is the component: <s:List id="tabList" width="100%" borderVisible="false" click="tabList_clickHandler(event)" selectedIndex="{this.hostComponent.selectedIndex}" itemRenderer="MultiTabListRenderer" /

Flex: Is it possible for a changewatcher to watch multiple variables?

天涯浪子 提交于 2019-12-13 09:32:04
问题 I have a Flex variable that depends on a number of other Flex variables. I want this variable to be updated any time any of the variables it depends on are updated. Is it possible to do this using a single ChangeWatcher? Specifically, can the following code be modified so that it uses only one ChangeWatcher and if so how? <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com

Trying to add a skinClass to <mx:Form>

不羁的心 提交于 2019-12-13 06:47:26
问题 I'm working with Flex4 and I'm trying to skin a form (add a background and a border to it, etc.) I'm trying to do it the Flex 4 way with skinClass="" <mx:Form skinClass="skins.MyFormSkin" /> but it's not accepting skinClass as a property. How should I do it such that I'm still adhering to the best practices in Flex 4 (decoupling visuals from logic)? 回答1: skinClass only works on spark components, which have tags starting with <s: 回答2: To elaborate on Qz's response: mx:Form is not a Flex 4

How to make MXML Component Constructor with Arguments? [closed]

不羁岁月 提交于 2019-12-13 06:32:07
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I`m new in flex and could anyone help me? How do I create a constructor that takes arguments for an MXML component? 回答1: You can't; MXML Components do not have constructors that you can modify. You have a few

Change progress bar color in flex

怎甘沉沦 提交于 2019-12-13 05:46:23
问题 How to chnage progress bar color to green in the following code <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="100" height="100" creationComplete="init()"> <mx:Script> <![CDATA[ import mx.controls.Alert; import flash.net.NetStream; private var myMic:Microphone; private var nc:NetConnection; private function init():void { initMic("0x19D319"); myMic = Microphone.getMicrophone(); myMic.setSilenceLevel(0); myMic.rate = 44;