[flexcoders] Re: auto close popups
I'm not sure that you need to worry about the FocusManager given you want it to go away on a click. One way I would handle it would be to add an event listener to the stage and listen for MouseEvent.MOUSE_DOWN. Check the target and if the target is not anything in your popup, then close the popup. You can use the contains method for this. You may also consider adding a small close button to your popup just in case the user doesn't realize they just have to click somewhere else to hide it. Remember to remove the event listener when you're done. --- In flexcoders@yahoogroups.com, Glenn Jones tgjone...@... wrote: I have a popup that's opened in the usual way with the popup manager. It's not modal. Sometimes the controls within the popup are enabled so that the user can interact with them, and sometimes the controls are disabled because the contents are read-only. As soon as the user clicks anywhere else in the application, I'd like to close the popup. Is there an easy way to do that? Based on what I've read, the popup should have it's own instance of FocusManager, and that FocusManager should receive a deactive() call if the user clicks somewhere else. So I thought about extending the FocusManager with some new class designed to close the parent form on deactivate. But was hoping there was a better way. Thanks, Glenn
[flexcoders] Re: FileReference.save optional
--- In flexcoders@yahoogroups.com, droponrcll amyblankens...@... wrote: --- In flexcoders@yahoogroups.com, markdemich demi@ wrote: A lot of my customer base still uses Flash 9. Was trying to determine that if Flash 10 was loaded I would conditionally provide a feature in my app to save something to a file. I tried faking out the compiler by doing something like this. if (isFlash10) { var f:Object = new FileReference(); f.save(xyz,null); } but I get an error when I run it in Flash 10. Everything I found leads me to believe that I need to compile for Flash 10. However, I fear that will mess up my Flash 9 users. Does anyone have any advice on making a SWF that will work in 9, but optionally use Flash 10 features. Try/catch. Try/catch won't help since it doesn't work, period. My first challenge is to get it to actually work in Flash 10. I did some searching around and I think I may be able to compile it for 10. In that case, I think it will work in 9 except for any features that require 10. Does anyone know much about this?
[flexcoders] FileReference.save optional
A lot of my customer base still uses Flash 9. Was trying to determine that if Flash 10 was loaded I would conditionally provide a feature in my app to save something to a file. I tried faking out the compiler by doing something like this. if (isFlash10) { var f:Object = new FileReference(); f.save(xyz,null); } but I get an error when I run it in Flash 10. Everything I found leads me to believe that I need to compile for Flash 10. However, I fear that will mess up my Flash 9 users. Does anyone have any advice on making a SWF that will work in 9, but optionally use Flash 10 features.
[flexcoders] XML Entity won't parse inside MXML
I have some embbeded XML inside an MXML file that I'm feeding to an outline. Some of my attributes need to have a quote character. It looks something like this mx:XMLList id=testXml sample badattribute=quot;ABCquot; test name=1/ test name=2/ /sample mx:XMLList This refuses to compile. I even ran a test where I omitted, the badattribute from the xml and then in the code I did something like this, testx...@test = 'ABC'; trace(textXml.toXMLString()) and it printed it out correctly using quot; as the quote character. Does anyone have a clue as to what's going on? Thanks, Mark
[flexcoders] QuickTime Movies
Is it possible to display QuickTime Movies from an Air app? It seem that VideoDisplay only does FLVs.
[flexcoders] NaN in CSS
Is it possible to specify NaN or maybe null inside a CSS file. I have a selector that needs to undefine a width set in another selector for the class.
[flexcoders] Foreign Keyboard Mappings
I have a flash application that's being used in other countries. I'm having reports that certain keys from certain keyboards are not getting translated properly. My application uses a custom equation editor that I wrote. I'm using key up and key down handlers to capture key strokes. I can't believe the flash doesn't support character translations out of the box. I know some people out there us a hidden TextField to capture the translated text, but I really don't want to do there. I suspect that will mess up a lot of my focus code and cursor movement code. Has anyone tackled this another way? One idea I had was to somehow come up with a keyboard mapping application, that would require the user to learn the keys. I would then store some sort of a lookup table inside a shared object. I'm not sure what the interface would look like, but it's an idea. Any other ideas would be appreciated.
[flexcoders] Foreign Keyboard Mappings
I have a flash application that's being used in other countries. I'm having reports that certain keys from certain keyboards are not getting translated properly. My application uses a custom equation editor that I wrote. I'm using key up and key down handlers to capture key strokes. I can't believe the flash doesn't support character translations out of the box. I know some people out there us a hidden TextField to capture the translated text, but I really don't want to do there. I suspect that will mess up a lot of my focus code and cursor movement code. Has anyone tackled this another way? One idea I had was to somehow come up with a keyboard mapping application, that would require the user to learn the keys. I would then store some sort of a lookup table inside a shared object. I'm not sure what the interface would look like, but it's an idea. Any other ideas would be appreciated.
[flexcoders] Bad TextMetrics being returned on some machines
I have an application that pieces together text. To do this, I need to get the textWidths of Flash TextField objects. I also use the getLineMetrics method as well. I have a particular scenario that's not working. This is happening on some Windows XP machines. It repeats in AIR as well as the latest Flash Player in IE or Firefox. Basically, I have a TextField with the font set to Times New Roman and a size of 15. In the TextField i have the unicode character for a prime symbol, \u2032. I put three of these next to each other in a single TextField. On some machines the width of each individual character is much wider than it should be. It's really odd. I compared the TTF files for the New Times Roman Font on each machine and they are the same. I updaded the problem machine to have the latest Graphics Drivers and that didn't help. I tried it with Clear Type on and off. One of the machines that's messed up has a NVidia Geforce 6200 graphics card, but I'm not sure that helps. Does anyone have any ideas on what I can look for to determine what is causing this on some machines. One more thing. I embeded this particular character and tested it that way, and it works ok. It must have something to do with the way flash is interpreting the TTF, but I can't figure out why it would work on one XP machine and not another. Any ideas would be appreciated.
[flexcoders] Profile external SWF
I need to profile my swf in the context of my site. Debugging works fine, but I can't figure out how to start the profiler and be able to navigate a few pages on my site before getting to my SWF. Does anyone know how to do this?
[flexcoders] printJob and callLater
I have an application that produces a very large printout. The documentation in the printJob says that you have a 15 second time limit in between calls to PrintJob.addPage (this is what FlexPrintJob.addObject is calling). However, based on my tests it seems you have 60 seconds for the whole thing to happen. I tried to chain my addPage calls with callLaters but that just cause an exception on the second addPage. The documentation says that you can do it in multiple frames, but that doesn't seem to be the case. Am I stuck with making sure my print job get's completely done withing the 60 second timelimit or is there a work around?