flex4

draw a circular arc in MXML Graphics

浪尽此生 提交于 2019-12-08 02:04:23
问题 Is there a simple way to draw a circular arc in MXML graphics that doesn't involve beziers? Or should I create my own component? thank you ! f 回答1: I ended up creating my own mxml graphics component to draw arcs. I override Ellipse Spark primitive and use AS for the arc math - mostly copying this great post, which points to this code. 回答2: <s:Ellipse height="16" width="16"> <s:stroke> <s:SolidColorStroke color="0x000000" joints="square" caps="square"/> </s:stroke> <s:fill> <s:SolidColor color

how to use front camera using flex4

不想你离开。 提交于 2019-12-08 01:06:31
问题 I have developed simple camera application for Android mobile using flex 4. The problem is , when I run that application it uses the rear camera. It's not using the front camera. How can I change the camera. I need to use front side camera for this application , kindly help me . var camera:Camera = Camera.getCamera(cameraIndex.toString()); if (camera) { var ui: UIComponent = new UIComponent(); var localVideoDisplay: Video = new Video(180, 135); localVideoDisplay.attachCamera(camera); ui

How to ensure that the popUp always displays above the PopUpButton? With test case and screenshot

╄→尐↘猪︶ㄣ 提交于 2019-12-08 01:03:37
问题 Few users of my Flex 4.6 web application are complaining, that the mx.controls.PopUpButton at the right bottom corner of it sometimes opens a List underneath it and is thus unusable (I can't reproduce that myself - probably an unlucky combination of their Flash player and/or font size setting?) How could I ensure, that the popUp component (in my case it is a spark.components.List) always opens above the PopUpButton? I suspect, that I should create a skin based on mx.skins.halo.PopUpButtonSkin

File downloads not working in chrome which have Pepper-Flash 11.8.800.115

余生长醉 提交于 2019-12-07 14:33:27
Users unable to download files through our flex website using Chrome which have Pepper Flash player plug-in. Downloads no longer working in Chrome from a navigateToUrl call in Flex. However if i disable the pepper flash plug-in in chrome then it works fine. Do you guys know any workaround to this issue? Had the same issue. Try use ExternalInterface. In html in the JS section: function downloadFileFromAS( _fileURL ) { window.location.href=_fileURL; } In AS3: if( ExternalInterface.available ) { ExternalInterface.call( "downloadFileFromAS", fileUrlGoesHere ); } Remember to set allowscriptaccess =

As3 Copy object

佐手、 提交于 2019-12-07 12:53:25
问题 sometimes we need clone a object.but if a displayObject has some children and use the function like this: function clone(source:*):* { var b:ByteArray = new ByteArray(); b.writeObject(source); b.position = 0; return(b.readObject()); } but the result has no children.. .. . so what should I do ? 回答1: I didn't have to program a clone-method myself yet, but i found a way that might do the trick. By iterating through all your variables (in an xml-representation), you can copy them in a new

Post-processing captured video in AS3, creating slow motion

你说的曾经没有我的故事 提交于 2019-12-06 18:16:26
I have an interesting project wherein I need to allow users to capture video of themselves with a webcam at a kiosk, after which I email them a link to their video. The trick is the resulting video needs to be a 'slow motion' version of the captured video. So for example, if someone creates a 2 minute movie, the resulting movie will be 4 minutes. I'd like to build this in Flex / AS3 if possible. I don't have issues capturing the video and storing it / generating and emailing a link, but slowing down the video is the real mind bender. I'm unsure how to approach 'batch post-processing' a set of

flex 4 list ItemRenderer: how can i have different itemrenderers for different rows?

南楼画角 提交于 2019-12-06 14:36:48
问题 I'm creating a list of scores for a game. now most of the list i need to have the same ItemRenderer. but in one specific row of the list where the user who's playing is listed, it should show different information and with different background color. how can i achieve this ? update I already tried to resolve the issue with states, i created 2 states, one state called 'mine' and the 2nd state called 'others'. the problems that i got is that when users click on one of the list rows that state

how to use front camera using flex4

北城余情 提交于 2019-12-06 14:07:12
I have developed simple camera application for Android mobile using flex 4. The problem is , when I run that application it uses the rear camera. It's not using the front camera. How can I change the camera. I need to use front side camera for this application , kindly help me . var camera:Camera = Camera.getCamera(cameraIndex.toString()); if (camera) { var ui: UIComponent = new UIComponent(); var localVideoDisplay: Video = new Video(180, 135); localVideoDisplay.attachCamera(camera); ui.addChild(localVideoDisplay); cameraGroup.addChild(ui); } this is the code I have used in my application.

Trying to use BindingUtils in Flash AS3.0

不问归期 提交于 2019-12-06 12:19:20
I am not able to make this code work in AS3.0 ( Flash ) with Flex SDK 4.0 included. import mx.binding.utils.*; [Bindable] var myValue:int = 0; var cw:ChangeWatcher = BindingUtils.bindSetter(myValueChanged, this, "myValue"); addEventListener( Event.ENTER_FRAME , ef); function ef(e:Event):void { trace("hello",getTimer()); myValue = getTimer(); } function myValueChanged(o:Object):void { trace("myValue: " + myValue.toString()); } The output i get is : myValue: 0 hello 157 hello 168 hello 171 hello 177 .... .... and so on. But I expect the correct output should be : myValue: 0 hello 157 myValue:

In flex, is there a way to capture and optionally cancel a row selection event in a DataGrid?

混江龙づ霸主 提交于 2019-12-06 11:15:31
This should be trivial, but I can't seem to figure out a way to do this. I have a DataGrid, and what I would like to do, is when a user clicks on a row to select it, check a certain condition, and if it's met prevent the row from getting selected and keep the old selection intact. Thanks! I didn't test it, but it should work using event.preventDefault() and/or event.stopImmediatePropagation() on the GridSelectionEvent.SELECTION_CHANGING event. //stupid function but used for example purpose private function addListener():void { dataGrid.addEventListener(GridSelectionEvent.SELECTION_CHANGING,