[flexcoders] Can anyone recommend a funnel chart for Flex?
Hello I am in need of a Funnel Chart compatible with Flex 2. The ones available from FusionGadgets (http://www.fusioncharts.com/gadgets/Gallery.asp) would be perfect, but they are built with AS2 and the company doesn't plan to upgrade them until late next year. Has anyone found or built a similar chart for Flex 2? Thanks for your suggestions! Rachel Maxim
[flexcoders] Re: Events in AS3 Classes
The Adobe Flex 2: Training from the Source book has a chapter on custom events that's very helpful. http://www.amazon.com/Adobe-Flex-2-Training-Source/dp/032142316X/ref=pd_bbs_sr_1/002-4556397-3450415?ie=UTF8s=booksqid=1180626175sr=8-1 Here's a basic custom event class sample: package mycomponents.events { import flash.events.Event; //this can be a value object that you want to pass along with the event import mycomponents.valueObjects.MyObj; public class MyEvent extends Event { public var obj:MyObj; public function MyEvent(obj:MyObj,type:String) { super(type); this.obj = obj; } public override function clone():Event { return new MyEvent(obj,type); } } } Then when you dispatch it, type the event as your custom event type (you'll need to import the custom event class) and pass in the value object and event type/name. Hope that helps! Rachel
[flexcoders] Changing style/background color dynamically
I'm working on a UI where I have some canvas-based components (used as ItemRenderers within TileLists) that get dragged between different TileLists. The background color of these canvas components changes depending on the situation, so on the component I have a function that runs on CreationComplete to determine the color it should be, and then set the background color property of the canvas. This works most of the time, but when I drag the component from one TileList to another, it does not change to the correct color as it should. If I refresh the page (reload the SWF), it shows the correct color, but after that initial drag and drop, the color does not apply correctly. I've also tried running the function on dataChange as well as creationComplete, and it doesn't seem to make a difference. Am I approaching this right, or can anyone suggest a more reliable way to change the color dynamically? Thanks Rachel
[flexcoders] Verify Error 1068 _ and _ cannot be reconciled
I've been getting an error that I don't really understand and can't seem to find what the problem is. The error is VerifyError: Error #1068: mx.containers.Canvas and mx.containers.Canvascannot be reconciled. Here's what's I'm trying to do. I have a Canvas-based item renderer within a TileList. The Item Renderer needs to change color depending on a few different conditions. One of them is the number of business days elapsed between two dates present in the object that provides the data to the item renderer. The relevant functions are below. The Flex docs say: This error indicates that the ActionScript in the SWF is invalid. If you believe that the file has not been corrupted, please report the problem to Adobe. I have also found: http://editthis.info/flexerrorcodes/Main_Page Neither posts really have a solution, has any one else seen this before, and if so do you know of a workaround? Thanks! Rachel Maxim !-- item renderer -- mx:Canvas id=cnvDeal creationComplete=setSelfColor(data,cnvDeal) private function setSelfColor(voData:Object,targetCnv:Canvas):void { var now:Date = new Date(); var recd:Date = voData.received; var busDays:int = businessDaysElapsed(recd,now); if (busDays = 7) { targetCnv.setStyle(backgroundColor, 0xdb8e84); } else { //set to light gray targetCnv.setStyle(backgroundColor, 0xf1f1f1); } public static const millisecondsPerDay:int = 1000 * 60 * 60 * 24; private function businessDaysElapsed(date1:Date,date2:Date):int { var numberOfDays:int = 0; while (date1 date2) { //if day is between monday and friday, add one day if (date1.day = 1 date1.day =5) { numberOfDays ++ } //increment date by a day date1.setTime(date1.getTime() + millisecondsPerDay); } return numberOfDays; }
Re: [flexcoders] How to create a Windows taskbar notification?
Thanks for the ideas. Apollo was the first thing that popped into my mind too when our users asked :) this app is a prime candidate for Apollo anyway. It's an internal web app, so we have a good amount of control over our environment. I did find an ActiveX control, I was figuring I could embed it in the HTML wrapper that I use for the Flex app, and then communicate with it from Flex via JavaScript, of course I'm not even sure that's possible with the control that I found. Thanks again, Rachel On 2/1/07, Mike Weiland [EMAIL PROTECTED] wrote: Hi Rachel, I can't think of a solution without installing something on the end users computer. If your requirements will allow you such an install then you might be in luck. A few years ago I was looking this very solution, I ended up doing my application in Central, but in the process I came up with 2 theories that could work. The first was to build a C# application that runs as a service with a Flash movie embedded inside of it that communicates back and forth with the main application via localconnection. The second was to do the same with Director, a third party Xtra has task bar methods so you could use that and communicate the back and forth with localconnection. There's also a way to run Director exes as services as well. The one thing I'm not sure of as I write this is updates to the Flash security model. Can a web app talk to a local SWF anymore? Might want to check into that before you embark on any other endeavors. As other's have pointed out you could wait for apollo, but if your main requirement is a web app, then apollo won't be a good fit for that. But maybe it can be configured as a service and run it that way so then you could write the service in apollo and communicate back and forth. That would be cool! Good luck, Mike - Mike Weiland Aspen Tree Media (877)659-1652 | FAX: (512)828-7105 http://www.AspenTreeMedia.com http://www.CertificateCreator.com - Create Print Awards and Certificates On 1/31/07 4:12 PM, Rachel Maxim [EMAIL PROTECTED] wrote: I need to create a Windows Taskbar notification (like the Outlook new message balloon) from Flex. I'm wondering if anyone can recommend a tool for doing this, I'd expect it to be some type of ActiveX or COM object. I'm using ColdFusion on the back end. I know almost nothing about Windows programming, but I've found a few tools online that seem to be the right direction, still if anyone has already built anything like this with Flex and/or CF I'd love to hear your advice. Thanks Rachel Maxim
Re: [flexcoders] Panel and Scrollbars (basic question)
/mx:ControlBar /mx:Panel On 2/1/07, Rachel Maxim [EMAIL PROTECTED] wrote: This may or may not be the answer you are looking for... but is the content of your panel laid out using constraints or absolute values? If you do it with constraints, then your content should get resized when the scrollbar appears. Then again, this may be the inverse of what you are trying to do, and it may cause labels or text to get truncated. Is there a reason that you cannot make the panel wide enough to accomodate your content and scroll bar both, then if the scroll bar doesn't show up then it will just be a little more padding to the right. It seems like if you were to resize the panel dynamically with a scroll event then it might jump around which may not be the desired effect. If you can post code I'd be happy to take a look, I've done a lot of tweaking layouts with lots of scrollbars lately! HTH Rachel On 2/1/07, nwebb [EMAIL PROTECTED] wrote: Hi, I'm sure this is excruciatingly simple but i couldn't find an answer (I must be searching with the wrong keywords). I have a Panel. Inside it is a Text component, and a Repeater underneath that (...repeating a CheckBox) . All works fine. I want to set the maxHeight of the Panel to 200px, so that if I get too many Checkboxes appearing, my content will scroll vertically. When I set maxHeight, I get *both* horizontal and vertical scrollbars appearing - the horizontal scrollbar only appears because the width of the vertical scrollbar eats in to the Panel width - therefore I get horizontal scrolling of about 16 pixels. If I set horizontalScrollbarPolicy to false then my content is still clipped. I'm sure I can muster a workaround easily enough (e.g. manually resize Panel based on ScrollEvent etc), but I thought there surely must be something in-built and neater, already in place to deal with this kind of scenario? Any help much appreciated.
Re: [flexcoders] Panel and Scrollbars (basic question)
This may or may not be the answer you are looking for... but is the content of your panel laid out using constraints or absolute values? If you do it with constraints, then your content should get resized when the scrollbar appears. Then again, this may be the inverse of what you are trying to do, and it may cause labels or text to get truncated. Is there a reason that you cannot make the panel wide enough to accomodate your content and scroll bar both, then if the scroll bar doesn't show up then it will just be a little more padding to the right. It seems like if you were to resize the panel dynamically with a scroll event then it might jump around which may not be the desired effect. If you can post code I'd be happy to take a look, I've done a lot of tweaking layouts with lots of scrollbars lately! HTH Rachel On 2/1/07, nwebb [EMAIL PROTECTED] wrote: Hi, I'm sure this is excruciatingly simple but i couldn't find an answer (I must be searching with the wrong keywords). I have a Panel. Inside it is a Text component, and a Repeater underneath that (...repeating a CheckBox) . All works fine. I want to set the maxHeight of the Panel to 200px, so that if I get too many Checkboxes appearing, my content will scroll vertically. When I set maxHeight, I get *both* horizontal and vertical scrollbars appearing - the horizontal scrollbar only appears because the width of the vertical scrollbar eats in to the Panel width - therefore I get horizontal scrolling of about 16 pixels. If I set horizontalScrollbarPolicy to false then my content is still clipped. I'm sure I can muster a workaround easily enough (e.g. manually resize Panel based on ScrollEvent etc), but I thought there surely must be something in-built and neater, already in place to deal with this kind of scenario? Any help much appreciated.
[flexcoders] How to create a Windows taskbar notification?
I need to create a Windows Taskbar notification (like the Outlook new message balloon) from Flex. I'm wondering if anyone can recommend a tool for doing this, I'd expect it to be some type of ActiveX or COM object. I'm using ColdFusion on the back end. I know almost nothing about Windows programming, but I've found a few tools online that seem to be the right direction, still if anyone has already built anything like this with Flex and/or CF I'd love to hear your advice. Thanks Rachel Maxim
Re: [flexcoders] Re: tracking a user session
I had a similar issue, I used ColdFusion to manage the authentication and to create a session ID, then I had a remoteObject in Flex that called that CFC to get the credentials. If the length of the session, etc is of importance than you would probably also want to include the creation time in the data returned by the back end. Then you could manage the priviledges with ActionScript. You could always call the remote object or service again to verify. HTH Rachel On 1/31/07, superstella_uk [EMAIL PROTECTED] wrote: Im guessing you want to pass the session id onto any web servics called from Flex? Maybe you could have the initial dyn html pages pass the session to the flash applet, and the Flex can pick that up and send it along with a param to all server calls?
Re: [flexcoders] Flex - ColdFusion data types
Steve, The type of data you use with Flex and CF really are best determined by the data you have and the scope of your project, but you don't have to use XML. I'd imagine the article you read is either outdated or perhaps was not very clear in its meaning. I haven't personally tried calling a CFM page from Flex, I use CFCs and they work great. If what you read says that you can only use a CFM page for XML, it's probably because a CFM page doesn't return any data type; but you could use Flex to load a CFM page that is dynamically generated XML via HTTP service. To be honest, it's still probably easier to use a CFC than to load a CFM page! If you are using CF on the back end, then Remote Objects with AMF are the easiest way to go, and fast performance-wise. To do this, you use mx:RemoteObject with the destination set to ColdFusion and the CFC and method you wish to call as attributes. If you need to interface with another app server, then Web Services would be ideal. You don't have to convert CFC or web services results, etc into XML for Flex to understand them. Flex does a pretty good job with that natively. HTH Rachel Maxim On 1/22/07, Steve Milburn [EMAIL PROTECTED] wrote: Hello all. I am very new to Flex so forgive me for the newby questions. I have been reading about Flex Data Services, Web Services, etc and working through some examples from Adobe. My question is when is it necessary to return the data in XML and when is it ok to return other datatypes? If you read in this article by Ben Forta, it states To make the integration as simple as possible, data types are preserved and automatically converted to their appropriate equivalent types. If ColdFusion returns a string, Flash receives a string; if ColdFusion returns a query, Flash receives an ArrayCollection, and so on. OK, simple enough. I have worked through examples that do just that. However, in another article on Adobe's web site (which I cannot locate now for the life of me), it stated that Flex only understands XML. The example on that page illustrated Flex calling a .cfm template, while the other examples are calling .cfc components. Is that the difference? When Flex calls a .cfm, it must receive XML? And when it calls cfc functions it can recieve other data types? Any clarification on this is appreciated. Steve
Re: [flexcoders] Scrollbar doesn't show up when it should - Possible rendering bug?
I found a sort-of solution, still working out the detailsbut I had the TileList heights set to 100%. I removed this attribute and set the rowCount to well over the number of rows in the actual dataset, and the scrollbars showed up. So it seems that setting 100% values on the TileLists creates problems in calculating the need for scrollbars. Hope that helps someone... Rachel On 1/10/07, Rachel Maxim [EMAIL PROTECTED] wrote: To follow up on this, I tried it and it didn't seem to help. Maybe because I have nested TileLists? I tried wrapping it with a Canvas a couple different ways but no dice. Thanks Rachel On 1/10/07, Ethan Miller [EMAIL PROTECTED] wrote: I've seen this too, lots and for Lists as well as TileLists. It looks like the TileList doesn't know what size it is... However, if you put a Canvas around your TileList, the Canvas will know the right size and give you scroll bars as needed... cheers, ethan
Re: [flexcoders] Drag and Drop within TileList - why does my code copy instead of move?
I'm using 2.0, I'm not in a huge hurry to upgrade right before I finish this project :) Thank you for offering help, I got it working by changing the TileList attribute dragMoveEnabled=true (I didn't realize this could be turned on when using custom drag and drop handling). On 1/10/07, Paolo Bernardini [EMAIL PROTECTED] wrote: are you using flex 2.0 or 2.0.1? I have an application using drag and drop and need to move the items within the TileList, it was working just fine in version 2.0, now since I updated to 2.0.1 it doesn't move the items anymore but instead makes a copy. Basically I want to order the Items of the TileList by dragging them, but I also want to drag items from a different component. As I said it worked with flex 2.0. Here is the code: ?xml version=1.0 encoding=utf-8? mx:TileList xmlns:mx=http://www.adobe.com/2006/mxml; backgroundAlpha= 0 backgroundColor=#FF itemRenderer= renderer.ProjectThumbnail dragEnabled=true dragEnter=doDragEnter(event) dragExit=doDragExit(event) dragDrop=doDragDrop(event) dragOver=doDragOver(event) mouseDown=dropInitiator = DragManager.MOVE; dragMoveEnabled=true mx:Script ![CDATA[ *import* mx.collections.IList; *import* mx.collections.ArrayCollection ; *import* events.CompareImageChangeEvent; *import* mx.events.DragEvent; * import* mx.managers.DragManager; *import* mx.core.DragSource; * import* com.cnh.imageBank.model.ModelLocator; [ *Bindable*] *public* *var * model:ModelLocator = ModelLocator.getInstance (); *private* *var* dropInitiator:String = DragManager.NONE; *// Drag and drop events **public* *function * doDragEnter(event:DragEvent): *void* { *// Get the drop target component from the event object. **var* dropTarget:TileList = event.currentTarget *as* TileList; * var* dataInfo:ArrayCollection = dropTarget.dataProvider *as*ArrayCollection; *var * item:Object = event.dragSource.dataForFormat(*item*); *if* (dropInitiator == DragManager.MOVE){ DragManager.showFeedback(DragManager.MOVE); DragManager.acceptDragDrop(dropTarget); } *else* { * if*(item != *null*){ *for*(* var* i:int = 0; i dataInfo.length; i++){ *if*(dataInfo[i].id == item.id) * return*; } DragManager.showFeedback(DragManager.COPY); DragManager.acceptDragDrop(dropTarget); } } }* ** public* *function* doDragExit(event: DragEvent): *void* { *var* dropTarget:TileList = event.currentTarget *as* TileList; dropTarget.hideDropFeedback(event); dropInitiator = DragManager.NONE; *this*.dropEnabled = *false*; } *public* *function* doDragOver(event: DragEvent): * void* { *var* dropTarget:TileList = event.currentTarget *as* TileList; dropTarget.showDropFeedback(event); } * **public* * function* doDragDrop(event: DragEvent): *void* { *var* dropTarget:TileList = event.currentTarget *as* TileList; *var* item:Object = event.dragSource.dataForFormat( *item*); *if* (item == *null* ) { *// Item was dragged from the thumbnail view **var* items:Object = event.dragSource.dataForFormat( *items*); item = items[0]; } *var* dropLoc:int = dropTarget.calculateDropIndex (event); IList(dropTarget.dataProvider).addItemAt(item, dropLoc );** doDragExit(event); } ]] /mx:Script /mx:TileList
[flexcoders] Scrollbar doesn't show up when it should - Possible rendering bug?
Hello Flexperts... I'm encountering a problem with some TileLists that should be have scroll bars but do not, or when they do, they don't allow scrolling the full length of the window. The structure of my MXML is (for illustration only! not actual code): VerticalDividedBox Panel TileList TileList / /TileList Panel Panel TileList TileList / /TileList Panel /VerticalDividedBox The verticalScrollPolicy for all items is set to Auto. This seemed to be working normally with test data, but when I increased the amount of data (tiles in the outermost TileList) I noticed that even though the contents of the TileList were longer than the height of the list, there was no scroll bar. If I shrink down the screen or move the vertical divider up or down to shrink the list's scroll rectangle, the scrollbar DOES eventually show up, however it won't let me scroll the full length of the list. For instance, I have 6 rows in the TileList, but only 4 show in the space available. This would be fine, if there was a scroll bar, but there is not. If I shrink the list so that only two items show, I do have a scroll bar, but it only lets me scroll to the third item, and not to the 6th. And I'm not sure if this is related, but when I stretch the window size back to the full size, the last tile that was cut off when the list was small shows up twice. Even setting the verticalScrollPolicy to ON for all components did not actually give a scroll option when it should have. It just showed the scrollbar placeholder. Some things I've tried: - fiddling with the lockedRowCount, not using it at all, set to 1, set to 10 (no change) - setting the verticalScrollPolicy to auto on all (that's how it is now) - setting the verticalScrollPolicy to ON on all (no change except the scroll placeholder showed, still not scrollable when it needs to be) - setting the verticalScrollPolicy to OFF on all except the outermost Panel (no change except that the scroll bars didn't show up even when the window was small) - setting the row count higher (no change) It's very odd! Here is a sample of the tileList code (please note, for it to run you would need to move the itemRenderer to a separate component): !-- begin code -- mx:VDividedBox id=outerVerticalDividedBox verticalScrollPolicy=auto mx:Panel id=outerPanel title=outer panel layout=vertical verticalAlign=top verticalScrollPolicy=auto horizontalScrollPolicy=off height=60% width=100% mx:TileList id=outerTileList itemRenderer=innerTileList verticalScrollPolicy=auto horizontalScrollPolicy=off columnCount=1 rowCount=10 lockedRowCount=1 direction=vertical allowMultipleSelection=false dragEnabled=false dragMoveEnabled=false dropEnabled=false width=100% height=100% rowHeight=75 mx:TileList itemRenderer=myCanvas id=innerTileList verticalScrollPolicy=auto horizontalScrollPolicy=off columnCount=2 rowCount=10 lockedRowCount=1 rowHeight=22 columnWidth=160 direction=horizontal allowMultipleSelection=false/ /mx:TileList /mx:Panel /mx:VDividedBox !-- end code -- Has anyone ever seen this before? Thanks Rachel
Re: [flexcoders] Scrollbar doesn't show up when it should - Possible rendering bug?
Hi Ethan Thanks for the tip, I'll give it a shot! Rachel On 1/10/07, Ethan Miller [EMAIL PROTECTED] wrote: I've seen this too, lots and for Lists as well as TileLists. It looks like the TileList doesn't know what size it is... However, if you put a Canvas around your TileList, the Canvas will know the right size and give you scroll bars as needed... cheers, ethan I'm encountering a problem with some TileLists that should be have scroll bars but do not, or when they do, they don't allow scrolling the full length of the window. The structure of my MXML is (for illustration only! not actual code): VerticalDividedBox Panel TileList TileList / /TileList Panel Panel TileList TileList / /TileList Panel /VerticalDividedBox The verticalScrollPolicy for all items is set to Auto. This seemed to be working normally with test data, but when I increased the amount of data (tiles in the outermost TileList) I noticed that even though the contents of the TileList were longer than the height of the list, there was no scroll bar. If I shrink down the screen or move the vertical divider up or down to shrink the list's scroll rectangle, the scrollbar DOES eventually show up, however it won't let me scroll the full length of the list. For instance, I have 6 rows in the TileList, but only 4 show in the space available. This would be fine, if there was a scroll bar, but there is not. If I shrink the list so that only two items show, I do have a scroll bar, but it only lets me scroll to the third item, and not to the 6th. And I'm not sure if this is related, but when I stretch the window size back to the full size, the last tile that was cut off when the list was small shows up twice. Even setting the verticalScrollPolicy to ON for all components did not actually give a scroll option when it should have. It just showed the scrollbar placeholder. Some things I've tried: - fiddling with the lockedRowCount, not using it at all, set to 1, set to 10 (no change) - setting the verticalScrollPolicy to auto on all (that's how it is now) - setting the verticalScrollPolicy to ON on all (no change except the scroll placeholder showed, still not scrollable when it needs to be) - setting the verticalScrollPolicy to OFF on all except the outermost Panel (no change except that the scroll bars didn't show up even when the window was small) - setting the row count higher (no change) It's very odd! Here is a sample of the tileList code (please note, for it to run you would need to move the itemRenderer to a separate component): !-- begin code -- mx:VDividedBox id=outerVerticalDividedBox verticalScrollPolicy=auto mx:Panel id=outerPanel title=outer panel layout=vertical verticalAlign=top verticalScrollPolicy=auto horizontalScrollPolicy=off height=60% width=100% mx:TileList id=outerTileList itemRenderer=innerTileList verticalScrollPolicy=auto horizontalScrollPolicy=off columnCount=1 rowCount=10 lockedRowCount=1 direction=vertical allowMultipleSelection=false dragEnabled=false dragMoveEnabled=false dropEnabled=false width=100% height=100% rowHeight=75 mx:TileList itemRenderer=myCanvas id=innerTileList verticalScrollPolicy=auto horizontalScrollPolicy=off columnCount=2 rowCount=10 lockedRowCount=1 rowHeight=22 columnWidth=160 direction=horizontal allowMultipleSelection=false/ /mx:TileList /mx:Panel /mx:VDividedBox !-- end code -- Has anyone ever seen this before? Thanks Rachel -- 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
Re: [flexcoders] Scrollbar doesn't show up when it should - Possible rendering bug?
To follow up on this, I tried it and it didn't seem to help. Maybe because I have nested TileLists? I tried wrapping it with a Canvas a couple different ways but no dice. Thanks Rachel On 1/10/07, Ethan Miller [EMAIL PROTECTED] wrote: I've seen this too, lots and for Lists as well as TileLists. It looks like the TileList doesn't know what size it is... However, if you put a Canvas around your TileList, the Canvas will know the right size and give you scroll bars as needed... cheers, ethan
[flexcoders] Drag and Drop within TileList - why does my code copy instead of move?
Hello, I would really appreciate another set of eyes taking a look at this code to see what I'm doing wrong. I have several tile lists where tiles can be dragged and dropped around. This code is pretty much straight out of the docs plus a few rules, It's working fine except that the tiles are copying, not moving as I want them to. Before I overrode the default drag-and-drop functionality, they moved, but when I implemented my rules to ensure they are being dragged to a list that accepts them, they started copying. Thanks so much for any help! Rachel Maxim ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; verticalScrollPolicy=auto horizontalScrollPolicy=off !-- component properties to identify this item for drag and drop listeners -- mx:String id=userName{data.userName}/mx:String mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.controls.List; import mx.core.DragSource; import mx.events.DragEvent; import mx.managers.DragManager; import mx.containers.Tile; import mx.collections.IList; //drag enter handler private function doDragEnter(event:DragEvent):void { //drag target - where item is being dragged var dragInitiator:TileList = TileList(event.currentTarget); //dragged items var items:Array = event.dragSource.dataForFormat(items) as Array; for (var i:uint = 0; i items.length; i ++) { var fromCaseName:String = items[i].caseName; //the case name that the deal is being dragged from var toCaseName:String = data.caseName; //the case name that the deal is being dragged too //check to ensure drop is allowed on this object if (isDropAllowed(fromCaseName, toCaseName)) { DragManager.acceptDragDrop(dragInitiator); } else { DragManager.NONE; } } } private function doDragOver(event:DragEvent):void { //dragged items var items:Array = event.dragSource.dataForFormat(items) as Array; for (var i:uint = 0; i items.length; i ++) { var fromCaseName:String = items[i].caseName; //the case name that the deal is being dragged from var toCaseName:String = data.caseName; //the case name that the deal is being dragged too //check to ensure drop is allowed on this object if (isDropAllowed(fromCaseName, toCaseName)) { DragManager.showFeedback(DragManager.MOVE); } else { DragManager.showFeedback(DragManager.NONE); } } } //drop handler private function doDragDrop(event:DragEvent):void { //define the drop target var dropTarget:TileList = TileList(event.currentTarget); //dragged items var items:Array = event.dragSource.dataForFormat(items) as Array; //get the drop location in the destination var dropLoc:int = dropTarget.calculateDropIndex(event); //loop over dragged items to get data from each for (var i:uint = 0; i items.length; i ++) { trace(The deal + items[i].caseID + + items[i].companyName + + items[i].caseName + was assigned to + userName); //debugging trace //add to drop target IList(dropTarget.dataProvider).addItemAt(items[i], dropLoc); trace(the deal was dropped at + dropTarget.dataProvider.getItemAt(dropLoc).caseName); } //once complete, dispatch the drag complete event var dragComplete:Event = new Event('dragComplete',true); this.dispatchEvent(dragComplete); } //business rules that determine if this object can be dropped on the intended target private function isDropAllowed(fromCaseName:String, toCaseName:String):Boolean { //if deal is being dragged to the same caseName, drop is allowed if (fromCaseName == toCaseName) { return true; } else { return false; } } ]] /mx:Script mx:Label text={data.userName} top=5 left=5 id=lblCreditName fontWeight=bold width=231 textAlign=left/ mx:TileList dataProvider={data.userDeals} itemRenderer=DealButton id=tlDeals columnCount=2 verticalScrollPolicy=auto horizontalScrollPolicy=off
Re: [flexcoders] Drag and Drop within TileList - why does my code copy instead of move?
I'm gonna keep working on it, but that is exactly what I am trying to find! Unfortunately this is pretty bare-bones as far as functionality goes, so if I remove just a couple lines then the entire drag and drop won't work :) I'll definitely post when I find the solution though! R On 1/9/07, Tracy Spratt [EMAIL PROTECTED] wrote: Have you found the line of code that changes the functionality? If not, do that. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Rachel Maxim *Sent:* Tuesday, January 09, 2007 12:49 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Drag and Drop within TileList - why does my code copy instead of move? Hello, I would really appreciate another set of eyes taking a look at this code to see what I'm doing wrong. I have several tile lists where tiles can be dragged and dropped around. This code is pretty much straight out of the docs plus a few rules, It's working fine except that the tiles are copying, not moving as I want them to. Before I overrode the default drag-and-drop functionality, they moved, but when I implemented my rules to ensure they are being dragged to a list that accepts them, they started copying. Thanks so much for any help! Rachel Maxim ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml verticalScrollPolicy=auto horizontalScrollPolicy=off !-- component properties to identify this item for drag and drop listeners -- mx:String id=userName{ data.userName}/mx:String mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.controls.List; import mx.core.DragSource; import mx.events.DragEvent; import mx.managers.DragManager; import mx.containers.Tile; import mx.collections.IList; //drag enter handler private function doDragEnter(event:DragEvent):void { //drag target - where item is being dragged var dragInitiator:TileList = TileList(event.currentTarget ); //dragged items var items:Array = event.dragSource.dataForFormat(items) as Array; for (var i:uint = 0; i items.length; i ++) { var fromCaseName:String = items[i].caseName; //the case name that the deal is being dragged from var toCaseName:String = data.caseName; //the case name that the deal is being dragged too //check to ensure drop is allowed on this object if (isDropAllowed(fromCaseName, toCaseName)) { DragManager.acceptDragDrop(dragInitiator); } else { DragManager.NONE; } } } private function doDragOver(event:DragEvent):void { //dragged items var items:Array = event.dragSource.dataForFormat(items) as Array; for (var i:uint = 0; i items.length; i ++) { var fromCaseName:String = items[i].caseName; //the case name that the deal is being dragged from var toCaseName:String = data.caseName; //the case name that the deal is being dragged too //check to ensure drop is allowed on this object if (isDropAllowed(fromCaseName, toCaseName)) { DragManager.showFeedback(DragManager.MOVE); } else { DragManager.showFeedback (DragManager.NONE); } } } //drop handler private function doDragDrop(event:DragEvent):void { //define the drop target var dropTarget:TileList = TileList(event.currentTarget); //dragged items var items:Array = event.dragSource.dataForFormat(items) as Array; //get the drop location in the destination var dropLoc:int = dropTarget.calculateDropIndex(event); //loop over dragged items to get data from each for (var i:uint = 0; i items.length; i ++) { trace(The deal + items[i].caseID + + items[i].companyName + + items[i].caseName + was assigned to + userName); //debugging trace //add to drop target IList(dropTarget.dataProvider).addItemAt(items[i], dropLoc); trace(the deal was dropped at + dropTarget.dataProvider.getItemAt(dropLoc).caseName); } //once complete, dispatch the drag complete event var dragComplete:Event = new Event('dragComplete',true); this.dispatchEvent(dragComplete
Re: [flexcoders] Drag and Drop within TileList - why does my code copy instead of move?
Removing the business rules still causes the copy instead of move, it just doesn't enforce the rules :) Basically, stripping out all the new functionality and gradually adding it back in, I have concluded that if I do NOT manually handle any of the drag and drop, and set the drag properties to true (dragMoveEnabled=true, dragEnabled=true, dropEnabled=true), then everything moves as it should, but I cannot get the data I need out of the drop operation (to call the remote objects to update the database) . So the problem is clearly in my drag and drop code, but I am yet unable to locate the problem. Commenting out various lines of code only results in errors because they are necessary for the drag and drop to work. I think the problem might have something to do with this line - I have a feeling it's duplicating the built-in drag and drop functionality ListCollectionView(dropTarget.dataProvider).addItemAt(items[i], dropLoc); However, if I don't use this method to add the item, then I can't get the data back out of the item. Does that make any sense? I'm hoping there is someone who has done this before and can clarify what I need to do to override the default TileList drag and drop behavior? The docs seem to only show using the default behavior with lists, with no server-side component or add'l data manipultion examples. Thanks Rachel On 1/9/07, Tracy Spratt [EMAIL PROTECTED] wrote: If it works without the rules, remove them. Then add them back until it breaks. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Rachel Maxim *Sent:* Tuesday, January 09, 2007 1:23 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Drag and Drop within TileList - why does my code copy instead of move? I'm gonna keep working on it, but that is exactly what I am trying to find! Unfortunately this is pretty bare-bones as far as functionality goes, so if I remove just a couple lines then the entire drag and drop won't work :) I'll definitely post when I find the solution though! R On 1/9/07, *Tracy Spratt* [EMAIL PROTECTED] wrote: Have you found the line of code that changes the functionality? If not, do that. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Rachel Maxim *Sent:* Tuesday, January 09, 2007 12:49 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Drag and Drop within TileList - why does my code copy instead of move? Hello, I would really appreciate another set of eyes taking a look at this code to see what I'm doing wrong. I have several tile lists where tiles can be dragged and dropped around. This code is pretty much straight out of the docs plus a few rules, It's working fine except that the tiles are copying, not moving as I want them to. Before I overrode the default drag-and-drop functionality, they moved, but when I implemented my rules to ensure they are being dragged to a list that accepts them, they started copying. Thanks so much for any help! Rachel Maxim ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml verticalScrollPolicy=auto horizontalScrollPolicy=off !-- component properties to identify this item for drag and drop listeners -- mx:String id=userName{ data.userName}/mx:String mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.controls.List; import mx.core.DragSource; import mx.events.DragEvent; import mx.managers.DragManager; import mx.containers.Tile; import mx.collections.IList; //drag enter handler private function doDragEnter(event:DragEvent):void { //drag target - where item is being dragged var dragInitiator:TileList = TileList(event.currentTarget ); //dragged items var items:Array = event.dragSource.dataForFormat(items) as Array; for (var i:uint = 0; i items.length; i ++) { var fromCaseName:String = items[i].caseName; //the case name that the deal is being dragged from var toCaseName:String = data.caseName; //the case name that the deal is being dragged too //check to ensure drop is allowed on this object if (isDropAllowed(fromCaseName, toCaseName)) { DragManager.acceptDragDrop(dragInitiator); } else { DragManager.NONE; } } } private function doDragOver(event:DragEvent):void { //dragged items var items:Array = event.dragSource.dataForFormat(items) as Array; for (var i:uint = 0; i items.length; i
Re: [flexcoders] Drag and Drop within TileList - why does my code copy instead of move?
Hi Stephen I'm not gonna argue with you since you work for Adobe :) I did figure out shortly after posting that the DragManager.NONE line wasn't doing anything (I just didn't want to allow drag and drop in that case). As far as calling ShowFeedback for every item dragged, I don't see another way to check against each object in the items array. In my case I'm not allowing selection of multiples, so items is an 1-length array. Perhaps I'm copying code without really understanding it...do I not need to use Array for the data format? Sorry I'm such a noob at this, not much OO development experience here outside AS2! Rachel On 1/9/07, Stephen Gilson [EMAIL PROTECTED] wrote: I did not run the code, but two things jump out at me. In your doDragEnter event, you have this: else { DragManager.NONE; } DragManager.NONE is a constant, and I'm not sure what you are trying to do. In doDragOver(), you are calling showFeedback() on every item dragged. I think you only need to call this once, based on whether you want to do a move or a copy. Hope that helps, Stephen -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Rachel Maxim *Sent:* Tuesday, January 09, 2007 12:49 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Drag and Drop within TileList - why does my code copy instead of move? Hello, I would really appreciate another set of eyes taking a look at this code to see what I'm doing wrong. I have several tile lists where tiles can be dragged and dropped around. This code is pretty much straight out of the docs plus a few rules, It's working fine except that the tiles are copying, not moving as I want them to. Before I overrode the default drag-and-drop functionality, they moved, but when I implemented my rules to ensure they are being dragged to a list that accepts them, they started copying. Thanks so much for any help! Rachel Maxim ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml verticalScrollPolicy=auto horizontalScrollPolicy=off !-- component properties to identify this item for drag and drop listeners -- mx:String id=userName{ data.userName}/mx:String mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.controls.List; import mx.core.DragSource; import mx.events.DragEvent; import mx.managers.DragManager; import mx.containers.Tile; import mx.collections.IList; //drag enter handler private function doDragEnter(event:DragEvent):void { //drag target - where item is being dragged var dragInitiator:TileList = TileList(event.currentTarget ); //dragged items var items:Array = event.dragSource.dataForFormat(items) as Array; for (var i:uint = 0; i items.length; i ++) { var fromCaseName:String = items[i].caseName; //the case name that the deal is being dragged from var toCaseName:String = data.caseName; //the case name that the deal is being dragged too //check to ensure drop is allowed on this object if (isDropAllowed(fromCaseName, toCaseName)) { DragManager.acceptDragDrop(dragInitiator); } else { DragManager.NONE; } } } private function doDragOver(event:DragEvent):void { //dragged items var items:Array = event.dragSource.dataForFormat(items) as Array; for (var i:uint = 0; i items.length; i ++) { var fromCaseName:String = items[i].caseName; //the case name that the deal is being dragged from var toCaseName:String = data.caseName; //the case name that the deal is being dragged too //check to ensure drop is allowed on this object if (isDropAllowed(fromCaseName, toCaseName)) { DragManager.showFeedback(DragManager.MOVE); } else { DragManager.showFeedback (DragManager.NONE); } } } //drop handler private function doDragDrop(event:DragEvent):void { //define the drop target var dropTarget:TileList = TileList(event.currentTarget); //dragged items var items:Array = event.dragSource.dataForFormat(items) as Array; //get the drop location in the destination var dropLoc:int = dropTarget.calculateDropIndex
Re: [flexcoders] Drag and Drop within TileList - why does my code copy instead of move?
Peter THANK YOU! I have been looking at this for too long. I was totally aware of the dragMoveEnabled property, but thought it had to be set to false to override the default functionality. As it turns out, only dropEnabled should be set to false. Viola, it works. How can I thank you? You're the best. Rachel On 1/9/07, Peter Watson [EMAIL PROTECTED] wrote: Try setting dragMoveEnabled='true for the tileList http://livedocs.macromedia.com/flex/2/langref/mx/controls/listClasses/ListBase.html dragMoveEnabled property dragMoveEnabled:Booleanhttp://livedocs.macromedia.com/flex/2/langref/Boolean.html [read-write] A flag that indicates whether items can be moved instead of just copied from the control as part of a drag-and-drop operation. If true, and the dragEnabled property is true, items can be moved. Often the data provider cannot or should not have items removed from it, so a MOVE operation should not be allowed during drag-and-drop. The default value is false. regards, peter -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Rachel Maxim *Sent:* Tuesday, January 09, 2007 3:28 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Drag and Drop within TileList - why does my code copy instead of move? Hi Stephen I'm not gonna argue with you since you work for Adobe :) I did figure out shortly after posting that the DragManager.NONE line wasn't doing anything (I just didn't want to allow drag and drop in that case). As far as calling ShowFeedback for every item dragged, I don't see another way to check against each object in the items array. In my case I'm not allowing selection of multiples, so items is an 1-length array. Perhaps I'm copying code without really understanding it...do I not need to use Array for the data format? Sorry I'm such a noob at this, not much OO development experience here outside AS2! Rachel On 1/9/07, *Stephen Gilson* [EMAIL PROTECTED] wrote: I did not run the code, but two things jump out at me. In your doDragEnter event, you have this: else { DragManager.NONE; } DragManager.NONE is a constant, and I'm not sure what you are trying to do. In doDragOver(), you are calling showFeedback() on every item dragged. I think you only need to call this once, based on whether you want to do a move or a copy. Hope that helps, Stephen -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Rachel Maxim *Sent:* Tuesday, January 09, 2007 12:49 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Drag and Drop within TileList - why does my code copy instead of move? Hello, I would really appreciate another set of eyes taking a look at this code to see what I'm doing wrong. I have several tile lists where tiles can be dragged and dropped around. This code is pretty much straight out of the docs plus a few rules, It's working fine except that the tiles are copying, not moving as I want them to. Before I overrode the default drag-and-drop functionality, they moved, but when I implemented my rules to ensure they are being dragged to a list that accepts them, they started copying. Thanks so much for any help! Rachel Maxim ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml verticalScrollPolicy=auto horizontalScrollPolicy=off !-- component properties to identify this item for drag and drop listeners -- mx:String id=userName{ data.userName}/mx:String mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.controls.List; import mx.core.DragSource; import mx.events.DragEvent; import mx.managers.DragManager; import mx.containers.Tile; import mx.collections.IList; //drag enter handler private function doDragEnter(event:DragEvent):void { //drag target - where item is being dragged var dragInitiator:TileList = TileList(event.currentTarget ); //dragged items var items:Array = event.dragSource.dataForFormat(items) as Array; for (var i:uint = 0; i items.length; i ++) { var fromCaseName:String = items[i].caseName; //the case name that the deal is being dragged from var toCaseName:String = data.caseName; //the case name that the deal is being dragged too //check to ensure drop is allowed on this object if (isDropAllowed(fromCaseName, toCaseName)) { DragManager.acceptDragDrop(dragInitiator); } else { DragManager.NONE
Re: [flexcoders] Drag and Drop within TileList - why does my code copy instead of move?
Hard to imagine but I had not actually tried running the sample code I was working from, assuming it worked how I wanted it to...anyway as it turns out the sample also COPIES and doesn't move, so whatever I am doing is working how it's supposed to, it's just not how I want. Let me approach this a diferent way: if I use the default drag and drop behavior of the TileList (which does what I want), how do I find out which item was dropped and pass that info to a web service call?
[flexcoders] FB2 won't build project that worked fine yesterday!
Hello, I fired up FlexBuilder this morning to continue a project I worked on all day yesterday with no issues, and to my surprise, I got a page not found error when I ran the project. Web server's running fine, ColdFusion files and CFCs from the project run fine, but I can't get any Flex content to pull up. My bin (0output) directory doesn't seem to have my usual working files in it. I tried cleaning the project, rebuilding, debugging, etc and nothing will show up. I backed up and deleted the contents of the bin directory, still won't build. I am stumped, this project worked fine last night at 6pm! Any ideas? Thanks! Rachel
[flexcoders] Drag and drop between multiple nested TileLists - how to detect drag and drop target properties?
Hi, I have been reading the various drag and drop examples and tutorials that I've found online and in the docs, but am having issues with a complex drag and drop interface that I can't seem to figure out. I'm wondering if the way I have structured my MXML will even allow me to do what I want to do. Any help or advice would be much appreciated. I have three Panels, each Panel contains a custom component that is based on the TileList class. Each of these TileLists uses an item renderer that is a TileList, so I have 2 levels of nested TileLists. Each of the nested TileLists has an item renderer that is a small custom component based on a canvas, and those components hold all the data I need to get to. What I essentially have are a bunch of blocks and these need to get dragged around within the various nested TileLists (at the bottom level). I have all drag and drop functionality turned on, and dragging and dropping everywhere is working fine. However I have not been able to figure out how to get the property data from the various drag/drop targets correctly. When a bottom-level tile is dragged and dropped, I need to know from which top-level tile it was dragged from/to and also the properites of the lower level tile (IE which tile was dragged where). Because I've used custom components with item renderers, the path to the various children are numbers assigned by Flex, not readily identifiable properties. Although I can get the top-level TileList name, I can't seem to find anything below that, not to mention the custom properties assigned to the lower level Tiles. Hopefully this makes sense! I'm wondering if I should have used repeaters instead of nested lists with item renderers, which would allow me to explicitly identify the various tiles. Thanks so much for any advice or examples. Rachel
Re: [flexcoders] Re: Drag and drop between multiple nested TileLists - how to detect drag and dro
Jim, Thanks for your suggestions, I'll give it a try! Rachel On 1/2/07, Jim Robson [EMAIL PROTECTED] wrote: Rachel: If I understand your dilemma correctly, the following ideas may help. 1) Declare a variable to represent the container that you'll need to reference during the drag drop action, e.g.: private var _myParentContainer:TileList; 2) In your item renderer's creationComplete event handler, assign the value of the container to the variable, e.g.: _myParentContainer = this.parent.parent.parent.parent as TileList; (Use trace statements to help you determine how many .parent's you need; Flex inserts some intermediary objects that are not readily apparent.) 3) In the drag drop code, use the variable to reference the target container as needed: _myParentContainer.doSomethingCool(); 4) After the drag drop is complete, update the value of the variable to the item renderer's new container: _myParentContainer = this.parent.parent.parent.parent as TileList; It's hard to be more specific without seeing the actual code, but perhaps this will be enough to get you past the current obstacle. HTH -Jim
Re: [flexcoders] Flex Vs Ajax
There are lots of reasons which are probably covered in the links others suggested, but it depends on your project and resources too. I chose Flex over Ajax also to avoid the cross-browser issues (Ajax = JavaScript = lots of cross browser compatibility issues and workarounds). Of course you still need the Flash Plugin, but it's easier to get someone to install or upgrade a plugin than to switch or update a browser. Personally I also found Flex easier to learn than Ajax techniques, although that probably depends on your comfort level with JavaScript vs ActionScript. The FlexBuilder IDE helps the learning curve too. I think you will find that even with all the Ajax libraries out there, Flex is still a more rapid UI development option than Ajax. -Rachel On 12/19/06, sanjaypmg [EMAIL PROTECTED] wrote: Hi All, Can anyone tell me Flex Advantages over Ajax and Vise-Versa. And a comparision table, in which, The different functionality, components available and enviornment supported by them. Pls do let me know. Thanks, SS -- 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
Re: [flexcoders] FlexBuilder error: Removing Compiler Problem Markers, Marker id:3705 not found
Thanks, I will try that! On 12/12/06, Tracy Spratt [EMAIL PROTECTED] wrote: Have you tried cleaning the project? Clening removes all generated files, and is the first thing to try if you have issues like this. Go Menu, Project, Clean. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Rachel Maxim *Sent:* Tuesday, December 12, 2006 10:10 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] FlexBuilder error: Removing Compiler Problem Markers, Marker id:3705 not found I have seen this error in FlexBuilder (w/CFEclipse) several times over the past couple weeks while compiling/saving code (I believe it happens with all file types, although at the moment it's happening in CF code): Removing Compiler Problem Markers Marker id: 3705 Not found The details button is disabled. If I click ok, move the cursor and save again, it seems to run ok. I cannot reproduce the error precisely but it happens pretty often. I couldn't find anything on Adobe's site about this. Has anyone seen it before - any idea what it means or where it's coming from? I'm running FB 2 on Windows XP fully updated. Thanks, Rachel Maxim
[flexcoders] FlexBuilder error: Removing Compiler Problem Markers, Marker id:3705 not found
I have seen this error in FlexBuilder (w/CFEclipse) several times over the past couple weeks while compiling/saving code (I believe it happens with all file types, although at the moment it's happening in CF code): Removing Compiler Problem Markers Marker id: 3705 Not found The details button is disabled. If I click ok, move the cursor and save again, it seems to run ok. I cannot reproduce the error precisely but it happens pretty often. I couldn't find anything on Adobe's site about this. Has anyone seen it before - any idea what it means or where it's coming from? I'm running FB 2 on Windows XP fully updated. Thanks, Rachel Maxim
Re: [flexcoders] AutoScroll Text Area, and AS3 timer
I am in need of a news ticker/scroller too, and I'm wondering if I'm just better off building it in Flash rather than Flex? Another question related to the timer...in AS2 I used setInterval or onEnterFrame for animation, but (at least the way I did it) with both of those methods performance degraded as the animations ran if the actions were not deleted at some point (in other words you could not do a constant animation with either of those effects). Does anyone know if this happens with the Timer object too? I know you can pass a tick limit to stop the timer, but I found out (hehe - by accident) that if you pass a 0 it just keeps going. Is that an evil thing to do? Maybe I'm just going about it it all wrong and this is not even an issue, if so I'd appreciate any advice :) Thanks, Rachel On 11/17/06, KP [EMAIL PROTECTED] wrote: Hi All, Sorry for bugging you on this one again but below is the sample code which contain textArea and I want to som how autoscroll the contect present in textarea. I have already used *verticalScrollPosition* and timer for doing this but it does not look good I want to give it a professional look like the link below http://projects.willstream.com/rssticker/index1.html can some one suggest some solution..thanks in advance. Kumar ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Canvas x=100 y=75 width=200 height=202 mx:TextArea x=20 y=24 width=170 height=92 mx:textsdf..sdfl'l'l'lsdfsl'fls'dlfdl;f some others things bla bla dfljljlj dfgkjdlgjlkdfg ljsdlfjldfjlsjdfl sdkljflsdjfljsdf jsldjflsdjflsjdf jsldjflsdjflsjdf lsdjfljsdlfjsdf lsdjfljsdlfjslf lsdjfljslfjsldf lsdjflsjdf/mx:text /mx:TextArea /mx:Canvas /mx:Application
Re: [flexcoders] Re: text not word wrapping
I believe you have to sent an explicit pixel width on a Text component for it to wrap, kind of a bummer if you want it to stretch but still wrap. The Flex docs describe the behavior: If you specify a pixel value for both the height and width properties, any text that exceeds the size of the control is clipped at the border. If you specify an explicit pixel width, but no height, Flex wraps the text to fit the width and calculates the height to fit the required number of lines. If you specify a percentage-based width and no height, Flex does not wrap the text, and the height equals the number of lines as determined by the number of Return characters. If you specify only a height and no width, the height value does not affect the width calculation, and Flex sizes the control to fit the width of the maximum line. Rachel On 11/17/06, Paul Hastings [EMAIL PROTECTED] wrote: On 11/17/06, Paul Hastings [EMAIL PROTECTED] wrote: mx:Text text={data.label} fontSize=8 fontStyle=normal fontWeight=normal textAlign=left textDecoration=none selectable=false id=legendText/ /mx:HBox sort of fixed this by setting a percent width on the text bit, wrapping works until you scroll past the word wrapped rows then those rows' text is simply truncated. any ideas? thanks. -- 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
Re: [flexcoders] Dynamically size a tile-list?
Cool, thank you!ROn 11/6/06, Michael Schmalle [EMAIL PROTECTED] wrote: Hi,Try using the measureWidthOfItems(index: int = -1, count:int = 0):Number and measureHeightOfItems(index:int = -1, count: int = 0):Number of the ListBase class.I have had good luck using these methods. The calculations are based off of the dataProvider. I think this is what you are looking for. Peace, MikeOn 11/6/06, Rachel Maxim [EMAIL PROTECTED] wrote: Is there a way to size a tileList based on the contents inside, instead of setting a static height and width or min/max height and width? I'm mostly interested in just having the tile list height only as high as the tiles within it. I think I could manually calculate the height based on the number of tiles within it to determine the number of rows, and thus the height...but I'm hoping there is a built-in way to do it.ThanksRachel -- Teoti Graphixhttp://www.teotigraphix.com Blog - Flex2Componentshttp://www.flex2components.com You can find more by solving the problem then by 'asking the question'. __._,_.___ -- 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 Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___
Re: [flexcoders] Content layout suggestions?
Troy - As far as organization goes, look into custom components. They can be written with MXML, and they sort of work like includes so that you can split your application into logical, manageably sized files. Your Application file just pulls it all together. HTHRachelOn 11/7/06, Troy Rollins [EMAIL PROTECTED] wrote: For my first Flex project, I'm developing a Flex version of an AS2project I've done. The client is looking to do an update, and thisseems like a good time to move it to Flex. It has been easy to layoutthe interface and wire it up (of course), but I'm not clear on how best to use the Flex metaphor for the content layout, and am seekingsuggestions, links, or whatever.Basically, it is training content, and takes the form of a bunch ofinteractive slide pages, with some ancillary functionality already provided by the rest of the interface.So, what I'm wondering is how to manage and layout the actual content.Something like a customized ViewStack for each chapter? Some of itwill be linked SWF files, but not all of it, and I'd like to keep things as easy to work with as possible, since there will be a fairamount of content. I would think that a single enormous applicationfile is not a good way to encapsulate things. In Flash, most of thesesame things were handled with symbols in the library, and the symbols were swapped in and out programatically. I'd like to come up withsomething which works similarly, or better understand how to makeprojects like this in a Flex workflow.TIA.--TroyRPSystems, Ltd. www.rpsystems.net--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links* To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/* Your email settings:Individual Email | Traditional* To change settings online go to: http://groups.yahoo.com/group/flexcoders/join(Yahoo! ID required)* To change settings via email:mailto: [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]* To unsubscribe from this group, send an email to: [EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to:http://docs.yahoo.com/info/terms/ __._,_.___ -- 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 Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___
Re: [flexcoders] Uploading
What type of images are you uploading? If you are displaying them within Flex/Flash it has to be an image type supported by Flash/Flex. I know that in earlier versions of Flash, you could not load progressive JPEGs and no CMYK images whatsoever, and AFAIK this hasn't changed but I'm new to AS3 and Flex too so I could be wrong :) HTH Rachel MaximOn 11/3/06, kumar [EMAIL PROTECTED] wrote: I am using flex2.0 trial, i have designed the page and upload thefiles i cant see the picture images, what is the problem. send my mailid. __._,_.___ -- 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 Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___
Re: [flexcoders] Re: flex is capable for developing interactive flash games?
Hope this helps...1. should i have to use flash ID to develop games or I can createwith MXML to produce flash intractive games.- Most likely you will want to continue to develop games in Flash, unless your games consist of things like form controls and charts or data manipulation :) Flex's real value lies in the ease with which it allows you to create application interfaces. If you were to attempt to create games in Flex, you would still need to do a lot of custom component development in AS3 and/or Flash, and Flex could be more of a wrapper, perhaps an interface to browse games, register, configure game settings, etc. 2. Is it necessary to use flash remoting software to conect remotingserver,eventhough i am Useing flex?-You can use a web service (standard WSDL/SOAP) instead of RPC/Remoting/AMF.. Remoting is binary so it's fastest in many cases, although proprietary. There's always a trade-off! But Remoting comes with ColdFusion... You only need remoting if you are going to be interacting with a server, database, etc...such as saving game stats and player info. If you just want to create the game interaction with no server back end, no remoting is needed. 3. How flex 2 it self can handle data processing(save,edit data todatabase).Flex calls methods and services from an application server like ColdFusion to make calls to a database, Flex doesn't do any of its own database interaction. Java seems to be one of the more popular back ends for Flex but IMO ColdFusion is the fastest and easiest way. -RachelOn 11/6/06, camlinaeizerous [EMAIL PROTECTED] wrote: While I can not answer all of your questions I can help you a bit withquestion 3. 3. How flex 2it self can handle data processing(save,edit data to database).There is a great wizard that helps with creating CRUD interfaces with databases. While I decided not to follow the way the wizard doesthings completely it did give me a very good starting point on how totransfer data back and forth form a SQL database. Assuming your usingFlex Builder 2 you will first need a Data Source set up in ColdFusion through the Admin Panel (If you need help with that I'll let someoneelse help as I know less about ColdFusion then Flex).When you have thedata source set in ColdFusion go back to Flex Builder 2 and go File New Other. A window pops up with the available other templates anduse the ColdFusion Wizards ColdFusion/Flex Application Wizard. Gothrough the wizard carefully and make sure your targets are sources are correct as it can overwrite existing projects if you set the wrongtarget. When your finished with the wizard you will now have a smallgenerated database access application with auto created files. Thesefiles were a great starting point to understanding how to do database access within flex.And for the most part unless your streaming video or making multiplayer games I think you can work around media server but don't quoteme on that.--- In flexcoders@yahoogroups.com, satyakishore [EMAIL PROTECTED] wrote: Hi Flex lovers, I am lover of flash. By reading the capabilies of flex,I am getting intrest towards flex. I have couple of doubts regarding developing Online games Subject:-Online gaming. Question:- Shall I use flex for developing online flash intractive games. if yes, 1. should i have to use flash ID to develop games or I can create with MXML to produce flash intractive games. 2. Is it necessary to use flash remoting software to conect remoting server,eventhough i amUseing flex? 3. How flex 2it self can handle data processing(save,edit data to database). IMPORTANT: Main doubt is FLASH REMOTING AND MEDIA SERVER IS NECESSARY TO DEVELOPE ONLINE GAMES IF I USE FLEX? According to my Knowledge:I am planning like this. Please guide me Which is correct way. 1. Sun Game Server 2. Flex 2 3. Flex Data Services(remotint - connecting and accesing database) 4. flash and actionscript(creating user intractive for games) 5. Mysql or oracle Sorry for my english. Please guide me or provide me any url link where i can get this knowledge. Thanksand Regards, Kishore --Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links* To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ * Your email settings:Individual Email | Traditional* To change settings online go to:http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required)* To change settings via email:mailto:[EMAIL PROTECTED]mailto: [EMAIL PROTECTED]* To unsubscribe from this group, send an email to:[EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to:http://docs.yahoo.com/info/terms/ __._,_.___ -- 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
[flexcoders] Dynamically size a tile-list?
Is there a way to size a tileList based on the contents inside, instead of setting a static height and width or min/max height and width? I'm mostly interested in just having the tile list height only as high as the tiles within it. I think I could manually calculate the height based on the number of tiles within it to determine the number of rows, and thus the height...but I'm hoping there is a built-in way to do it.ThanksRachel __._,_.___ -- 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 Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___
[flexcoders] Error showing up in Flex but not CF
Hello,I am working on a Flex app with CF/remoting, and have come across an error I cannot track down. The error is Unable to cast an object of type java.lang.String to Query. I've seen this error before and it's not normally an issue to solve, however I do not get the error when running the CFC method(s) outside Flex and dumping their return values on an HTML page. When I run the page in flex that calls those CFC methods via remoteObject, and display the fault string in flex, I get the error.In a nutshell, the CFC creates an array of objects, those objects each hold a string as one property and a query as another. Any ideas where I can look or what might be causing it?ThanksRachel __._,_.___ -- 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 Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___
Re: [flexcoders] Grouping result set output
Thanks - it seems so obvious yet I didn't think of that :) yes, I'm a total noob at Flex!ROn 10/17/06, Tom Chiverton [EMAIL PROTECTED] wrote:So nest your TileList's, add styles where needed to move it further left/right in the indent.Or use a tree control.--Tom ChivertonHelping to enthusiastically synthesize 24/365 clustersThis email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF.A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITYThis email is intended only for the use of the addressee named above and may be confidential or legally privileged.If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents.If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com.--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/* Your email settings:Individual Email | Traditional * To change settings online go to:http://groups.yahoo.com/group/flexcoders/join(Yahoo! ID required)* To change settings via email: mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to:[EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ __._,_.___ -- 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 Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___
Re: [flexcoders] Charting Trial stamp is stubborn
I got the same thing when I entered my license in the demo, but I think recompiling those MXML documents fixed it. ROn 10/17/06, iko_knyphausen [EMAIL PROTECTED] wrote:Hi,just got and entered my license keys for Builder and Charting, but charts still display Charting Trial stamp. Manage Licenses showsboth modules as valid commercial licenses. I did restart the IDE butstill the same. What else do I need to get rid of the trial stamp? Thanks-Iko--Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links* To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/* Your email settings:Individual Email | Traditional* To change settings online go to: http://groups.yahoo.com/group/flexcoders/join(Yahoo! ID required)* To change settings via email:mailto: [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]* To unsubscribe from this group, send an email to: [EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to:http://docs.yahoo.com/info/terms/ __._,_.___ -- 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 Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___