[Flashcoders] Selection Box
Hey guys, I am setting the onPress callback of an mc to call Selection.setFocus(this.mc); This works correctly, but I notice that briefly when the setFocus call is executed that a yellow outline flashes around the mc. I have seen this box before when I have tabbed through selections as well. Is there any way to remove or modify the color of this outline? I have dug through the flash docs, but I don't see much on the subject. Brandon ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] RE: Selection Box
I figured it out. For the curious, it involves the use of _focusrect. See this in the archives for more info. http://chattyfig.figleaf.com/pipermail/flashcoders/2005-August/145629.html Hey guys, I am setting the onPress callback of an mc to call Selection.setFocus(this.mc); This works correctly, but I notice that briefly when the setFocus call is executed that a yellow outline flashes around the mc. I have seen this box before when I have tabbed through selections as well. Is there any way to remove or modify the color of this outline? I have dug through the flash docs, but I don't see much on the subject. Brandon ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Detecting NaN
Andy, Like the other poster said, us isNaN, but I was also curious about why this might be true. I found this link on the subject that will be helpful (original page down): http://209.85.165.104/search?q=cache:ilnSqw-hBjwJ:livedocs.macromedia.com/flex/2/langref/package.html+Flash+NaN+equalityhl=engl=usct=clnkcd=3 The |*NaN*| value is not considered equal to any other value, including |*NaN*|, which makes it impossible to use the *equality* operator to test whether an expression is |*NaN*|. To determine whether a number is the |*NaN*| function, use |isNaN()|. Brandon - I'm trying to convert an arbitrary object into a Number, and then detect if the conversion actually succeeded. In theory I would convert it and then check if the converted value is NaN, but this doesn't seem to work. Here's my test. In a blank FLA I put the following code: -- var foo = foobar; var fooN:Number = Number(foo); trace(typeof(fooN)); if(fooN == NaN) { trace(fooN is NaN); } else { trace(fooN is a number: + fooN); } -- This should output: number fooN is NaN but instead I get: number fooN is a number: NaN For some reason the check to see if it's NaN isn't working, and I have no idea why. It looks like I can use isNaN(fooN) for the check instead, but I'm wondering why == doesn't work. -Andy ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] AS3 properties woes
Also not an AS3 expert, but I think Danny is wrong. The super function is necessary to call the parent constructor. I believe that the problem is related to what Petro said about labelClass being outside of the AbstractMarker class. I would also consider subclassing showTitle and adding a trace to see if the value is correct in the DateMarker version. If so, then someone the two labelClass variables aren't the same actual variable which would be weird :) Danny Kodicek wrote: Not an AS3 expert by any means, but my first thought is that the error is here: public class DateMarker extends AbstractMarker { public function DateMarker () { super(); labelClass = date } } I'm not sure, but the super() function looks out of place here. You're already invoking the AbstractMarker constructor by creating a subclass, so it should work by itself. I suspect that calling super() there has messed with your scope somehow. Feel free to shoot me down. Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: SPAM-LOW: RE: [Flashcoders] AS3 properties woes
If that's the case, that's a really stupid bit of functionality because you can't completely override a constructor. I was not aware that AS did it that way. Derek Vadneau wrote: It happens because the compiler realizes you haven't called super() in your constructor and does it for you. Derek Vadneau - Original Message - From: Petro Bochan [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Wednesday, January 24, 2007 9:20 AM Subject: SPAM-LOW: RE: [Flashcoders] AS3 properties woes Brandon Barkley Also not an AS3 expert, but I think Danny is wrong. The super function is necessary to call the parent constructor. Hi Brandon, I'm afraid u r wrong. Just try it out, the constructor IS being called once u extend the class. Cheers, Petro ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Combobox embed fonts PC/Mac problem
You might try: myComboBox.embedFonts = true; Chip Moeser wrote: We are having an cross platform issue when trying to embed fonts using the combobox and set style. When we publish on a mac with: myCombobox.setStyle(embedFonts, true); the fonts show up embedded on a mac but not a pc. When we publish with (minus quotes around true): myCombobox.setStyle(embedFonts, true); The fonts show up embedded on the pc but not the mac. Have also tried using both lines, the later always cancels out the previous. Has anyone run into this issue before? Thanks! -Chip ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Rotating a comboBox
Whenever I rotate a v2 component comboBox on and click the arrow, the dropdown still appears as though the comboBox was not rotated. Is there any easy way to have this appear rotated as well? Brandon ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] IE6 CTRL key problem.
Hey everyone, I am having some problem with the following code in Internet Explorer 6.0 on Windows 2000 with Flash Player 9. I am trying to write code for a hotkey to recognize when both the CTRL key and either X,C, or V is pressed in order to do copying and pasting. I will attach a sample of the code below. This code works in Firefox with Flash Player 9 just fine and I have been told it works in Internet Explorer 7.0 I have a keyListener object set up which contains the following code. var temp = this; this.keyListener = new Object(); this.keyListener.onKeyDown = function() { temp.checkHotKeys() } Key.addListener(this.keyListener); In the temp object, I have the function checkHotKeys which is as follows: function checkHotKeys() { //Ctrl-X if(Key.isDown(Key.CONTROL) Key.isDown(88)) this.editCut(); //Ctrl-C if(Key.isDown(Key.CONTROL) Key.isDown(67)) this.editCopy(); //Ctrl-V if(Key.isDown(Key.CONTROL) Key.isDown(86)) this.editPaste(); //Delete if(Key.isDown(Key.DELETEKEY)) this.editDelete(); } I added some traces for Key.getCode() in the above function and found that when I was holding down the CTRL key and then pressed another key, Key.getCode() would still return 17, effectively not recognizning that the second key was pressed. Alternatively, if I held down X/C/V first and then pressed the CTRL key, it would update correctly. Also, I replaced all instances of Key.CONTROL with Key.SPACE and it worked correctly with space bar. Does anyone have any idea why this would not work in IE6 and if there are any workarounds? Has anyone even seen this error before? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com