[flexcoders] xml parser
A few months ago, I downloaded a sample written by Michael J. Prichard that took an object and translated it to xml and then posted this to a jsp. Somehow I lost the sample and I'm having trouble finding where it was on the web. Does anyone know where I can find this sample? This was the function call in the sample to translate to xml: function toXML(object2Convert:Object, arrayName:String):String Thank you, Kim -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] RE: OutOfMemory Error
As suggested I ran the compile outside of Tomcat. The application compiled just fine using mxmlc. No out of memory error.So Iguess I can assume the problem lies in Tomcat. I upped the memory allocation in the catalina.bat file to 1024. No luck. I'm still getting the error compiling with Tomcat. If anyone else has any suggestions, please let me know. I'm still wondering if it has to do with flex beta 2 since the problem did occur shortly after installing that. Although I completely removed it and still have the same problem. Thanks, Kim --- In flexcoders@yahoogroups.com, "Peter Farland" [EMAIL PROTECTED] wrote: Yep, as Carson said, I'd be interested to see what happens when you change the maximum memory allocation size for the jvm.config file used by mxmlc? I'm also interested to see whether other simpler applications cause this error? If it still happens then, would it be possible to prepare a reproducible test case and file a bug (or prepare a bug and send it to me so I can forward it to QA?). At the very least if you could describe the number of components, classes and files used in the application it might help too. Thanks, Pete From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kim Reddington Sent: Wednesday, April 05, 2006 12:41 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: OutOfMemoryError Peter, I am running the application in Flex 1.5 and have installed Flex 2.0 for a different project. It doesn't matter how I run the app, I always get an OutOfMemory Error. I've tried running from Flex Builder, by typing the mxml filename in the browser address field, by bringing up the app via a jsp. I've tried it in IE and Firefox. I've removed flex 1.5 and flex 20 and reinstalled flex 1.5. Anyway I try to compile it still gives me an error. Yes, I have "save generated as" and "save swf file" both enabled to help me track down this problem. Someone else asked about Memory. I've upped the memory in Tomcat to be above and beyond what my colleagues are running. They can still get the app to run on their PC. The only differences are what software we have installed on our machines outside of this project. Thanks, Kim --- In flexcoders@yahoogroups.com, "Peter Farland" pfarland@ wrote: Hi Kim, How are you compiling the application? The reason I ask is that it's not clear from your email what is reporting this error or where/how it is reported to you... When you say that you tried to run it in a browser, are you relying on the webtier compiler by browsing to a .mxml file to dynamically compile your application to a SWF? Or are you using JSP tags to dynamically general .mxml (If so, then I'm confused as you say you can see the .as file being generated... is this simply because you have keep generated actionscript enabled?). Or are you using Flex Builder?Actually, I need further clarification - are you using Flex 2 to compile this application, or did you simply install Flex 2 in addition to/next to a Flex 1.5 application and now the Flex 1.5 application is reporting this error? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kim Reddington Sent: Wednesday, April 05, 2006 10:28 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] OutOfMemoryError I have a large application that I've been running for over a year. All of a sudden the app stopped running. I am getting an OutOfMemory Error when I tried to run in any browser. My first thought was it must have been the changes I've made. Luckily, we are using CVS, so I grabbed a version of our software from a couple weeks ago. Well, the out of memory error is still there. So then I thought maybe it's because I installed Flex 2 Beta 2, so I uninstalled all the Beta 2 items (Builder, FDS, etc). The application was still erroring out. In trying to debug what is happening, I can see that the .as file is being generated, but the SWF file is not being created. The comiler is timing out before it completes the SWF.If anyone has any ideas of what I could look at, try, whatever. I been trying to figure this out for a couple of weeks and have run out of ideas. Has anyone seen this before? Has anyone had similar experiences after installing Flex 2? What might have changed? Thank you so much for your help, Kim -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS * Visit your group "flexcoders http://groups.yahoo.com/group/flexcoders " on the web.* To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTE
[flexcoders] OutOfMemoryError
I have a large application that I've been running for over a year. All of a sudden the app stopped running. I am getting an OutOfMemory Error when I tried to run in any browser. My first thought was it must have been the changes I've made. Luckily, we are using CVS, so I grabbed a version of our software from a couple weeks ago. Well, the out of memory error is still there. So then I thought maybe it's because I installed Flex 2 Beta 2, so I uninstalled all the Beta 2 items (Builder, FDS, etc). The application was still erroring out. In trying to debug what is happening, I can see that the .as file is being generated, but the SWF file is not being created. The comiler is timing out before it completes the SWF. If anyone has any ideas of what I could look at, try, whatever. I been trying to figure this out for a couple of weeks and have run out of ideas. Has anyone seen this before? Has anyone had similar experiences after installing Flex 2? What might have changed? Thank you so much for your help, Kim -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Re: OutOfMemoryError
Peter, I am running the application in Flex 1.5 and have installed Flex 2.0 for a different project. It doesn't matter how I run the app, I always get an OutOfMemory Error. I've tried running from Flex Builder, by typing the mxml filename in the browser address field, by bringing up the app via a jsp. I've tried it in IE and Firefox. I've removed flex 1.5 and flex 20 and reinstalled flex 1.5. Anyway I try to compile it still gives me an error. Yes, I have "save generated as" and "save swf file" both enabled to help me track down this problem. Someone else asked about Memory. I've upped the memory in Tomcat to be above and beyond what my colleagues are running. They can still get the app to run on their PC. The only differences are what software we have installed on our machines outside of this project. Thanks, Kim --- In flexcoders@yahoogroups.com, "Peter Farland" [EMAIL PROTECTED] wrote: Hi Kim, How are you compiling the application? The reason I ask is that it's not clear from your email what is reporting this error or where/how it is reported to you... When you say that you tried to run it in a browser, are you relying on the webtier compiler by browsing to a .mxml file to dynamically compile your application to a SWF? Or are you using JSP tags to dynamically general .mxml (If so, then I'm confused as you say you can see the .as file being generated... is this simply because you have keep generated actionscript enabled?). Or are you using Flex Builder? Actually, I need further clarification - are you using Flex 2 to compile this application, or did you simply install Flex 2 in addition to/next to a Flex 1.5 application and now the Flex 1.5 application is reporting this error? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kim Reddington Sent: Wednesday, April 05, 2006 10:28 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] OutOfMemoryError I have a large application that I've been running for over a year. All of a sudden the app stopped running. I am getting an OutOfMemory Error when I tried to run in any browser. My first thought was it must have been the changes I've made. Luckily, we are using CVS, so I grabbed a version of our software from a couple weeks ago. Well, the out of memory error is still there. So then I thought maybe it's because I installed Flex 2 Beta 2, so I uninstalled all the Beta 2 items (Builder, FDS, etc). The application was still erroring out. In trying to debug what is happening, I can see that the .as file is being generated, but the SWF file is not being created. The comiler is timing out before it completes the SWF. If anyone has any ideas of what I could look at, try, whatever. I been trying to figure this out for a couple of weeks and have run out of ideas. Has anyone seen this before? Has anyone had similar experiences after installing Flex 2? What might have changed? Thank you so much for your help, Kim -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS * Visit your group "flexcoders http://groups.yahoo.com/group/flexcoders " on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/ . _Kim ReddingtonPrincipal Consultant/DeveloperDeluxe Technologieshttp://www.deluxetechnologies.com508-231-8744 -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Passing binding data to a custom combobox
I have a statePicker component that I created. If I try to pass a value to the statePicker, then the comboBox will display the proper label for the data I passed in. For example, this line of code will display Massachusetts in the comboBox. StatePicker id="state" width="200" statePassedIn="MA" / What I really need to do is bind the data to the variable, statePassedIn. I have successfully bound data to a custom component before with no trouble, but for some reason cannot figure out how to get the data to pass in for the the comboBox. statePassedIn shows up empty in the statePicker component. For example, here is a snippet of what I am trying to do, that won't work. var test:String; function onInit() { //I have determined that this ftn is indeed running properly test = "MA"; } ... StatePicker id="state" width="200" statePassedIn="{test}" / ... StatePicker.mxml ?xml version="1.0" encoding="utf-8"? mx:Canvas xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*" mx:Model id="statesModel" source="data/states.xml"/ mx:Script ![CDATA[ var selectedItem:Object;public var src;var _statePassedIn;function set statePassedIn(src) {_statePassedIn = src;}private function setInitialItem():Boolean{var items:Array = mx.utils.ArrayUtil.toArray(statesModel.state);var dataValueInit:String = _statePassedIn; var dataValueCur:String; mx.controls.Alert.show(statePassedIn);for ( var i:Number=0; iitems.length; i++ ) { //loop over the items in the dataProvider dataValueCur = items[i].data; //get the current item.data value if ( dataValueCur == dataValueInit ) { //compare desired value to current item.data valuestateComboBox.selectedIndex = i; //set the seletedIndex of the combo box return true; } }//for ( var i:Number=0; return false;} ]] /mx:Script mx:ComboBox id="stateComboBox" dataProvider="{statesModel.state}" labelField="name" width="{this.width}" change="this.selectedItem=event.target.selectedItem" initialize="setInitialItem()"//mx:Canvas Please help, Kim _Kim ReddingtonPrincipal Consultant/DeveloperDeluxe Technologieshttp://www.deluxetechnologies.com508-231-8744 -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] LinkBar
Is there anyway that I can have the text of the selected link label be a different color? I know that there is textSelectedColor, but this only changes the color when you actually press down the mouse button. I would like the link to stay that color until another link is selected. Thanks, Kim -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Tile
Is there anyway that I can override the rows and columns that a tile uses to create itself? I would like to determine that there be 3 rows across, but the Tile tag automatically sets up 2x2. I would like 3x1. Maybe I could create a new Tile component that extends Tile? I'm just not sure what sets this up. Thanks, Kim -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] fade when image changes
I am trying to use the PhotoViewer sample to help me create a fade effect. In the below code, I have a component that successfully fades in when the component (cardfileToImage) is created. I would like the first image to fade out while a new image fades in when the user selects a new image. Just like the PhotoViewer sample. PhotoViewer is fading an actualy image, but I need to fade a whole component because it is an image pair. How can I get the app to fade the images in and out when the user selects a new image pair? The component fades properly when it is first created, but I'm not sure what to use to tell it to fade when the user select a new image. The new image does appear, but does not fade in. Here is the code I have for the fading: ?xml version="1.0" encoding="utf-8"? mx:Canvas xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*" mx:Script ![CDATA[ var activeControl;public var src:String;/* public function loadCard() { if (activeControl==card1) { // card2.imageName = imageName; } else { card1.imageName = imageName; } }*/function set imageName(src) { if (activeControl==card1) { card2.imageName = src; } else { card1.imageName = src; } } function mix(showObj, hideObj) { activeControl=showObj; var e1 = new mx.effects.Fade(hideObj); e1.duration=800; e1.alphaTo = 0; var e2 = new mx.effects.Fade(showObj); e2.duration=800; e2.alphaTo = 100; var mixEffect = new mx.effects.Parallel(); mixEffect.addChild(e1); mixEffect.addChild(e2); mixEffect.playEffect(); } ]] /mx:Script cardfileToImage id="card1" sizeType="" creationComplete="mix(card1, card2)"/cardfileToImage id="card2" sizeType="" creationComplete="mix(card2, card1)"/ /mx:Canvas Thank you so much, Kim -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Dragging a TextInput from one canvas to another
Title: Message I am trying to drag the text of a TextInput control from one canvas to another. I found some code and modified it to let me drag the text of the TextInput from one canvas to a dataProvider of a List, but I am having trouble modifying the code to drag the text to another canvas. What am I missing? The mouseDown seems to work as you can see the control moving into the canvas, but the text doesn't drop in. Here is the code I am working with: ?xml version="1.0"? mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" width="400"height="600" marginLeft="6" marginRight="6" initialize="appInit()" mx:Script![CDATA[// Import the DragManager and DragSource classes.import mx.managers.DragManager;import mx.core.DragSource; // Handle the drag initialization for the Canvas containers// in the mouseDown event.function dragIt(event, text, format) {var ds:DragSource = new DragSource(); ds.addData(text, format);DragManager.doDrag(event.target, ds, mx.controls.TextInput,{backgroundColor:event.target.backgroundColor, width:30, height:30},undefined, undefined, 30);} // Handle the dragEnter event for the List controls.function doDragEnter(event, format) {if (event.dragSource.hasFormat(format) || format == "any"){event.handled = true;event.target.drawFocus(true);}} // Handle the dragExit event for the List controls.function doDragExit(event) {event.target.drawFocus(false);}// Handle the dragOver event for the List controls.function doDragOver(event) {if (Key.isDown(Key.CONTROL))event.action = "">else if (Key.isDown(Key.SHIFT))event.action = "">elseevent.action = "">}// Handle the dragDrop event for the List controls.function doDragDrop(event, target, formats) {var prefix:String = "";if (event.action == DragManager.COPY)prefix = "Copy of ";else if (event.action == DragManager.LINK)prefix = "Link to "; // Since the drag is over, remove focus from the target.doDragExit(event);for (var i = 0; i formats.length; i++){var data = ""> if (data != undefined)this[target].addItem(prefix + data);}} // Initialize the List controls.function appInit() {firstList.text = [];//secondList.dataProvider = [];//thirdList.dataProvider=[];}]]/mx:Script mx:Tile width="175"mx:Canvas backgroundColor="#FF" borderStyle="solid" width="200" height="100"mx:TextInput id="redcanvas1" mouseDown="dragIt(event, 'test', 'red')" x="8" y="6"//mx:Canvas /mx:Tilemx:VBox width="100%" height="100%"mx:Label text="Drag red items into this list" /mx:Canvas backgroundColor="#FF"dragEnter="doDragEnter(event, 'red')" dragExit="doDragExit(event);" dragOver="doDragOver(event);" dragDrop="doDragDrop(event, 'firstList.text', ['red'])" width="100%" height="33%" mx:Text id="firstList" text="Text" //mx:Canvas mx:Label text="Drag any items into this list" /mx:List dragEnter="doDragEnter(event, 'any')" dragExit="doDragExit(event);" dragOver="doDragOver(event);" dragDrop="doDragDrop(event, 'thirdList', ['red','blue','green'])" width="100%" height="33%" id="thirdList" //mx:VBox/mx:Application Thank you so much for you help!! Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Can Flex do this?
Title: Message I am new to Flex and am trying to get a feel for the capabilities of Flex. GE has created a drawing tool that I know they utilized Flash to create. You can view this great tool at http://www.imaginationcubed.com. I am wondering if Flex has the capabilities to create something similar, orif you would need to create the tool in Flash and embed the Flash tool into a Flex application? Thank you.