[flexcoders] Drawing letters -- sprites?
I have a project where I am drawing circles and line and such directly onto a component extending a UIComponent (all actionscript) I've had problems finding examples of drawing letters (or font characters). The best I've been able to come up with is to use IUITextField objects and place those on the stage... but this is terrifically limited. Dynamically changing the font size and such becomes a really big issue. var textField:IUITextField; textField = IUITextField(createInFontContext(UITextField)); textField.text = _value.toString(); Are there any examples where I can draw the sprites for the letters themselves?
[flexcoders] horizontal rule background
I have written a pinstriped background class that extends HaloBorder. It works great... (as the plainest example) basically I just overrode updateDiplayList.. You basically end up with a rectangle with a light pinstripe effect. Nice. But what I want to do is follow any rounded corners that are being drawn. I can draw a rounded rectangle (of course) but I don't know how to clip my lines to the inner boundry of the rectangle. I am currently drawing line after line for the full width in a loop after the backgound is filled (see psudo-code below). All you drawing experts... Is there a way to draw the portion of each line which intersects with the already drawn rectangle? the class looks similar to the following: package { import mx.skins.halo.HaloBorder; public class HorizontalRuleBackground extends HaloBorder { // \ - // override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); // At this point we cannot do rounded corners, so we need to // flatten the rounded corners no matter what topCornerRadius = 0; bottomCornerRadius = 0; var matrix:Matrix= verticalGradientMatrix(0, 0, unscaledWidth, unscaledHeight); var backgroundColor:uint = getStyle(backgroundColor) as uint; graphics.beginGradientFill(linear, [backgroundColor, backgroundColor], [1,1], [0,255], matrix); GraphicsUtil.drawRoundRectComplex(graphics, backgroundLeft, backgroundTop, backgroundWidth, backgroundHeight, topCornerRadius, topCornerRadius, bottomCornerRadius, bottomCornerRadius); graphics.endFill(); var stepSize:int = 3; var numberOfLines:Number = unscaledHeight/ stepSize; var borderColor:uint = getStyle(borderColor); graphics.lineStyle(1, borderColor, .2, true); for(var i:int=0; iunscaledHeight; i=i+stepSize) { graphics.moveTo(0, i); graphics.lineTo(unscaledWidth, i); } } } }
[flexcoders] removing component height
I have a thing I bump into from time to time and I know there justMUST be a solution for: Sometimes I want to leave a visual component on the screen but set its height to 0 explicitly, so that it takes up no space. Then later I want to say disregard my '0' and measure yourself. How do I (in essence) remove that explicit height setting and allow the component to set its own height? In action script I cannot seem to say component.height = null; component.invalidateDisplayList(); Anyone have a nice simple trick?
[flexcoders] Re: ItemRenderer in TileList not redrawing?
Anyone reading this thread because they are experiencing issues with item renderers... READ ALEX's BLOG!!! Great write-ups Alex. Thanks --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Renderers get recycled so make sure your renderer can be refreshed w/o being re-created. More info on my blog (blogs.adobe.com/aharui) From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Maher Sent: Wednesday, December 26, 2007 11:26 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] ItemRenderer in TileList not redrawing? Setup: I have a tilelist with a customer item renderer and an array collection dataprovider. The array collection has 100 items. The list can show 10 renerers on the screen. Problem: When I change (filter) the underlying array collection to 5 items the list redraws correctly in that there are only 5 items in it, but it's just the 1st 5 which were on the list before the filter. Basically, the array is changing, the list is changing, but the 1st 5 itemRenderers are not redrawing. Looking at the underlying array the 5 elements are, in fact, different than what is being drawn on the screen. It's as if they just are not being re-bound. Anonther example: Since only 10 can show in the list, when I filter the collection to 50 the scroll bar changes size (showing me that the list has changed) but the 10 items showing are the same as they were before the filter. HOWEVER! If I scroll down, then back up (thus taking those 10 off the screen and then bringing them back on) they are rendered correctly. In other words, it is just that the items which were already drawn on the screen are not being refreshed. I have tried list.executeBindings(); list.invalidateDisplayList(); list.invalidateList(); list.invalidateProperties(); I have tried making a new array collection and changing the data provider of the list, but nothing works. Is there a way to go into the items of the list and refresh or re- render them? And what am I doing wrong to make this necesarry?? Please help
[flexcoders] Re: removing component height
In something like an HBOX making it non-visible does not remove its layout footprint. So the hbox would still have a big blank spot there. -M@ --- In flexcoders@yahoogroups.com, Daniel Freiman [EMAIL PROTECTED] wrote: component.explicitHeight = NaN; is there a reason why you're setting height to 0 instead of setting visible to false? - Dan Freiman On Dec 28, 2007 12:46 PM, Matt Maher [EMAIL PROTECTED] wrote: I have a thing I bump into from time to time and I know there justMUST be a solution for: Sometimes I want to leave a visual component on the screen but set its height to 0 explicitly, so that it takes up no space. Then later I want to say disregard my '0' and measure yourself. How do I (in essence) remove that explicit height setting and allow the component to set its own height? In action script I cannot seem to say component.height = null; component.invalidateDisplayList(); Anyone have a nice simple trick?
[flexcoders] Re: removing component height
Damn! This seemingly simple item has really been a bane of mine. I have view stcks, and remove/add children functions in a lot of places I'd rather they were not. Thank you all very much for the help on this. I jut knew there would be a simple answer there somewhere. -M@ --- In flexcoders@yahoogroups.com, rueter007 [EMAIL PROTECTED] wrote: Tracy is right. setting visible=false will still reserve the space taken by the component. You have to set both visible and includeInLayout properties to false so that the component does not take any space in the layout. - venkat http://www.venkatj.com --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote: And includeInLayout = false; Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Freiman Sent: Friday, December 28, 2007 12:49 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] removing component height component.explicitHeight = NaN; is there a reason why you're setting height to 0 instead of setting visible to false? - Dan Freiman On Dec 28, 2007 12:46 PM, Matt Maher matt@ mailto:matt@ wrote: I have a thing I bump into from time to time and I know there justMUST be a solution for: Sometimes I want to leave a visual component on the screen but set its height to 0 explicitly, so that it takes up no space. Then later I want to say disregard my '0' and measure yourself. How do I (in essence) remove that explicit height setting and allow the component to set its own height? In action script I cannot seem to say component.height = null; component.invalidateDisplayList(); Anyone have a nice simple trick?
[flexcoders] ItemRenderer in TileList not redrawing?
Setup: I have a tilelist with a customer item renderer and an array collection dataprovider. The array collection has 100 items. The list can show 10 renerers on the screen. Problem: When I change (filter) the underlying array collection to 5 items the list redraws correctly in that there are only 5 items in it, but it's just the 1st 5 which were on the list before the filter. Basically, the array is changing, the list is changing, but the 1st 5 itemRenderers are not redrawing. Looking at the underlying array the 5 elements are, in fact, different than what is being drawn on the screen. It's as if they just are not being re-bound. Anonther example: Since only 10 can show in the list, when I filter the collection to 50 the scroll bar changes size (showing me that the list has changed) but the 10 items showing are the same as they were before the filter. HOWEVER! If I scroll down, then back up (thus taking those 10 off the screen and then bringing them back on) they are rendered correctly. In other words, it is just that the items which were already drawn on the screen are not being refreshed. I have triedlist.executeBindings(); list.invalidateDisplayList(); list.invalidateList(); list.invalidateProperties(); I have tried making a new array collection and changing the data provider of the list, but nothing works. Is there a way to go into the items of the list and refresh or re- render them? And what am I doing wrong to make this necesarry?? Please help
[flexcoders] AIR Window and Mouse management
Is there a class or object out there that I can get reference to the mouse no matter where it is? I can't seem to find anything. I have an AIR app with multiple native windows. I want to show things in those windows while the mouse is over them, but not show them when the mouse is elsewhere. I have implemented the normal mouseOver mouseOut stuff but it's very easy to get into a scenario where mouseOut doesn't get called (another non-air window overlapping the air window for example). So I think I need to implement some form of collision detection in reverse. I think running a timer once I show things in the window (with mouseOver) to test to make sure the mouse is still within the boundaries of said window. But I cannot seem to get reference to the mouse without an event. And as far I know events are not broadcast into AIR when they occur outside of AIR (as far as I have been able to replicate at least). Can someone steer me a bit here? I HAVE found the deactivate event on a native window. At least if the user clicks somewhere else then I can handle that...
[flexcoders] Re: AIR Window and Mouse management
Well, that's just it. I don't have a mouseMove event as I'm trying to test when the mouse is not over a flash container. MouseMove is not heard by this window unless inside of the window... Unless someone knows how to listen to something crazy like System.system MouseMove ?? --- In flexcoders@yahoogroups.com, [EMAIL PROTECTED] wrote: Maybe checking the Array from getObjectsUnderPoint could help you, inside a MouseEvent.MOUSE_MOVE event. -- Keith H -- Matt Maher [EMAIL PROTECTED] wrote: Is there a class or object out there that I can get reference to the mouse no matter where it is? I can't seem to find anything. I have an AIR app with multiple native windows. I want to show things in those windows while the mouse is over them, but not show them when the mouse is elsewhere. I have implemented the normal mouseOver mouseOut stuff but it's very easy to get into a scenario where mouseOut doesn't get called (another non-air window overlapping the air window for example). So I think I need to implement some form of collision detection in reverse. I think running a timer once I show things in the window (with mouseOver) to test to make sure the mouse is still within the boundaries of said window. But I cannot seem to get reference to the mouse without an event. And as far I know events are not broadcast into AIR when they occur outside of AIR (as far as I have been able to replicate at least). Can someone steer me a bit here? I HAVE found the deactivate event on a native window. At least if the user clicks somewhere else then I can handle that...
[flexcoders] Re: coordiates of items in a datagrid (really need help!!)
Since Alex cannot help me, can anyone else help me get to the illusive listItems object that a datagrid has? I see it's related to the ListData object and have tried several ways of trying to get to the object with no luck. Alex's reference here to Subclassing is stumping me. When I look around for how to subclass it's simply extending the object. But that doesn't seem to expose any of the underlying private objects. Seriously, I'm really stumped on this one. It's just some principle I'm missing, obviously. I have created new datagrid extending objects, tried using casts through interfaces, just about anything I could think of. I'd like to learn this if possible. Please help! Thanks a bunch for a simple code snippet --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Yes, subclasses can access protected members. Subclassing is basic ObjectOriented programming so you'll have to figure out how to learn how to do that. It is out of my scope to help you with that. There are some custom component examples in our doc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Maher Sent: Thursday, June 07, 2007 2:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: coordiates of items in a datagrid Alex, thanks so much! Can you tell me a bit more? I have looked through the debugger and seen the listItems but I cannot seem to figure out how to get reference to that list during runtime... Is this what subclassing will do for me? How can I do that? Thanks again for at least letting me know it's even POSSIBLE though. --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: You'll have to subclass and then snoop through the listItems array From: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of Matt Maher Sent: Wednesday, June 06, 2007 4:20 PM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] coordiates of items in a datagrid I have a datagrid and want the user to be able to draw a selection box over the elements in it... When the user lets go of the mouse button I want to look through the items of the grid to ask each if they fall within the coordinates of the box. This sounds so simple and I've gotten to the last step in the process, but I cannot seem to find any way to determine the coordinates of the elements in the datagrid which are currently displayed. There just must be something... Any help at all on this matter would be so greatly appreciated. I am pulling my (already gone) hair out over this one. Thanks
[flexcoders] Re: coordiates of items in a datagrid
Alex, thanks so much! Can you tell me a bit more? I have looked through the debugger and seen the listItems but I cannot seem to figure out how to get reference to that list during runtime... Is this what subclassing will do for me? How can I do that? Thanks again for at least letting me know it's even POSSIBLE though. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: You'll have to subclass and then snoop through the listItems array From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Maher Sent: Wednesday, June 06, 2007 4:20 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] coordiates of items in a datagrid I have a datagrid and want the user to be able to draw a selection box over the elements in it... When the user lets go of the mouse button I want to look through the items of the grid to ask each if they fall within the coordinates of the box. This sounds so simple and I've gotten to the last step in the process, but I cannot seem to find any way to determine the coordinates of the elements in the datagrid which are currently displayed. There just must be something... Any help at all on this matter would be so greatly appreciated. I am pulling my (already gone) hair out over this one. Thanks
[flexcoders] coordiates of items in a datagrid
I have a datagrid and want the user to be able to draw a selection box over the elements in it... When the user lets go of the mouse button I want to look through the items of the grid to ask each if they fall within the coordinates of the box. This sounds so simple and I've gotten to the last step in the process, but I cannot seem to find any way to determine the coordinates of the elements in the datagrid which are currently displayed. There just must be something... Any help at all on this matter would be so greatly appreciated. I am pulling my (already gone) hair out over this one. Thanks
[flexcoders] Re: OpenType Fonts in Flex 2?
I'm very happy to finally find this answer. Wow that threw me for a while Alright then, I have a Type 1 font (pfm/pfb) that I converted to OTF. Since OTF cannot be used, how about the PFM? /me prays --- In flexcoders@yahoogroups.com, nesleinob [EMAIL PROTECTED] wrote: Thanks, Matt - we'll give the flash option a try. -Bo --- In flexcoders@yahoogroups.com, Matt Chotin mchotin@ wrote: Unfortunately we cannot support OpenType fonts directly in Flex 2, it's something we're trying to fix in the next release. As a workaround, if you have access to Flash, you can create a SWF and embed the font there, then in Flex grab the font from the SWF that you produced. Basically you use Flash to get the font encoded correctly, then we take that work and just steal the symbol in Flex. Matt From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of nesleinob Sent: Wednesday, February 21, 2007 6:08 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] OpenType Fonts in Flex 2? Please forgive me if this topic have been brought up before, but I have not been able to locate any threads, so I'll bring it forward... We have no trouble embedding TruType Fonts in our Flex app, but OpenType Fonts does not compile. Is this simply the way it is - no support for OTF in Flex 2 or are we missing something? For reference, we are using a .css file to embed the fonts. As a syntax example, the following entry will compile fine @font-face { src:url(fonts/gara.ttf); fontFamily: Garamond; font-style: regular; } However, replacing the font with an OTF font like this @font-face { src:url(fonts/AGaramondPro-Regular.otf); fontFamily: AGaramondPro; font-style: regular; } throws a compiler error: exception during transcoding: Unexpected exception encountered while reading font file '/U:/bnielsen/init/app/flex/fonts/AGaramondPro- Regular.otf' If anyone on the list can offer any advice, it would be much appreciated. Thanks in advance, -Bo
[flexcoders] Update Progress Bar during processing
This seems like a simple thing, but I have a progress bar that works just fine. The problem is the loop I'm working through is taking all of the resources for the flash container while it works. Put another way: I am processing 1000 records It takes 45 seconds to complete and is invisible to the user While this loop of processing takes place I want to update a progress meter telling the user I'm still working but Since this loop is so intense the whole flash container hangs or apears to pause. In fact, the whole browser is in this state. Is there a way I can throttle this work a little so that screen updates and interactions can still take place? (as a note, I'm walking through some data DTOs and creating an XML object from the properties on them) Thanks
[flexcoders] xml FROM arraycollection?
If I have an arrayCollection, is there an easy way to get an XML object created from it? arrayCollection.toXML() you know, something like that! Thanks
[flexcoders] Creating an object from a class name
I bet this is easy. I have MainView as a string and I need to create an object of that type... for example var myObject:Object = new GetObjectFromString(MainView); I know, that line of code is a mess. Got any help for me?! Thanks!!
[flexcoders] Flex Caching Data?
I have a component which downloads a list of credit card numbers for the customer to work through. This file is delivered to the container as a CSV then turned into a collection of DTO objects. Is there a way to MAKE SURE that flash does not leave this on the disk after the container closes (like closing a browser). I am worried about a laptop using our program once, then being stolen. Is this configurable? Encryptable? I've been digging but all the cache info I find is about the swf file itself. Thanks!
[flexcoders] Re: Flex Caching Data?
As a follow-up... I am not writing this to disk myself. I am using an HTTPService to download the file, then processing it in memory into a data-store. Never (by me) is either the downloaded file, nor the data-store intentionally written to disk. I think, because of this, the two files being written I am concerned about (cache) are temporary internet files and normal swap-like disk caching. Thanks again --- In flexcoders@yahoogroups.com, Matt Maher [EMAIL PROTECTED] wrote: I have a component which downloads a list of credit card numbers for the customer to work through. This file is delivered to the container as a CSV then turned into a collection of DTO objects. Is there a way to MAKE SURE that flash does not leave this on the disk after the container closes (like closing a browser). I am worried about a laptop using our program once, then being stolen. Is this configurable? Encryptable? I've been digging but all the cache info I find is about the swf file itself. Thanks!
[flexcoders] Re: Top and Bottom padding on DataGrid
Never did, sorry. I posted several messages here and no one replied, which leads me to believe that it's not doable without extending (a la understanding) the grid rows themselves. Sorry. Please let me know if you get anywhere on it. I sure as heck wish I could do something about it. -M@ --- In flexcoders@yahoogroups.com, Douglas Knudsen [EMAIL PROTECTED] wrote: ever have any luck with this? DK On 1/22/07, Matt Maher [EMAIL PROTECTED] wrote: Is there a simple way to change the forced padding on the top and bottom of datagrid rows? If I make font-size=6 I would expect the row to shrink to a tiny size, but there seems to be a forced top and bottom margin that keeps the row at a certain height. ItemRenderers are possible, but that means trouble with as much data as I am displaying. Any css'ers or skinners out there know how to do this? -- 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 -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
[flexcoders] Re: Test for Network Connection
Good lord Jim, you have saved me TONS of work! Thank you so very much! --- In flexcoders@yahoogroups.com, Jim Cheng [EMAIL PROTECTED] wrote: Matt Maher wrote: I'm writing an on-line/off-line application that will sync your data once you return to an on-line status. Instead of calling an http service every 15 seconds to test for connection status, is there some way I can see deeper into the client's machine to see the status of network connection? Or perhaps a lighter ping mechanism that doesn't actually send anything over the wire to test for connection? Right now, you'll probably need to do the regular remote ping, or alternatively, you could maintain an open socket connection to the server from your application and send pings over that rather than HTTP as doing so would reduce the amount of network traffic. Doing this might be a little trickier though, particularly if you don't have much expertise on non-HTTP technologies on the server-side. However, before you get too far ahead of yourself, note that ALL of these features will be in Adobe's upcoming Apollo platform. Apollo is geared perfectly for the type of application you're envisioning: an RIA that can run both in a online mode and offline, with the capability to synchronize data against a remote server upon reconnection, and the ability to detect and receive notifications of changes in network connectivity. You can see all of these features in action on Mike Downey's recent demo of the new eBay Desktop application that we're currently building here at effectiveUI. Here's a video of the demonstration: http://www.demo.com/demonstrators/demo2007/91259.php According to Adobe, a public beta of Apollo will be available soon on the Adobe Labs site, and you can learn more about Apollo and sign up to be notified when the beta becomes available for public consumption: http://labs.adobe.com/wiki/index.php/Apollo Jim Cheng effectiveUI
[flexcoders] Test for Network Connection
I have a few probing questions that will ultimately force my final design. I'm writing an on-line/off-line application that will sync your data once you return to an on-line status. Instead of calling an http service every 15 seconds to test for connection status, is there some way I can see deeper into the client's machine to see the status of network connection? Or perhaps a lighter ping mechanism that doesn't actually send anything over the wire to test for connection? Thanks
[flexcoders] Re: Can't deploy .swf
John, I'm not certain I can help you here but I can tell you what I know. Maybe something will be useful: source files: I use the Flex Builder environment, so this may not pertain to you: Upon build Flex creates a bin directory where all executable files are located. This is helpful in at least allowing you to FTP an entire directory to your server and not have to pick and choose. In there are the swf and html files you mentioned. I would assume the issue is some other resource in that directory is not being included in your Send to a friend. So, #1: entire bin directory As for #2 this is a tougher issue. Basically, you cannot call off server or into a higher security setting unless you are running the application through the flex builder or there is a crossdomain file on the server you are calling. To state this more clearly: If you put your program on http://www.mybox.com and within the program there are services trying to call any domain (URL) not in the www.mybox.com domain then you will hit the sandbox security problem. This (seemingly) also goes for running it from your own hard drive. Though I swear I have run things from my own machine that accessed everywhere else without it running from the Flex Builder environment, I have also seen it fail. So the last part of even on your own hard drive part is very suspect. The second part of the problem is calling from http into an https environment. That is the second security catch and you will need an extra line in your crossdomain file (secure=false I believe) to allow this kind of communication. Cross domain files are simple, but they have to be on the server you are gathering the data from which can be a problem for something like an RSS reader since you likely won't be reading your own feeds and thus you likely don't own the boxes. A simple way around this sandbox is to write a proxy program on your web server. It can be the program that calls the URL you want and simply returns the data to your flash player -- thereby never having to ask your flash program to talk outside of its own domain. I hope any of this helps. --- In flexcoders@yahoogroups.com, John Buono [EMAIL PROTECTED] wrote: This might sound to trivial, but it is frustrating. i have just gotten Flex 2. I have gone through the tutorial in the book. I sucessfully built the RSS reader. So far so good but when I sent the .html file and the .swf file per the documentation to a friend, all we got was error messages about all the missing files. When we put up the missing files (history.html, history.js, and a couple of others), either it did not work or we got a crossdoimain.xml missing error What do I need to do to deplay the .swf files i create in flex. I know it has to be something simple that I am missing. thanks John
[flexcoders] Host Name? How do I get my current host name?
I need to know what box and what domain I am running the flash movie from. Is there any way I can get this information
[flexcoders] Top and Bottom padding on DataGrid
Is there a simple way to change the forced padding on the top and bottom of datagrid rows? If I make font-size=6 I would expect the row to shrink to a tiny size, but there seems to be a forced top and bottom margin that keeps the row at a certain height. ItemRenderers are possible, but that means trouble with as much data as I am displaying. Any css'ers or skinners out there know how to do this?
[flexcoders] Flying Boxes
Someone please fast-track me... I have a complex and very component-ized interface. I'd love to create some elements that know how to float around the screen... For example how a combobox works. It takes up x and y space, but when activated the resulting drop box flies over everything. How do I get reference to the application space to draw a new element in absolute space? Or is that the wrong idea in the first place. If I'm deeply nested in h and vboxes and want to fly something around, how do I do that? Any clues would be welcome. I'm sure just getting the first idea of how this works will be enough. Thanks
[flexcoders] Re: User Authentication
You will, no doubt, get much better answers from others as I am working on the same things over here. But Flex plays in your browser's session management like anything else. In other words, it sends the same headers the browser would send when requesting something from the server. If you already have a logged in state on your website I'd say just host your flex application on a secured page. That will inherit the same authentication you use for everything else. If you want flex itself to be the application that does the user logging in -- i.e. having a login form in flex. Then you will have to build that in the application. As far as I can tell, the easiest way to force this log-in is to have a viewstack on your main page (application perhaps) that stops on the login form first, then switches the stack to the application after talking to the servers to verify the user's info. I know that's all over the place, but I hope something rings a bell for you. --- In flexcoders@yahoogroups.com, pioplacz [EMAIL PROTECTED] wrote: Hi! I was wondering if there is a use and secure way to make a user login system for any flex app? I just want to have a login before the user can access the application.
[flexcoders] Re: Making a Hover menu with Flex
Genius! This helped me tremendously. I was wondering the same thing. It may be interesting to the Flex designers that this is, by no mean, an obvious solution to the problem. Perhaps it's the name PopUp. Somehow that relates directly to things like dialogs and alerts. Certainly my own mistake, but it wasn't obvious. Thanks for all in this thread for the help! --- In flexcoders@yahoogroups.com, missgiggygirl [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, Michael Schmalle teoti.graphix@ wrote: Hi, For instance; private var hoverMenu:Menu; hoverMenu = Menu(PopUpManager.createPopUp(this, Menu)); hoverMenu.x = calcXCoord; hoverMenu.y = calcYCoord; hoverMenu.dataProvider = hoverMenuDP; You have complete control over the popup once it is created. All the popup manager does is stick it into the systemManager as a child which then becomes parented by the systemManager not the Application. Peace, Mike Thanks for taking the time to help a newb! I get it now! :) -- Ann
[flexcoders] DataGrid cell renderers and tiny text
Okay, this should be a no-brainer I want my datagrid rows packed together very tightly which means getting rid of the paddingTop or verticalGap that is the default of the datagrid cell. I can create my own item renderer mx:itemRenderer mx:Component mx:HBox verticalGap=0 paddingBottom=0 paddingTop=-3 mx:Label text={data.theValue}/ /mx:HBox /mx:Component /mx:itemRenderer That's all fine and good (though more than I want to do for 30 columns really. First, can I set something that takes the padding off of the cells? If not, can I abstract the itemRenderer above into a new component that is virtual? I'm having troubles with the theValue you see above. If I just put out data in an abstracted component it does not peer into the object for the dataField=theValue as defined in the line as: mx:DataGridColumn dataField=theValue itemRenderer=renderers.DataGridCellTiny/ All that comes out of that is [Object], so short of creating an abstracted component per column I don't see how to pass the itemRenderer any references to tell it what field to get out of the object. Wow, that was much simpler in my head.
[flexcoders] Array Inefficiencies??
I sure as heck hope someone out there has an answer for me on this one... Has anyone else seen inefficiencies with arrays? I have a file with 1000 rows that looks this,that,other,etc,etc again,this,is,another,row I load that into an Array called values splitting on ,. That all works fine. The array builds happily and quickly. But when I populate an object from that array (see below) it's slow as Christmas. Here is an example of what I am doing: if(false) { // 1000 @ 2 seconds : 50k Rows in 1 min 40 sec val1 = new String(123456); val2 = new String(12/12/2005); val3 = new String(12/13/2005); val4 = new String(asdfjklmsd mjnklsdf); val5 = new String(asdfjklal alamjnklsdf); val6 = new String(aasd9asdf;lj asdf); val7 = new String(aaa2a6236523); val8 = new String(IP); } else if(true) { // 1000 @ 8 seconds : 50k Rows in 6 min 20 sec val1 = values[0]; val2 = values[1]; val3 = values[2]; val4 = values[3]; val5 = values[4]; val6 = values[5]; val7 = values[6]; val8 = values[7]; } Notice that the top if is putting in hard-coded values and the bottom one is using the values array I created. It's 4 times slower. This makes using files over 5,000 rows very painful. And certainly puts an upward limit on how much data I can slurp in. Mind you that this is not a result of reading the file (very very fast) nor creating the values array for each row. I am creating the values array in both scenarios above. So that's included in the time. Someone please tell me I'm being an idiot here somehow. Maybe I should be using an ArrayCollection, or referencing values via the index of an array is terribly slow... something obvious?
[flexcoders] Percentage based width in ActionScript
Yikes, I am creating a component in ActionScript and adding an HBOX to it as a child. I want that hbox to fill 90% of the width of this. I see on this page http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=0518.html a comment about percentHeight, percentWidth In MXML tags only... Come on, really? This seems a very troubling shortcoming. I just know one of you gurus has figured out a simple fix for this, right?
[flexcoders] Determining VDividedBox heights
I'm trying to remember the height at which someone sets a vertically divided section. I am using a VDividedBox and have set a listener to the dividerRelease event. When I get in there I can trace out the height of the top component within the VDividedBox but it gives me the pre-resized value. I am assuming that the drop event happens before the redraw. Okay, not a shock. But what is confusing is that the VDividedBox object itself doesn't seem to have any getters nor properties for the size of the two boxes it is in control of. Am I missing something? I believe I can use the delta property on the event that is thrown and add that to the pre-resized value of the top box. I'm thinking that is a workaround, but am I missing something? Thanks
[flexcoders] Re: ItemRenderers and Events
Wonderful reply Tracy. Thanks. Bubbling the event, that's the perfect tip. As for not being able to walk the items in the list, that seems counter intuitive to me, but okay. As long as I know the behavior I can find a way and stop pulling my hair out wondering why I can't do what Flex doesn't do in the first place. Thanks a ton for the clear and very helpful reply. -M@ --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: If you are using dispatchEvent(new Event(change,true)) the second argument tells the event to bubble and you should be able to listen for it anywhere in the displayList, including the List, and Application. However, it sounds suspiciously like you are not having your checkbox renderer update the dataProvider. This is required. You cannot walk any array of elements inside the list You must look at the dataProvider only. The visual elements, including the checkboxes cease to exist when they are scrolled. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Maher Sent: Friday, December 22, 2006 4:07 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] ItemRenderers and Events I'm having troubles with capturing events from an item in a List which uses an itemRenderer. Basically I'm overriding a multi-select List to have a checkbox in it with a simple itemRenderer. The item renderer is handling the clicks and managing the checkbox just fine. It also dispatches an event when clicked. But when it comes time to listen to that event I don't know who to ask to listen to it. The component which included the List doesn't seem to care, and the List item itself surely doesn't seem to be attachable... Another workaround was to capture all clicks on the LIST itself, then walk the itemRendered elements, asking each one if it was checked or not. That one baffles me. I cannot seem to walk any array of data elements inside the list. I can see the dataProvider array in the debugger, but I need the itemRenderer list so I have reference to the checkbox element. This seemed so simple at first. Now I'm just flailing around.
[flexcoders] Re: Question on TabNavigator
Malik, have I got the resource for you... here's something fun to play with to learn a lot about the interface elements: http://weblogs.macromedia.com/mc/archives/FlexStyleExplorer.html There is an item at the top for tabs -M@ --- In flexcoders@yahoogroups.com, malik_robinson [EMAIL PROTECTED] wrote: Hi Few questions that I think should be easy to answer? 1. How can I space the tabs up in a tab navigator? I'd like to have space between each tab. They look too scrunched to me at least by default. 2. I am trying to build an application that has tabbed interface and I am wondering is this the way to go about it. 3. Is there a way to center the tabs in the middle? Currently they are left aligned by default My code is below: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute frameRate=60 mx:TabNavigator borderColor=#00 borderStyle=solid height=100% width=100% backgroundColor=#ee mx:VBox label=Tab1 /mx:VBox mx:VBox label=Tab2 /mx:VBox mx:VBox label=Tab3 /mx:TabNavigator /mx:Application
[flexcoders] ItemRenderers and Events
I'm having troubles with capturing events from an item in a List which uses an itemRenderer. Basically I'm overriding a multi-select List to have a checkbox in it with a simple itemRenderer. The item renderer is handling the clicks and managing the checkbox just fine. It also dispatches an event when clicked. But when it comes time to listen to that event I don't know who to ask to listen to it. The component which included the List doesn't seem to care, and the List item itself surely doesn't seem to be attachable... Another workaround was to capture all clicks on the LIST itself, then walk the itemRendered elements, asking each one if it was checked or not. That one baffles me. I cannot seem to walk any array of data elements inside the list. I can see the dataProvider array in the debugger, but I need the itemRenderer list so I have reference to the checkbox element. This seemed so simple at first. Now I'm just flailing around.
[flexcoders] AS Help
I have a hard question to ask as I don't know the terms to use for it. Basically, I want to use a string variable to set what member variable to pull from another object How can I make something like the following work: function fun(inString:String):String { return preExistingObject.eval(inString); }
[flexcoders] Re: AS Help
So, what I'm hearing is every member of an object is also added to an associative array in that object by name? That's great news. I didn't expect that level of DOM-type support from AS... I am learning every day that these AS guys got a LOT right! Thanks! --- In flexcoders@yahoogroups.com, Doug Lowder [EMAIL PROTECTED] wrote: That would be equivalent to return preExistingObject[inString]; For the current object, use this[inString]. --- In flexcoders@yahoogroups.com, Matt Maher matt@ wrote: I have a hard question to ask as I don't know the terms to use for it. Basically, I want to use a string variable to set what member variable to pull from another object How can I make something like the following work: function fun(inString:String):String { return preExistingObject.eval(inString); }
[flexcoders] Content Clipping, how is it supposed to work?
I am trying to make a canvas (with rounded corners) clip the content inside of itself. It flat doesn't work. The clipping occurs, but the rounded corners are not taken into account, so the content inside is clipped to the square canvas. I have source below. Copy and paste that into the Flex Online Compiler http://try.flex.org/index.cfm (link: http://try.flex.org/index.cfm ) between the application tags to see what I am talking about. Is this a described behaviour? You will notice that I also put clipContent=true on the canvas in hopes that would actually help. Is there another way to produce the behaviour I'm looking for? mx:HBox width=100% height=100% horizontalAlign=center verticalAlign=middle mx:Canvas cornerRadius=25 clipContent=true backgroundColor=#FF borderStyle=solid width=150 height=200 horizontalScrollPolicy=off mx:HBox backgroundColor=#FF mx:Label text=This is text long enough to get clipped/ /mx:HBox /mx:Canvas /mx:HBox
[flexcoders] backgroundGradientColors on something other than Application
I was wondering if there were other elements (canvas, hbox, panel, etc) that can suport the backgroundGradientColors gradient properties? I see that there seems to be no support by default, is this simple to change?