Search Results

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

Page 5/14 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Where does code within Script tags go in the resulting AS class?

    - by Hanno Fietz
    I was wondering what happens to the code contained in an <mx:Script> tag. If I define a function tehre, it just becomes a member function of the generated class. But I noticed that it seems OK for the compiler if I just write some (static) method calls there (specifically, I call Font.registerFont()). I feel kind of guilty for doing this, because I have no idea what's really happening and when the code gets executed.

    Read the article

  • Flex Setting form height dynamically

    - by Daryl
    I'm not sure if this is possible, is there a way to get the <mx:Form> to set its own height based on the position of an element within it? For example something like this: <mx:Form height="{submitBtn.y + submitBtn.height}"> <mx:FormItem>... </mx:FormItem> <mx:FormItem>... </mx:FormItem> <mx:FormItem>... </mx:FormItem> <mx:FormItem> <s:Button id="submitBtn" label="Submit" /> </mx:FormItem> </mx:Form> where the form height is dynamically set based on submitBtn's y position and its height. I tried using Alert.show to show these values and turned out submitBtn.y = 0 and submitBtn.height = 21. height sounds reasonable, but I know the y of submitBtn can't be 0 since it's below several other Is it possible to set the form height dynamically?

    Read the article

  • How to rotate MXML component round its center like a wheel respectfully to mouse?

    - by Ole Jak
    So I have that panel or any other mxml component. I want somehow to rotate it around like a wheel of a car with which you drive it... loke a Racing wheel... sow like when mousebutton is down it captures pont of component... when you move mouse component rotates (not moves) according to new mouse position... How to rotate MXML component round its center like a wheel respectfully to mouse? welll feel free to edit this question because I know Ive formulated it in a bad way...

    Read the article

  • Why wouldn't a flex remoteobject be able to work within a custom component?

    - by Gary
    Please enlighten this flex noob. I have a remoteobject within my main.mxml. I can call a function on the service from an init() function on my main.mxml, and my java debugger triggers a breakpoint. When I move the remoteobject declaration and function call into a custom component (that is declared within main.mxml), the remote function on java-side no longer gets called, no breakpoints triggered, no errors, silence. How could this be? No spelling errors, or anything like that. What can I do to figure it out? mxml code: < mx:RemoteObject id="myService" destination="remoteService" endpoint="$(Application.application.home}/messagebroker/amf" > < /mx:RemoteObject > function call is just 'myService.getlist();' when I move it to a custom component, I import mx.core.Application; so the compiler doesn't yell my child component: child.mxml <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" > <mx:Script> <![CDATA[ import mx.core.Application; public function init():void { helloWorld.sayHello(); } ]]> </mx:Script> <mx:RemoteObject id="helloWorld" destination="helloService" endpoint="$(Application.application.home}/messagebroker/amf" /> <mx:Label text="{helloWorld.sayHello.lastResult}" /> </mx:Panel> my main.mxml: <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" xmlns:test="main.flex.*" > <mx:Script> <![CDATA[ [Bindable] public var home:String; [Bindable] public var uName:String; public function init():void { //passed in by wrapper html home = Application.application.parameters.appHome; uName = Application.application.parameters.uName; } ]]> </mx:Script> <test:child /> </mx:Application>

    Read the article

  • MXMLC Ant task results in java.lang.OutOFMemoryError

    - by Mims H. Wright
    I'm making a change to a set of code for a Flex project that I didn't write and was set up to compile using ant tasks. I assume that the codebase was stable at the last checkin but I'm running into memory issues when trying to build a project using MXMLC and ant (see stack trace below). Before, I was just getting an out of memory error. I tried using a different machine and got this more verbose exception (including problems with the image fetcher). I've tried using various versions of the SDK, I've tried replacing the <mxmlc> tag with <exec executable="mxmlc"> with no luck. Here is my java version in case that has anything to do with it: » java -version java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065) Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode) Any help would be appreciated. Thanks! Buildfile: build.xml compileSWF: [echo] Compiling main.swf... [mxmlc] Loading configuration file /Applications/Adobe Flash Builder 4 Plug-in/sdks/4.0.0beta2/frameworks/flex-config.xml [mxmlc] Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space [mxmlc] at java.awt.image.PixelGrabber.setDimensions(PixelGrabber.java:360) [mxmlc] at sun.awt.image.ImageDecoder.setDimensions(ImageDecoder.java:62) [mxmlc] at sun.awt.image.JPEGImageDecoder.sendHeaderInfo(JPEGImageDecoder.java:71) [mxmlc] at sun.awt.image.JPEGImageDecoder.readImage(Native Method) [mxmlc] at sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:119) [mxmlc] at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246) [mxmlc] at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172) [mxmlc] at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136) [mxmlc] /src/com/amtrak/components/map/MapAsset.mxml: Error: exception during transcoding: Failed to grab pixels for image /src/assets/embed_assets/images/zoomed_map_wide.jpg [mxmlc] [mxmlc] /src/com/amtrak/components/map/MapAsset.mxml: Error: Unable to transcode /assets/embed_assets/images/zoomed_map_wide.jpg. [mxmlc] [mxmlc] Error: Java heap space [mxmlc] [mxmlc] java.lang.OutOfMemoryError: Java heap space [mxmlc] at java.util.ArrayList.<init>(ArrayList.java:112) [mxmlc] at macromedia.asc.util.ObjectList.<init>(ObjectList.java:30) [mxmlc] at macromedia.asc.parser.ArgumentListNode.<init>(ArgumentListNode.java:30) [mxmlc] at macromedia.asc.parser.NodeFactory.argumentList(NodeFactory.java:116) [mxmlc] at macromedia.asc.parser.NodeFactory.argumentList(NodeFactory.java:97) [mxmlc] at flex2.compiler.mxml.ImplementationGenerator.generateBinding(ImplementationGenerator.java:563) [mxmlc] at flex2.compiler.mxml.ImplementationGenerator.generateBindingsSetupFunction(ImplementationGenerator.java:864) [mxmlc] at flex2.compiler.mxml.ImplementationGenerator.generateBindingsSetup(ImplementationGenerator.java:813) [mxmlc] at flex2.compiler.mxml.ImplementationGenerator.generateInitializerSupportDefs(ImplementationGenerator.java:1813) [mxmlc] at flex2.compiler.mxml.ImplementationGenerator.generateClassDefinition(ImplementationGenerator.java:1005) [mxmlc] at flex2.compiler.mxml.ImplementationGenerator.<init>(ImplementationGenerator.java:201) [mxmlc] at flex2.compiler.mxml.ImplementationCompiler.generateImplementationAST(ImplementationCompiler.java:498) [mxmlc] at flex2.compiler.mxml.ImplementationCompiler.parse1(ImplementationCompiler.java:196) [mxmlc] at flex2.compiler.mxml.MxmlCompiler.parse1(MxmlCompiler.java:168) [mxmlc] at flex2.compiler.CompilerAPI.parse1(CompilerAPI.java:2851) [mxmlc] at flex2.compiler.CompilerAPI.parse1(CompilerAPI.java:2804) [mxmlc] at flex2.compiler.CompilerAPI.batch2(CompilerAPI.java:446) [mxmlc] at flex2.compiler.CompilerAPI.batch(CompilerAPI.java:1274) [mxmlc] at flex2.compiler.CompilerAPI.compile(CompilerAPI.java:1488) [mxmlc] at flex2.compiler.CompilerAPI.compile(CompilerAPI.java:1375) [mxmlc] at flex2.tools.Mxmlc.mxmlc(Mxmlc.java:282) [mxmlc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [mxmlc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [mxmlc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [mxmlc] at java.lang.reflect.Method.invoke(Method.java:597) [mxmlc] at flex.ant.FlexTask.executeInProcess(FlexTask.java:280) [mxmlc] at flex.ant.FlexTask.execute(FlexTask.java:225) [mxmlc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) [mxmlc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [mxmlc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [mxmlc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [mxmlc] at java.lang.reflect.Method.invoke(Method.java:597) BUILD FAILED /src/build.xml:49: mxmlc task failed

    Read the article

  • How to make instance of mxml and pass parameters?

    - by toshe
    i want to create instance of mxml (in my case EventList) and pass parameters. My Event List is a list of panels so I want to pass parameters and generate dynamically n number of panels (n-parameter to pass). I have the main app where I have toggle button bar when I click on the first I want for example to generate 3 panels (n=3) on the second button 20 panels (n=20) etc. How can I do this? How can I pass n and what is the best way to show the list? I whant to generate the list when I click on the toggle button!

    Read the article

  • How is it possible to extend an SWFLoader with MXML?

    - by michael-cereda
    I'm currently doing the following.. Main application: " " In the Component: First Try: ]]> </fx:Script> <fx:Declarations></fx:Declarations> <mx:SWFLoader x="0" y="0" id="loader"/> </s:Group> Second Try: <?xml version="1.0" encoding="utf-8"?> <s:Group 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[ [Bindable] public var source:String; ]]> </fx:Script> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <mx:SWFLoader x="0" y="0" source="{source}"/> </s:Group> But the component displays only a "Not Found" icon in both cases. Thanks

    Read the article

  • Error while assigning the data to dataGrid Dataprovided

    - by sudeep kumar
    Hi , I was trying to acces the datagrid at runtime and want to assign the data to it like public function getGridData(reportsArray:ArrayCollection):void{ reportData = reportsArray; trace(" The length of the datagrid is "+reportData.length); graphDataGrid.dataProvider = reportData; invalidateDisplayList(); } but I was getting this error TypeError: Error #1009: Cannot access a property or method of a null object reference. at views.charts::ComparisonAnalysis/createDataGrid()[C:\FlexProjects\AdvancedMetering\views\charts\ComparisonAnalysis.mxml:32] at views.charts::ComparisonAnalysis/getGridData()[C:\FlexProjects\AdvancedMetering\views\charts\ComparisonAnalysis.mxml:26] at components.CustomReport::CustomReportSelector/getResultHandler()[C:\FlexProjects\AdvancedMetering\components\CustomReport\CustomReportSelector.mxml:147] at components.CustomReport::CustomReportSelector/__reportingBase_dataGridResultChanged()[C:\FlexProjects\AdvancedMetering\components\CustomReport\CustomReportSelector.mxml:203] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298] at components.CustomReport::ReportingBase/getDataFromServer()[C:\FlexProjects\AdvancedMetering\components\CustomReport\ReportingBase.as:98] at components.CustomReport::ReportingBase/getResults()[C:\FlexProjects\AdvancedMetering\components\CustomReport\ReportingBase.as:78] at components.CustomReport::CustomReportSelector/getGraphData()[C:\FlexProjects\AdvancedMetering\components\CustomReport\CustomReportScripts.as:20] at components.CustomReport::CustomReportSelector/__getGraphandGridData_click()[C:\FlexProjects\AdvancedMetering\components\CustomReport\CustomReportSelector.mxml:248] Can someboedy please let me know what the problem it looks like the datagrid is not instantiated at this ppoint of time Sudee[

    Read the article

  • Updating external Flex components from an action

    - by Scott
    Hello, I'm new to Flex and am having trouble understanding Events. I think Events are what I want to use for my situation. I have 2 components, addUser.mxml and listUsers.mxml. I access these from a ViewStack in my main application. When I load listUsers.mxml it shows a list of current users in a datagrid via a HTTPService call. When I add a user using the form on addUser.mxml I would like the datagrid in listUsers.mxml to refresh when I return to that view to show the new user. I've tried several different things with addEventListener and dispatchEvent but can't seem to get it working. Can someone help me with this logic?

    Read the article

  • Flash Builder 4: Call main function from a component function

    - by hyper
    i try to make a login sistem in flex, and my app looks like this: i have a main.mxml. when the app loads, a function named "start" is called. it verifies if the user is logged in or not. if "true" the user is redirected to a dashboard, if "false", a component named login is loaded. my login.mxml component has 2 input boxes (user & pass) and a "Submit" button. when the button is pressed a function named "send_login" sends the user and the pass values to the server. My problem sounds like this: when i press the Submit button in my login component, after user and pass are sended... i want to call again the "start" function from my main.mxml to check again if the user is logged in or not... i need some kind of as2 "_root" this is how my code looks: main.mxml public function start():void { currentState="Start"; loginstatus(); } login.mxml private function send_login(event:Event):void { ... bla bla send user and pass.... scriptLoader.addEventListener(Event.COMPLETE, handleLoadSuccessful); } private function handleLoadSuccessful(evt:Event):void { trace("Data sent."); start(); <-- HERE i want to call the function from main.mxml } any help is welcomed!

    Read the article

  • Where does "new" fit in the flex creation cycle?

    - by deux11
    In the following code, the call to myChild.bar() results in an exception because myChild is null. myParent is a valid object. What I don't understand is why myChild has not been created yet. I have read the following document related to object creation sequence, but I am unsure how "new" is related: http://livedocs.adobe.com/flex/3/html/help.html?content=layoutperformance_03.html Any help is appreciated! // Main.mxml <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="created()"> <mx:Script> <![CDATA[ public var myParent:Parent = new Parent(); public function created():void { myParent.foo(); } ]]> </mx:Script> </mx:Application> // Parent.mxml <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"> <mx:Script> <![CDATA[ public function foo():void { myChild.bar(); } ]]> </mx:Script> <Child id="myChild"/> </mx:Canvas> // Child.mxml <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ public function bar():void { trace("Hello World"); } ]]> </mx:Script> </mx:Canvas>

    Read the article

  • Why wouldn't a flex remoteobject work within a custom component?

    - by Gary
    Please enlighten this flex noob. I have a remoteobject within my main.mxml. I can call a function on the service from an init() function on my main.mxml, and my java debugger triggers a breakpoint. When I move the remoteobject declaration and function call into a custom component (that is declared within main.mxml), the remote function on java-side no longer gets called, no breakpoints triggered, no errors, silence. How could this be? No spelling errors, or anything like that. mxml code: &ltmx:RemoteObject id="myService" destination="remoteService" endpoint="$(Application.application.home}/messagebroker/amf" &gt &lt/mx:RemoteObject%gt function call is just 'myService.getlist();' when I move it to a custom component, I import mx.core.Application; so the compiler doesn't yell

    Read the article

  • Flex: View Stack Navigator

    - by Deena
    Hi, I have a component mxml file in which i have a view stack, on click of a button i navigate to the first child, now i need to navigate to the second child during onclick of a button present in the second child. All the childs are component files included within the view stack. How could this be done, Sample code is present below, --------------------Application.mxml--------------------- <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" > <mx:Script> <![CDATA[ private function loadScreen():void { navigationViewStack.selectedChild=id_offering; } ]]> </mx:Script> <mx:Button label="Save" click="loadScreen();"/> </mx:Canvas> <mx:ViewStack id="navigationViewStack" width="100%" height="100%"> <components:dashboard id="id_dashboard" label="Dashboard" /> <components:offering id="id_offering" label="Offering" /> <components:IssueSec id="id_issueSec" label = "Issues"/> </mx:ViewStack> -------------------------Ends-------------------------------------- Now in my offering.mxml file if i try to access navigationViewStack i am getting an error stating 'Access of undefined property navigationViewStack. Help me on how to access the view stack from my component mxml file. Thanks! Cheers, Deena

    Read the article

  • Using mx.charts in a Flex Hero mobile project

    - by Alexander Farber
    Hello, Adobe states that Charts are supported in mobile projects but when I try to change the following working files (created project with File - New - Flex Mobile Project - Google Nexus One): MyTest.mxml: <?xml version="1.0" encoding="utf-8"?> <s:MobileApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" firstView="views.MyTestHome"> <s:navigationContent> <s:Button label="Home" click="navigator.popToFirstView();"/> </s:navigationContent> <s:actionContent/> </s:MobileApplication> MyTestHome.mxml: <?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" title="Test Chart"> </s:View> to the new MyTestHome.mxml: <?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark" title="Test Chart"> <fx:Script> <![CDATA[ import mx.collections.*; [Bindable] private var medalsAC:ArrayCollection = new ArrayCollection( [ {Country: "USA", Gold: 35, Silver:39, Bronze: 29 }, {Country:"China", Gold: 32, Silver:17, Bronze: 14 }, {Country:"Russia", Gold: 27, Silver:27, Bronze: 38 } ]); ]]> </fx:Script> <mx:PieChart id="chart" height="100%" width="100%" paddingRight="5" paddingLeft="5" color="0x323232" dataProvider="{medalsAC}" > <mx:series> <mx:PieSeries labelPosition="callout" field="Gold"> <mx:calloutStroke> <s:SolidColorStroke weight="0" color="0x888888" alpha="1.0"/> </mx:calloutStroke> <mx:radialStroke> <s:SolidColorStroke weight="0" color="#FFFFFF" alpha="0.20"/> </mx:radialStroke> <mx:stroke> <s:SolidColorStroke color="0" alpha="0.20" weight="2"/> </mx:stroke> </mx:PieSeries> </mx:series> </mx:PieChart> </s:View> and also add c:\Program Files\Adobe\Adobe Flash Builder Burrito\sdks\4.5.0\frameworks\libs\datavisualization.swc c:\Program Files\Adobe\Adobe Flash Builder Burrito\sdks\4.5.0\frameworks\libs\sparkskins.swc c:\Program Files\Adobe\Adobe Flash Builder Burrito\sdks\4.5.0\frameworks\libs\mx\mx.swc to Flex Build Path (clicking "Add SWC" button): Then it fails with the error: Could not resolve to a component implementation. Does anybody please have an idea here? Alex

    Read the article

  • How do I update an xml file with msbuild with two namespaces?

    - by c3rin
    This msbuild below task can take into account one namespace, but in the case where I'm updating an mxml (flex) that has a mix of namespaces, can I use this task or another msbuild task to do the update? <XmlUpdate Prefix="fx" Namespace="http://ns.adobe.com/mxml/2009" XmlFileName="myFlexApp.mxml" Xpath="//mx:Application/fx:Declarations/fx:String[@id='stringId']" Value="xxxxx"> Here is the flex xml I'm trying to update: <mx: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:Declarations> <fx:String id="stringId">UPDATE_ME</fx:String> </fx:Declarations></mx:Application>

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >