apache-flex

flex mobile TabbedViewNavigatorApplication back button

故事扮演 提交于 2019-12-12 03:16:36
问题 Why TabbedViewNavigatorApplication don’t have popView() (as in ViewNavigatorApplication I can use popView to go previous view)? How can I do that in TabbedViewNavigatorApplication ? <fx:Script> <![CDATA[ protected function BackBtn(event:MouseEvent):void{ navigator.popView(); //error } ]]> </fx:Script> <s:ViewNavigator label="Page1" width="100%" height="100%" firstView="views.DurationView" > <s:titleContent> <s:Button label="Back" click="BackBtn(event)"/> </s:titleContent> </s:ViewNavigator>

How come drawing this line at (0,0) doesn't really draw it at (0,0)?

。_饼干妹妹 提交于 2019-12-12 03:09:35
问题 Update: Once and for all, how can I draw a line that goes from (0,0) to the opposite corner of the stage? Here is what I have: package { import flash.display.Sprite; import flash.display.LineScaleMode; import flash.display.CapsStyle; import flash.display.JointStyle; import flash.display.Shape; import flash.events.Event; public class Main extends Sprite { private var lines:Shape; public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private

check for system focus

蓝咒 提交于 2019-12-12 03:05:58
问题 I have an activate and deactivate event handlers for the main Application that trigger when the user clicks inside or outside the browser or flex application browser window. Due to some subtle changes I made to my app (I suspect unforeseen by Adobe) activate and deactivate events are no longer triggered. Is there a hasFocus type function I can call instead in enterFrame for example 回答1: I'd suggest adding event handlers in JavaScript listening to the focus & blur events of the Flash DOM

Update a var, which get's it it's value from another component

旧巷老猫 提交于 2019-12-12 03:05:54
问题 I'm having trouble with updating a var and firing a function with it on creationcomplete. In the main component i declared a var artist. This var certainly works and has a value. I also need that var in another component: a profile component. I am able to get that var with: newVar = Maincomp(this.parentApplication).artist; I use the newVar in an API in the profile component. When i launch the API function with a mouseEvent, it works. However, i want to launch the API function on

setFocus in Flex

情到浓时终转凉″ 提交于 2019-12-12 03:03:48
问题 I'm Using following code in flex4 mxml That works fine. <mx:Button label="Set focus to Username" click="focusManager.setFocus(username);" /> How to use the same in Action script I mean creation complete event of an application without using button. That is I have login panel in application While page loads the username field should focused having cursor in it. Can any one help me? 回答1: The issue is that within your application the TextInput has focus, but within the HTML page your Flex

DataGrid itemrenderer getting issue while scroll

浪子不回头ぞ 提交于 2019-12-12 03:03:47
问题 I am using radio button inside spark datagrid as following way. <s:DataGrid dataProvider="{arrList}" > <s:columns> <mx:ArrayList> <mx:source> <s:GridColumn width="90" headerText="radio"> <s:itemRenderer > <fx:Component> <s:GridItemRenderer> <fx:Script> <![CDATA[ override public function set data( value:Object ) : void { super.data = value; rdId.group=outerDocument.rbgGroup; } ]]> </fx:Script> <s:RadioButton id="rdId" /> </s:GridItemRenderer> </fx:Component> </s:itemRenderer> </s:GridColumn>

How to disable default browser navigation with Space in Flex

雨燕双飞 提交于 2019-12-12 03:00:52
问题 I have defined a keyboard shortcut that uses space. After I have pressed the shortcut two things happen: some random navigation in my app and also the code in my eventHandler from the keyboard shortcut. I found THIS table with browser keyboard shortcuts and obviously space sometimes is used for navigation. So is there a way to stop the navigation with space in Flex, because eating the spacebar button doesn't seem to work: FlexGlobals.topLevelApplication.addEventListener(KeyboardEvent.KEY_DOWN

How to create graphics when using classes? AS3

♀尐吖头ヾ 提交于 2019-12-12 02:59:45
问题 I am creating a "game" of sorts where three different colored circles appear on the screen and take different amounts of clicks to make disappear. I have a main mxml function and then 4 other classes. I thought I was close to finishing it, but I have encountered an error and it is not telling me what it is. Here is a link to the rubric here The error I get when I run the code is: "Error #2032: Stream Error. URL: file:///C|/Users/Gabe/Adobe Flash Builder 4.6/Project 1/bin-debug/framework_4.6.0

Flex sorting of XMLListCollection subelements

霸气de小男生 提交于 2019-12-12 02:59:12
问题 In a Flex webapp, is there an easy way to go about applying a sort to the children of an XML element, based on the children's attributes? Example follows below: XMLListCollection: <a anotherProp="ABCDE"> <e prop="AB">1</element> <e prop="BC">2</element> </a> <a anotherProp="FGEH"> <e prop="HF">3</element> <e prop="AD">4</element> <e prop="AC">5</element> </a> I would like to sort the <e> elements, within each <a> element separately, according to their "prop" attribute. My code for generating

Flex is deserializing generic objects from Zend AMF instead of strictly typed objects

眉间皱痕 提交于 2019-12-12 02:54:41
问题 I'm using Zend AMF to send my remote objects to Flex. I've defined a Constant class and created getASClassName() method. Then I've created Action script class in flex. Objects are send successfully, but they are deserialized to generic Objects in Flex instead of specific ones. EDIT: On network monitor in Flex I can see that AMF value is set to com.my.project.valueobjects.Constant . Although array from event.result contains Objects . What am I doing wrong? Php declaration of class: <?php