Search Results

Search found 338 results on 14 pages for 'mxml'.

Page 12/14 | < Previous Page | 8 9 10 11 12 13 14  | Next Page >

  • flex: how to Make two resize effect at the same time

    - by 123quatre
    Hy, Is it possible to resize the application at the same moment when the Accordion size change, to make effect resize og the last one synchronised with resize of Application ? In my code,, the Application is resized after the resize of Accordion is completed: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="400" minHeight="300" backgroundColor="white" horizontalScrollPolicy="off" verticalScrollPolicy="off" mouseDown="stage.nativeWindow.startMove()"> <mx:Resize id="expand" target="{application}" heightTo="{acc01.height}"/> <mx:Accordion id="acc01" x="0" y="0" resizeToContent="true" resize="expand.play();" horizontalScrollPolicy="off" verticalScrollPolicy="off"> <mx:VBox label="Accordion Pane 1" width="100%" height="100%"> <mx:Label text="hello"/> <mx:Label text="hello"/> <mx:Label text="hello"/> <mx:Label text="hello"/> </mx:VBox> <mx:VBox label="Panel 2" width="100%" height="100%"> <mx:Label text="hello"/> <mx:Label text="hello"/> </mx:VBox> <mx:VBox label="Panel 3" width="100%" height="100%"> <mx:Label text="hello"/> <mx:Label text="hello"/> </mx:VBox> <mx:VBox label="Panel 4" width="100%" height="100%"> <mx:Label text="hello"/> <mx:Label text="hello"/> </mx:VBox> </mx:Accordion> </mx:Application>

    Read the article

  • Positioning / Scrolling problem with Flex popup.

    - by user284163
    Hi all, I'm trying to work out a specific problem I'm having with positioning in Flex using the PopUpManager. Basically I'm wanting to create a popup which will scroll with the parent container - this is necessary because the parent container is large and if the user's browser window isn't large enough (this will be the case the majority of the time) - they will have to use the scrollbar of the container to scroll down. The problem is that the popup is positioned relative to another component, and it needs to stay by that component. <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ import mx.core.UITextField; import mx.containers.TitleWindow; import mx.managers.PopUpManager; private function clickeroo(event:MouseEvent):void { var popup:TitleWindow = new TitleWindow(); popup.width = 250; popup.height = 300; popup.title = "Example"; var tf:UITextField = new UITextField(); tf.wordWrap = true; tf.width = popup.width - 30; tf.text = "This window stays put and doesn't scroll when the hbox is scrolled (even with using the hbox as parent in the addPopUp method), I need the popup to be local to the HBox."; popup.addChild(tf); PopUpManager.addPopUp(popup, hbox, false); PopUpManager.centerPopUp(popup); } ]]> </mx:Script> <mx:HBox width="100%" height="2000" id="hbox"> <mx:Button label="Click Me" click="clickeroo(event)"/> </mx:HBox> </mx:Application> Could anyone give me any pointers in the right direction? Thanks.

    Read the article

  • How to run an external SWF inside a Flex Application?

    - by lk
    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() { var urlRequest:URLRequest = new URLRequest("path/to/the/application.swf"); swfLoader.addEventListener(Event.COMPLETE, loadComplete); swfLoader.load(urlRequest); } private function loadComplete(completeEvent:Event) { var swfApplication:* = completeEvent.target.content; swfApplication.init(); // this is a Function that I made it in the Root class of swfApplication } ]]> </mx:Script> <mx:SWFLoader id="sfwLoader"/> </mx:WindowedApplication> The problem is that in the calling of swfApplication.init(); the AIR Player throws me an exception: Security sandbox violation: caller file:///path/to/the/application.swf cannot access Stage owned by app:/SWFApplicationLoader.swf. This is because somewhere in application.swf I use the stage like this: if (root.stage != null) root.stage.addEventListener(Event.REMOVED, someFunction); root.stage.stageFocusRect = false; How can I load this swf application and USE the stage without any problems?

    Read the article

  • Flex datagrid headerColor style not working....

    - by Jerry
    Hello guys. I am trying to change the datagrid header color by editing headerColor style. I could change the font size, font family...etc except the headerColor. Would someone help me about it? Thanks a lot. My code Mxml <mx:DataGrid id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{cityinfoResult3.lastResult}"> <mx:columns> <mx:DataGridColumn headerText="Detail" dataField="detail"/> <mx:DataGridColumn headerText="Name" dataField="name"/> </mx:columns> </mx:DataGrid> Style #dataGrid{ headerColors: #ff6600; //everything works except this one. The color can't be //changed? rollOverColor: #33ccff; textRollOverColor: #ffffff; iconColor: #ff0000; fontFamily: Arial; fontSize:12; dropShadowEnabled: true; alternatingItemColors: #330099, #0000cc; color: #ffffff; borderColor: #ffffff; }

    Read the article

  • How to use EffectUpdate?

    - by coma
    So, this is my sample: <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"> <fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; s|Application { background-color: #333333; } #info { padding-top: 5; padding-right: 5; padding-bottom: 5; padding-left: 5; font-size: 22; background-color: #ffffff; } #plane { corner-radius: 8; background-color: #1c1c1c; } </fx:Style> <fx:Script> import mx.events.*; private var steps:uint = 0; private function effectUpdateHandler(event:EffectEvent):void { info.text = "rotationY: " + plane.rotationY + " ; steps: " + steps; steps++; } </fx:Script> <fx:Declarations> <s:Rotate3D id="spin" target="{plane}" autoCenterTransform="true" angleYFrom="0" angleYTo="360" repeatCount="10" effectUpdate="effectUpdateHandler(event)" /> </fx:Declarations> <s:VGroup horizontalAlign="center" gap="50" width="100%"> <s:Label id="info" width="100%"/> <s:BorderContainer id="plane" width="200" height="200" click="spin.play()"/> </s:VGroup> </s:Application> and it doesn't make me happy.

    Read the article

  • Flex ItemRenderer Issue

    - by Aswath
    Am using Checkbox as ItemRenderer in tilelist. Am trying to setting checkbox selected values through xml. I got the values perfectly.. but checkbox could not bind the values(could not accept that). It's automatically sets true for all checkboxes. This is my xml <PmhTreeAllow> <PmhTreeAllowname id='1' label ='Allow Text' isField='false'/> <PmhTreeAllowname id='2' label ='Document Link' isField='false'/> <PmhTreeAllowname id='3' label ='Test Results Entry'isField='false'/> <PmhTreeAllowname id='4' label ='Dummy' isField='false'/> </PmhTreeAllow> My Tilelist.. <mx:TileList id="tileList" width="160" height="100%" textAlign="left" horizontalScrollPolicy="off" verticalScrollPolicy="off" dataProvider="modelInstance.optionCollList}" columnCount="1" backgroundAlpha="0" borderStyle="none"itemRenderer="com.Frontend.views.treeStructure.myTileList" useRollOver="false" rowHeight="28" itemClick="tileItemClick(event)" columnWidth="150" selectedIndex="0" x="10" y="0"> Check box ItemRenderer.. <?xml version="1.0" encoding="utf-8"?> <mx:CheckBox xmlns:mx="http://www.adobe.com/2006/mxml" label="{data.@label}" selected="data.@isField}"/> Thanks in Advance Ashok

    Read the article

  • Not able to compile ActionScript from Java SDK

    - by Heang S.
    I was reading the Flex Compiler API User Guide at http://livedocs.adobe.com/flex/3/compilerAPI_flex3.pdf and tried to follow the example to create a Java application to compile a Flex application. Here is my program: import flex2.tools.oem.Application; import java.io.*; public class MyAppCompiler { public static void main(String[] args) { try { Application application = new Application( new File("../apps/TestApp.mxml")); application.setOutput(new File("../apps/TestApp.swf")); long result = application.build(true); if (result 0) System.out.println("Compile Success"); else System.out.println("Compile Failed"); } catch (Exception ex){ ex.printStackTrace(); } } } Unfortunately, I get "java.lang.ExceptionInInitializerError" on the very first line. Internally, the error appears to be on the following line: Exception in thread "main" java.lang.ExceptionInInitializerError at myApps.MyAppCompiler.main(MyAppCompiler.java:9) Caused by: java.lang.NullPointerException at flex2.tools.oem.Application. (Application.java:184) I am using Eclipse 3.3. However, I see the problem when I run my program either from Eclipse or from a command line. Any suggestions would be greatly appreciated.

    Read the article

  • Flex List ItemRenderer with image looses BitmapData when scrolling

    - by Dominik
    Hi i have a mx:List with a DataProvider. This data Provider is a ArrayCollection if FotoItems public class FotoItem extends EventDispatcher { [Bindable] public var data:Bitmap; [Bindable] public var id:int; [Bindable] public var duration:Number; public function FotoItem(data:Bitmap, id:int, duration:Number, target:IEventDispatcher=null) { super(target); this.data = data; this.id = id; this.duration = duration; } } my itemRenderer looks like this: <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" > <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; ]]> </fx:Script> <s:Label text="index"/> <mx:Image source="{data.data}" maxHeight="100" maxWidth="100"/> <s:Label text="Duration: {data.duration}ms"/> <s:Label text="ID: {data.id}"/> </mx:VBox> Now when i am scrolling then all images that leave the screen disappear :( When i take a look at the arrayCollection every item's BitmapData is null. Why is this the case?

    Read the article

  • How to make a small flash swf with ComboBox in Actionscript 3?

    - by Sint
    I have a pure Actionscript 3 project, using flash.* libraries, compiles down to about 6k (using mxmlc). Program handles about 1k shapes, a few sprites, a sockets connection, works great (tastes less filling). Now, how would I add a ComboBox control without incurring excessive bloat? More specificially, I would like to keep the size under 100k. So far I have tried: Adobe mx.controls ComboBoxexample - simple mxml example compiles to 200+k both on my main Linux Box using mxmlc and in Windows using Flash Builder 4 Yahoo Astra - uses mx libraries underneath(so as bloated as Adobe?), plus does not contain exact ComboBox Keith Peter's MinimalComps - seems small, but far from providing ComboBox functionality SPAS (Swing Package for Actionscript) - compiles to 130k, but alpha version of ComboBox does not let me adjust height... asuilib - compiles to 40k, unfortunately this ComboBox does not provide for scrolling items...if it does not fit on screen no way to scroll to it Now my questions: Is there a way to lower size for projects importing mx.controls ? Maybe there is a way to fix SPAS or asuilib ComboBoxes? Perhaps, there are some other libraries which provide a ComboBox(or DropList)?

    Read the article

  • FLEX: the custom component is still a Null Object when I invoke its method

    - by Patrick
    Hi, I've created a custom component in Flex, and I've created it from the main application with actionscript. Successively I invoke its "setName" method to pass a String. I get the following run-time error (occurring only if I use the setName method): TypeError: Error #1009: Cannot access a property or method of a null object reference. I guess I get it because I'm calling to newUser.setName method from main application before the component is completely created. How can I ask actionscript to "wait" until when the component is created to call the method ? Should I create an event listener in the main application waiting for it ? I would prefer to avoid it if possible. Here is the code: Main app ... newUser = new userComp(); //newUser.setName("name"); Component: <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100" height="200" > <mx:Script> <![CDATA[ public function setName(name:String):void { username.text = name; } public function setTags(Tags:String):void { } ]]> </mx:Script> <mx:HBox id="tagsPopup" visible="false"> <mx:LinkButton label="Tag1" /> <mx:LinkButton label="Tag2" /> <mx:LinkButton label="Tag3" /> </mx:HBox> <mx:Image source="@Embed(source='../icons/userIcon.png')"/> <mx:Label id="username" text="Nickname" visible="false"/> </mx:VBox> thanks

    Read the article

  • Flex 3 Close UrlLoader throws exception

    - by gmoniey
    I am trying to simulate a 'HEAD' method using UrlLoader; essentially, I just want to check for the presence of a file without downloading the entire thing. I figured I would just use HttpStatusEvent, but the following code throws an exception (one that I can't wrap in a try/catch block) when you run in debug mode. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init()"> <mx:Script> <![CDATA[ private static const BIG_FILE:String = "http://www.archive.org/download/gspmovvideotestIMG0021mov/IMG_0021.mov"; private var _loader:URLLoader; private function init():void { _loader = new URLLoader(); _loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, statusHandler); _loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); _loader.load(new URLRequest(BIG_FILE)); } public function unload():void { try { _loader.close(); _loader.removeEventListener(HTTPStatusEvent.HTTP_STATUS, statusHandler); _loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler); } catch(error:Error) { status.text = error.message; } } private function errorHandler(event:Event):void { status.text = "error"; unload(); } private function statusHandler(event:HTTPStatusEvent):void { if(event.status.toString().match(/^2/)) { status.text = "success"; unload(); } else { errorHandler(event); } } ]]> </mx:Script> <mx:Label id="status" /> I tried using ProgressEvents instead, but it seems that some 404 pages return content, so the status event will correctly identify if the page exists. Anyone have any ideas?

    Read the article

  • navigateToURL with GET parameters in local SWF

    - by Michael Brewer-Davis
    I'm running a Flex application locally (local-with-filesystem or local-trusted), and I'm trying to call navigateToURL to a local page using GET parameters. Flash Player seems to be ignoring the parameters when opening the local page, though. I've been scouring the Flash security pages to find a documented prohibition for this, but haven't found anything. Pointers? How would you work around this issue? My Flex app: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ private function onClick(event:MouseEvent):void { var request:URLRequest = new URLRequest("target.html"); request.data = new URLVariables(); request.data.text = "stackoverflow.com"; navigateToURL(request); } ]]> </mx:Script> <mx:Button label="Go" click="onClick(event)" /> </mx:Application> And my target.html: <html> <head> <script language="JavaScript"> <!-- function showURL() { alert(window.location.href); } //--> </script> </head> <body onload="showURL()" /> </html>

    Read the article

  • How to copy x and y coordinate from one Flex component to another

    - by Tam
    Hi, I would like to base one component's x and y cooridnates according to another, I tried using the binding notation but it doesn't seem to work! <?xml version="1.0" encoding="utf-8"?> <s:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" xmlns:vld ="com.lal.validators.*" xmlns:effect="com.lal.effects.*" xmlns:components="com.lal.components.*" width="400" height="100%" right="0" horizontalAlign="right" verticalCenter="0"> ...... <s:VGroup width="125" height="100%" horizontalAlign="right" gap="0" width.normal="153" x.normal="247" width.expanded="199" x.expanded="201"> ...... <s:Panel includeIn="expanded" id="buttonsGroup" mouseOut="changeStateToNormal();" mouseOver="stopChangeToNormal();" skinClass="com.lal.skins.TitlelessPanel" title="hi" right="0" width="125" height="700" > ..... <s:Label text="Jump To Date" paddingTop="20" /> <s:TextInput id="wholeDate" width="100" mouseOver="stopChangeToNormal();" click="date1.visible = true" focusOut="date1.visible = false"/> ... </s:Panel> </s:VGroup> <mx:DateChooser id="date1" change="useDate(event); this.visible = false; " visible="false" mouseOver="stopChangeToNormal();" y="{wholeDate.y}" x="{wholeDate.x}" /> </s:VGroup>

    Read the article

  • I need a true mouseOver...

    - by invertedSpear
    Ok, so mouseOver and RollOver, and their respective outs work great as long as your mouse is actually over the item, or one of it's children. My problem is that I may have another UI component "between" my mouse and the item I want to process the mouse/rollover(maybe a button that is on top of a canvas, but is not a child of the canvas). The mouse is still over the component, there's just something else that it's over at the same time. Any tips or help how to deal with this? Let me know if I'm not being clear enough. Here is a simplified code example detailing my question copy/paste that into your flex/flash builder and you'll see what I mean: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="500" height="226" creationComplete="ccInit()"> <mx:Script> <![CDATA[ private function ccInit():void{ myCanv.addEventListener(MouseEvent.ROLL_OVER,handleRollOver); } private function handleRollOver(evt:MouseEvent):void{ myCanv.setStyle("backgroundAlpha",1); myCanv.addEventListener(MouseEvent.ROLL_OUT,handleRollOut); } private function handleRollOut(evt:MouseEvent):void{ myCanv.setStyle("backgroundAlpha",0); myCanv.removeEventListener(MouseEvent.ROLL_OUT,handleRollOut); } ]]> </mx:Script> <mx:Canvas id="myCanv" x="10" y="10" width="480" height="200" borderStyle="solid" borderColor="#000000" backgroundColor="#FFFFFF" backgroundAlpha="0"> </mx:Canvas> <mx:Button x="90" y="50" label="Button" width="327" height="100"/> </mx:Application>

    Read the article

  • Access a view inside a tab navigator when a tab is clicked

    - by magnus.lassi
    Hi, I I have a view in Flex 3 where I use a tab navigator and a number of views inside the tab navigator. I need to be know which view was clicked because of it's one specific view then I need to take action, i.e. if view with id "secondTab" is clicked then do something. I have set it up to be notified, my problem is that I need to be able to know what view it is. Calling tab.GetChildByName or a similar method seems to only get me back a TabSkin object. <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" xmlns:local="*" creationComplete="onCreationComplete(event)"> <mx:Script> <![CDATA[ import mx.events.FlexEvent; import mx.controls.Button; protected function onCreationComplete(event:Event):void { for(var i:int = 0; i < myTN.getChildren().length; i++) { var tab:Button = myTN.getTabAt(i); tab.addEventListener(FlexEvent.BUTTON_DOWN, tabClickHandler); } } private function tabClickHandler(event:FlexEvent):void { var tab:Button; if(event.currentTarget is Button) { tab = event.currentTarget as Button; // how do I access the actual view hosted in a tab that was clicked? } } ]]> </mx:Script> <mx:TabNavigator id="myTN"> <local:ProductListView id="firstTab" label="First Tab" width="100%" height="100%" /> <local:ProductListView id="secondTab" label="Second Tab" width="100%" height="100%" /> </mx:TabNavigator> </mx:VBox>

    Read the article

  • SparkDataContainer Scroller not scrolling to bottom of container

    - by AZSL
    I am using a scroller component within a custom skin for a SkinnableDataContainer. I am running into an issue in that the thumbbar of the scroller stops at about the 50% point, however this is actually the end of the scrollable area. In actuality, the thumbbar should be at the bottom of the scroll track. Here's the code for the scroller: <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" bottom="150" > <!-- Properties of the parent ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <s:states> <s:State name="normal" /> <s:State name="disabled" /> </s:states> <!-- Metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <fx:Metadata> [HostComponent("spark.components.SkinnableDataContainer")] </fx:Metadata> <!-- UI components ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <s:Rect left="0" right="0" bottom="0" top="0" radiusX="4" radiusY="4" > <s:fill> <s:SolidColor id="fillColor" color="0xEFEFEF"/> </s:fill> </s:Rect> <s:Group width="905" height="395" id="mainGroup"> <s:Scroller left="10" right="10" top="4" bottom="10" > <s:DataGroup id="dataGroup" /> </s:Scroller> <s:Rect left="0" right="0" top="0" bottom="0"> <s:stroke> <s:SolidColorStroke weight="1" color="0xD8D8D8"/> </s:stroke> </s:Rect> </s:Group>

    Read the article

  • password validator using RegExp in Flex

    - by kalyaniRavi
    I have seen several examples in Flex for passowrd validator using RegExp. But every where the validation is happend for single validation. I have a requirement, like password validations like • At least one Upper case letter • At least one numeric character • At least one special character such as @, #, $, etc. • At least one Lower case letter • password lenght minimum 6 digits • password cannot be same as user name Can anyone provide me a code for this..? I have the code only for checking the password is valid or not . check the below code. MXML CODE <mx:FormItem label="Username:" x="83" y="96" width="66"> </mx:FormItem> <mx:FormItem label="Password:" x="88" y="123" width="61"> </mx:FormItem> <mx:Button label="Login" id="btnLogin" tabIndex="2" click="login();" enabled="{formIsValid}" x="327" y="162" width="84"/> <mx:TextInput id="txtPassword" displayAsPassword="true" change="validateForm(event);" x="152" y="121" width="217"/> <mx:TextInput id="txtUserId" change="validateForm(event);" x="152" y="94" width="217"/> AS Code: private function validateForm(event:Event):void { focussedFormControl = event.target as DisplayObject; formIsValid = true; formIsEmpty = (txtUserId.text == "" && txtPassword.text == ""); validate(strVUserId); validate(strVPassword); } private function validate(validator:Validator):Boolean { var validatorSource:DisplayObject = validator.source as DisplayObject; var suppressEvents:Boolean = (validatorSource != focussedFormControl); var event:ValidationResultEvent = validator.validate(null, suppressEvents); var currentControlIsValid:Boolean = (event.type == ValidationResultEvent.VALID); formIsValid = formIsValid && currentControlIsValid; return currentControlIsValid; }

    Read the article

  • DisplayObject snapshot in flex 3

    - by simplemagik
    i'm creating a visual editor in flex and need to let users export thier projects into Image format. But i have one problem: size of the canvas is fixed and when user add element which is out of these sizes some scroll bars added. And user continue working on the project. but when he want to take snapshot of the canvas he just get the visible part ot the canvas with scrollbars. how to get image of the fullsize canvas? The only solution i found is to check the positions and sizes of canvas child objects and rezise it to fit them. then take snap and resize back. But it hmmmm... too complicated i think. Is there some "easy methods"? <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:Script> <![CDATA[ import mx.graphics.ImageSnapshot; private function SnapshotButtonHandler():void { var snapshot:ImageSnapshot = ImageSnapshot.captureImage(AppCanvas); var file:FileReference = new FileReference(); file.save(snapshot.data, "canvas.png"); } ]]> </mx:Script> <mx:Canvas id="AppCanvas" width="800" height="300" backgroundColor="0xFFFFFF"> <mx:Box x="750" y="100" width="100" height="100" backgroundColor="0xCCCCCC" /> </mx:Canvas> <mx:Button id="SnapshotButton" label="take snapshot" click="SnapshotButtonHandler()" /> </mx:Application>

    Read the article

  • Flex 4 - Highlight keywords in a block of text using TextLine

    - by Baz
    I have a search and results page that I would like to highlight the keywords that were searched for, in the text of the results. It was suggested that I use TextLine for this, but I am having trouble figuring out how to make it work. I started a simple, compilable dummy application and was hoping someone could give me some tips on how to continue: <?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/flex/mx" initialize="initApp();"> <fx:Script> import flash.display.Sprite; import flash.text.engine.*; private var textLine:TextLine; private function initApp():void { var normalFormat:ElementFormat = new ElementFormat(null, 12, 0x000000); var highlightFormat:ElementFormat = new ElementFormat(null, 14, 0xff0000); var textBlock:TextBlock = new TextBlock(new TextElement("This is text that has KEYWORDS. I would like to highlight these KEYWORDS by changing their font color and adding a light yellow background graphic.", normalFormat)); textLine = textBlock.createTextLine(); textLine.y = 100; embeddedFontHolder.addChild(textLine); } </fx:Script> <mx:UIComponent width="100%" id="embeddedFontHolder" /> </s:Application> Anyone have any ideas? Cheers, Baz

    Read the article

  • Why are my Flex resource bundles not being loaded?

    - by Chris R
    I have an Actionscript module in the flex source folder filterModules, which is one of two additional source folders in my project (the main source folder is reports, but I'm not dealing with anything in there right now). Here's the MXML content that references the resources. ... This array is assigned to the dataProvider field of a ComboBox. It's not bound using the bindings, presumably for reasons that made sense to the original developer, and it'd be nontrivial to change the class to make that happen. I additionally have a resource property file in a folder resources/en_US and I have the source folder resources/{locale} in the project source settings. My additional compiler options are -locale en_US. The resource property file is resources/en_US/labels.properties (All paths are relative to the flash builder project root) and contains (amongst other things) these keys: metric.q3 = Overall Satisfaction metric.q5 = Personnel metric.q9a = Issue Resolution metric.q42 = Visit Duration Sat metric.q34 = Visit Duration I have written some FlexUnit tests that run in my local Flash Player that exercise these resources -- they check that every label is represented in the metrics array, for example, so I know that the resource file is loaded when run locally. However, when I copy the module .swf file over to my server, the combo box to which the array is assigned is empty. I copy the .swf like so, if it matters: rsync -rlDv --inplace -T /tmp ~/projects/flex_reports/bin-debug/rankingFilter.swf HOSTNAME:WEBROOT/flashPath/ Why is this? I am not able to debug the remote module because our surrounding site sets up a lot of context and makes some database calls to determine which module to load. I'm hoping to get some pointers on why resource bundles might not show up. I'd understand it if the array was present with wrong labels, but the array is instead completely empty, which is pretty odd.

    Read the article

  • Flex: How to access movieclips within an imported swf

    - by squared
    Hello, I have imported a swf (not created with Flex, i.e. non-framework) into a Flex application. Once loaded, I would like to access movieclips within that imported swf. Looking at Adobe's docs (http://livedocs.adobe.com/flex/3/html/help.html?content=controls_15.html), it seems straightforward; however, their examples are between a Flex app and an imported swf (created with Flex). Like their example, I'm trying to use the SystemManager to access the imported swf's content; however, I receive the following error: TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::MovieClip@58ca241 to mx.managers.SystemManager. Is this error occurring because I'm importing a non-framework swf into a framework swf? Thanks in advance for any assistance. Code: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:SWFLoader source="assets/test.swf" id="loader" creationComplete="swfLoaded()" /> <mx:Script> <![CDATA[ import mx.managers.SystemManager; [Bindable] public var loadedSM:SystemManager; private function swfLoaded():void { loadedSM = SystemManager(loader.content); } ]]> </mx:Script> </mx:Application>

    Read the article

  • Flex datagrid headerColor style is not working....

    - by Jerry
    Hello guys. I am trying to change the datagrid header color by editing headerColor style. I could change the font size, font family...etc except the headerColor. Would someone help me about it? Thanks a lot. My code Mxml <mx:DataGrid id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{cityinfoResult3.lastResult}"> <mx:columns> <mx:DataGridColumn headerText="Detail" dataField="detail"/> <mx:DataGridColumn headerText="Name" dataField="name"/> </mx:columns> </mx:DataGrid> Style #dataGrid{ headerColors: #ff6600; //everything works except this one. The color can't be //changed? rollOverColor: #33ccff; textRollOverColor: #ffffff; iconColor: #ff0000; fontFamily: Arial; fontSize:12; dropShadowEnabled: true; alternatingItemColors: #330099, #0000cc; color: #ffffff; borderColor: #ffffff; }

    Read the article

  • Flex: Linebreak problem with spark.components.TextArea inside a MXDataGridItemRenderer

    - by radgar
    Hi, I have a DataGrid that has a MXDataGridItemRenderer applied as an itemEditor to one of the columns. The editor includes a spark.components.TextArea control. By default, any text item editor of a datagrid closes itself when [enter] key is pressed.. Keeping this in mind; What I want to do is: Prevent editor from closing on [SHIFT+ENTER] key but accept the linebreak (I can do this, see code below) Close the editor on [ENTER] key but do not accept the linebreak (could not achieve this) Here is the current code in the MXDataGridItemRenderer: <s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" focusEnabled="true" > <fx:Script> <![CDATA[ protected function onTxtDataKeyDown(event:KeyboardEvent):void { //Prevent editor from closing on [SHIFT+ENTER] key but accept the linebreak // » this works if (event.shiftKey && event.keyCode == 13) { event.stopImmediatePropagation(); } //Close the editor on [ENTER] key but do not accept the linebreak else if (event.keyCode == 13) { event.preventDefault(); } // » does not work } ]]> </fx:Script> <s:TextArea id="txtData" paddingTop="3" lineBreak="explicit" text="{dataGridListData.label}" verticalScrollPolicy="auto" horizontalScrollPolicy="off" keyDown="onTxtDataKeyDown(event)" /> I also tried the textInput event but that did not do the trick. So: How can I prevent the linebreak when the editor is closed on [enter] key? Any help is appreciated. Thanks. EDIT: If I change the spark.components.TextArea to mx.controls.TextArea, second part with event.preventDefault() will work as expected but then the first part where SHIFT+ENTER accepts the linebreak will not work.

    Read the article

  • Flex NetConnection error: Property onDirtyList not found on flash.net.NetConnection

    - by David Wolever
    I'm having some trouble with NetConnection. The following code makes a connection without issue… var n:NetConnection = new NetConnection(); n.objectEncoding = ObjectEncoding.AMF0; n.addEventListener(NetStatusEvent.NET_STATUS, function(...args):void { trace("HERE"); }); n.connect("rtmp://...host...", ...args); But as soon as the NET_STATUS event handler finishes (ie, hitting "step into" with the debugger), I get this error: ReferenceError: Error #1069: Property onDirtyList not found on flash.net.NetConnection and there is no default value. Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetConnection was unable to invoke callback onDirtyList. error=ReferenceError: Error #1069: Property onDirtyList not found on flash.net.NetConnection and there is no default value. at Test/___Test_Application1_creationComplete()[/Users/wolever/Workspace/Test/src/Test.mxml:13] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9440] at mx.core::UIComponent/set initialized()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1168] at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8744] at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8684] Which is kind of scary because onDirtyList only yields two hits on Google. So... Any suggestions?

    Read the article

  • Inconsistent behavior working with "Flex on Rails" example.

    - by kmontgom
    I'm experimenting with Flex and Rails right now (Rails is cool). I'm following the examples in the book "Flex on Rails", and I'm getting some puzzling and inconsistent behavior. Heres the Flex MXML: <mx:HTTPService id="index" url="http://localhost:3000/people.xml" resultFormat="e4x" /> <mx:DataGrid dataProvider="{index.lastResult.person}" width="100%" height="100%"> <mx:columns> <mx:DataGridColumn headerText="First Name" dataField="first-name"/> <mx:DataGridColumn headerText="Last Name" dataField="last-name"/> </mx:columns> </mx:DataGrid> <mx:Script> <![CDATA[ import mx.controls.Alert; private function main():void { Alert.show( "In main()" ); } ]]> </mx:Script> When I run the app from my IDE (Amythyst beta, also cool), the DataGrid appears, but is not populated. The Alert.show() also triggers. When I go out to a web browser and manually enter the url (http://localhost:3000/people.xml), the Mongrel console shows the request coming through and the browser shows the web response. No exceptions or other error messages occur. Whats the difference? Do I need to alter some OS setting? I'm using Win7 on an x64 machine.

    Read the article

< Previous Page | 8 9 10 11 12 13 14  | Next Page >