Re: [Flashcoders] referencing sprites within a sprite (AS3 newbie question)
To expand on this (since I'm now awake!) what method I use depends on how I want to access the child objects. If I just want a list to iterate over/trawl through, I use an Array. If I want to access by name, I use an Object. The reasons I don't normally directly rely on the the childlist of the container object include: - I can remove/add a child but still have a reference in the Array - I can do a bunch of stuff to those clips without affecting any other children of the container, like: iterate through the array, reorder/reindex just those children, delete just those children, _count_ just those children. - I don't have to worry about checking the return types of the objects in the array, because I know what's stored in there. Whereas using getChildByName(), I know I'm getting a DisplayObject back, but don't know exactly what type - I have to check. Those last few might seem a bit peculiar - why shouldn't I know exactly what the child objects are? This comes from two places: - I may mix arrays of different children into the same container (e.g. a bunch of target clips, a bunch of draggable clips - or, for a game, the player Sprite and the enemy Sprites). Having two arrays is much better than relying on the childList in this case. - I am not the only person working on this code, and can't rely on another coder not adding in a decorative background or border to my container, or an extra graphics, or... I hope that makes sense. And is a better answer than my earlier one. :-D (mmm... sweet caffeine...) Ian On Wed, Dec 17, 2008 at 2:28 AM, Matt S. mattsp...@gmail.com wrote: I wasnt actually the original question-asker, but thanks :) I was just curious about the actual performance hit from getChild. .m On Tue, Dec 16, 2008 at 5:57 PM, Taka Kojima t...@gigafied.com wrote: I use the method I gave you earlier, adding elements to an array and accessing them that way. Also, you can use getChildAt() if you know the index of the children, which it sounds like you do if you have them named as you do... i.e. column1, column2, column3 On Tue, Dec 16, 2008 at 2:17 PM, Matt S. mattsp...@gmail.com wrote: So as a general question, what is the preferred method if you're trying to get, say, dynamically generated children, eg image1image20 etc, from a container? .m On Tue, Dec 16, 2008 at 4:51 PM, Ian Thomas i...@eirias.net wrote: Yes. On Tue, Dec 16, 2008 at 9:08 PM, Anthony Pace anthony.p...@utoronto.ca wrote: isn't getting a child by name very slow? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Pixel precise
int( ) is casting the content to integer, it has the effect to drop off the decimal part. Same as Math.floor but lots faster L Cor a écrit : If the sprite.x is not an exact round number (so not an correct integer) wouldn't that throw an error??? -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jiri Heitlager Sent: woensdag 17 december 2008 15:11 To: Flash Coders List Subject: Re: [Flashcoders] Pixel precise Casting to int is faster. var tX:int = int(sprite.x) Jiri jonathan howe wrote: Hi, Laurent, You could use localToGlobal(), apply Math.round() to this global point, compare the original global point with the rounded version, and then offset the child's coordineates by the differences. Caveats are: - if you do this multiple places in a display hierarchy, you'd need to work from the bottom upwards. - during animation you're bound to introduce a certain amount of jumpiness. On Wed, Dec 17, 2008 at 8:39 AM, laurent laur...@logiquefloue.org wrote: Hi, Is there a way to be sure elements are positionned précisely on a Pixel ? I have a sprite containing sprites that are positionned on integer coordinates so they are pixel positionned. And this sprite is re-positionned when the window resize, so I used int() to be sure I got x and y as integers but still the content get blury sometimes. Is there something to do that flash always position element on a pixel not a pixel and half...? thx L ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.9.19/1853 - Release Date: 17-12-2008 8:31 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Pixel precise
Depends on the application whether you can afford this... I would think that in some cases you would want to use rounding so that there is more accurate rendering... you want your object to snap to the nearest pixel, and nearest may be up instead of floored. I do want to emphasize that it is not simply enough to set the DisplayObject's own coordinates to an integer; if the DO in question is inside a parent DO with non-integer coordinates, it won't be correct. That's why I was recommending the localToGlobal technique. -jonathan On Wed, Dec 17, 2008 at 11:55 AM, Jiri Heitlager jiriheitla...@googlemail.com wrote: Math should be avoided when possible, I believe it is quit slow. Maybe Number 0 is even faster for rounding of ;) Jiri laurent wrote: int( ) is casting the content to integer, it has the effect to drop off the decimal part. Same as Math.floor but lots faster L Cor a écrit : If the sprite.x is not an exact round number (so not an correct integer) wouldn't that throw an error??? -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jiri Heitlager Sent: woensdag 17 december 2008 15:11 To: Flash Coders List Subject: Re: [Flashcoders] Pixel precise Casting to int is faster. var tX:int = int(sprite.x) Jiri jonathan howe wrote: Hi, Laurent, You could use localToGlobal(), apply Math.round() to this global point, compare the original global point with the rounded version, and then offset the child's coordineates by the differences. Caveats are: - if you do this multiple places in a display hierarchy, you'd need to work from the bottom upwards. - during animation you're bound to introduce a certain amount of jumpiness. On Wed, Dec 17, 2008 at 8:39 AM, laurent laur...@logiquefloue.org wrote: Hi, Is there a way to be sure elements are positionned précisely on a Pixel ? I have a sprite containing sprites that are positionned on integer coordinates so they are pixel positionned. And this sprite is re-positionned when the window resize, so I used int() to be sure I got x and y as integers but still the content get blury sometimes. Is there something to do that flash always position element on a pixel not a pixel and half...? thx L ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.9.19/1853 - Release Date: 17-12-2008 8:31 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Pixel precise
OK, thanks! -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of laurent Sent: woensdag 17 december 2008 17:24 To: Flash Coders List Subject: Re: [Flashcoders] Pixel precise int( ) is casting the content to integer, it has the effect to drop off the decimal part. Same as Math.floor but lots faster L Cor a écrit : If the sprite.x is not an exact round number (so not an correct integer) wouldn't that throw an error??? -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jiri Heitlager Sent: woensdag 17 december 2008 15:11 To: Flash Coders List Subject: Re: [Flashcoders] Pixel precise Casting to int is faster. var tX:int = int(sprite.x) Jiri jonathan howe wrote: Hi, Laurent, You could use localToGlobal(), apply Math.round() to this global point, compare the original global point with the rounded version, and then offset the child's coordineates by the differences. Caveats are: - if you do this multiple places in a display hierarchy, you'd need to work from the bottom upwards. - during animation you're bound to introduce a certain amount of jumpiness. On Wed, Dec 17, 2008 at 8:39 AM, laurent laur...@logiquefloue.org wrote: Hi, Is there a way to be sure elements are positionned précisely on a Pixel ? I have a sprite containing sprites that are positionned on integer coordinates so they are pixel positionned. And this sprite is re-positionned when the window resize, so I used int() to be sure I got x and y as integers but still the content get blury sometimes. Is there something to do that flash always position element on a pixel not a pixel and half...? thx L ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.9.19/1853 - Release Date: 17-12-2008 8:31 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.9.19/1853 - Release Date: 17-12-2008 8:31 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] How to show first item of a TileList in a UILoader
Hi List, I have a TileList wich is loaded with thumbs. Clicking on a thumb in the TileList loads the big picture in the UILoader. Everything works fine. But I want to load the first item of the TileList default in the UILoader without first having to click on a TileList item. Kind regards Cor ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Pixel precise
Also, if you're using Bitmap objects, you can set the .pixelSnapping property to PixelSnapping.ALWAYS. That will ensure that the bitmap is always drawn at the nearest pixel rather than part pixel. No need for Math.round() or anything like that. Obviously, only works with Bitmaps... Ian On Wed, Dec 17, 2008 at 6:02 PM, Cor c...@chello.nl wrote: OK, thanks! -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of laurent Sent: woensdag 17 december 2008 17:24 To: Flash Coders List Subject: Re: [Flashcoders] Pixel precise int( ) is casting the content to integer, it has the effect to drop off the decimal part. Same as Math.floor but lots faster L Cor a écrit : If the sprite.x is not an exact round number (so not an correct integer) wouldn't that throw an error??? -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jiri Heitlager Sent: woensdag 17 december 2008 15:11 To: Flash Coders List Subject: Re: [Flashcoders] Pixel precise Casting to int is faster. var tX:int = int(sprite.x) Jiri jonathan howe wrote: Hi, Laurent, You could use localToGlobal(), apply Math.round() to this global point, compare the original global point with the rounded version, and then offset the child's coordineates by the differences. Caveats are: - if you do this multiple places in a display hierarchy, you'd need to work from the bottom upwards. - during animation you're bound to introduce a certain amount of jumpiness. On Wed, Dec 17, 2008 at 8:39 AM, laurent laur...@logiquefloue.org wrote: Hi, Is there a way to be sure elements are positionned précisely on a Pixel ? I have a sprite containing sprites that are positionned on integer coordinates so they are pixel positionned. And this sprite is re-positionned when the window resize, so I used int() to be sure I got x and y as integers but still the content get blury sometimes. Is there something to do that flash always position element on a pixel not a pixel and half...? thx L ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.9.19/1853 - Release Date: 17-12-2008 8:31 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.9.19/1853 - Release Date: 17-12-2008 8:31 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] referencing sprites within a sprite (AS3 newbie question)
Thanks, but what I'm more interested in was the statement that getChildByName is very slow, which others seemed to agree with. I guess I understood that as meaning that using gCBN can actually cause a performance hit. Is that the case? .m On 12/17/08, Ian Thomas i...@eirias.net wrote: To expand on this (since I'm now awake!) what method I use depends on how I want to access the child objects. If I just want a list to iterate over/trawl through, I use an Array. If I want to access by name, I use an Object. The reasons I don't normally directly rely on the the childlist of the container object include: - I can remove/add a child but still have a reference in the Array - I can do a bunch of stuff to those clips without affecting any other children of the container, like: iterate through the array, reorder/reindex just those children, delete just those children, _count_ just those children. - I don't have to worry about checking the return types of the objects in the array, because I know what's stored in there. Whereas using getChildByName(), I know I'm getting a DisplayObject back, but don't know exactly what type - I have to check. Those last few might seem a bit peculiar - why shouldn't I know exactly what the child objects are? This comes from two places: - I may mix arrays of different children into the same container (e.g. a bunch of target clips, a bunch of draggable clips - or, for a game, the player Sprite and the enemy Sprites). Having two arrays is much better than relying on the childList in this case. - I am not the only person working on this code, and can't rely on another coder not adding in a decorative background or border to my container, or an extra graphics, or... I hope that makes sense. And is a better answer than my earlier one. :-D (mmm... sweet caffeine...) Ian On Wed, Dec 17, 2008 at 2:28 AM, Matt S. mattsp...@gmail.com wrote: I wasnt actually the original question-asker, but thanks :) I was just curious about the actual performance hit from getChild. .m On Tue, Dec 16, 2008 at 5:57 PM, Taka Kojima t...@gigafied.com wrote: I use the method I gave you earlier, adding elements to an array and accessing them that way. Also, you can use getChildAt() if you know the index of the children, which it sounds like you do if you have them named as you do... i.e. column1, column2, column3 On Tue, Dec 16, 2008 at 2:17 PM, Matt S. mattsp...@gmail.com wrote: So as a general question, what is the preferred method if you're trying to get, say, dynamically generated children, eg image1image20 etc, from a container? .m On Tue, Dec 16, 2008 at 4:51 PM, Ian Thomas i...@eirias.net wrote: Yes. On Tue, Dec 16, 2008 at 9:08 PM, Anthony Pace anthony.p...@utoronto.ca wrote: isn't getting a child by name very slow? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] referencing sprites within a sprite (AS3 newbiequestion)
Hi everyone... Building an array using the references was the right answer. I really appreciate all of your replies. Migrating from AS2 where I could easily reference via this.that.these.those to DisplayObject references will take a bit of getting used to I suppose. Big thanks! - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Pixel precise
Hi, Is there a way to be sure elements are positionned précisely on a Pixel ? I have a sprite containing sprites that are positionned on integer coordinates so they are pixel positionned. And this sprite is re-positionned when the window resize, so I used int() to be sure I got x and y as integers but still the content get blury sometimes. Is there something to do that flash always position element on a pixel not a pixel and half...? thx L ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Problem with Windows Projector, Fullscreen and Video
Hello, This is my first e-mail to the list and I have a problem: I have made a video player using FLVPlayback component and loading an external flv file (on2 VP6 codec). The file output is a Windows Project, with the full screen enabled. It's working very well, but in one of the PC's I have tested (in the others, it works fine) the video does not display. Everything works (sound, controls and close button) but the video. If I exit the full screen mode, the video displays. The player's version is 9, the Flash IDE version is CS3, the action script version is AS3 and I've already used the fullScreenTakeOver set as false. Thanks =) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Problem with Windows Projector, Fullscreen and Video
Just guessing: could it be a codec problem?? HTH Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Daniel Soares Sent: woensdag 17 december 2008 15:01 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Problem with Windows Projector, Fullscreen and Video Hello, This is my first e-mail to the list and I have a problem: I have made a video player using FLVPlayback component and loading an external flv file (on2 VP6 codec). The file output is a Windows Project, with the full screen enabled. It's working very well, but in one of the PC's I have tested (in the others, it works fine) the video does not display. Everything works (sound, controls and close button) but the video. If I exit the full screen mode, the video displays. The player's version is 9, the Flash IDE version is CS3, the action script version is AS3 and I've already used the fullScreenTakeOver set as false. Thanks =) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.9.19/1853 - Release Date: 17-12-2008 8:31 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Pixel precise
Math should be avoided when possible, I believe it is quit slow. Maybe Number 0 is even faster for rounding of ;) Jiri laurent wrote: int( ) is casting the content to integer, it has the effect to drop off the decimal part. Same as Math.floor but lots faster L Cor a écrit : If the sprite.x is not an exact round number (so not an correct integer) wouldn't that throw an error??? -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jiri Heitlager Sent: woensdag 17 december 2008 15:11 To: Flash Coders List Subject: Re: [Flashcoders] Pixel precise Casting to int is faster. var tX:int = int(sprite.x) Jiri jonathan howe wrote: Hi, Laurent, You could use localToGlobal(), apply Math.round() to this global point, compare the original global point with the rounded version, and then offset the child's coordineates by the differences. Caveats are: - if you do this multiple places in a display hierarchy, you'd need to work from the bottom upwards. - during animation you're bound to introduce a certain amount of jumpiness. On Wed, Dec 17, 2008 at 8:39 AM, laurent laur...@logiquefloue.org wrote: Hi, Is there a way to be sure elements are positionned précisely on a Pixel ? I have a sprite containing sprites that are positionned on integer coordinates so they are pixel positionned. And this sprite is re-positionned when the window resize, so I used int() to be sure I got x and y as integers but still the content get blury sometimes. Is there something to do that flash always position element on a pixel not a pixel and half...? thx L ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.9.19/1853 - Release Date: 17-12-2008 8:31 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Pixel precise
If the sprite.x is not an exact round number (so not an correct integer) wouldn't that throw an error??? -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jiri Heitlager Sent: woensdag 17 december 2008 15:11 To: Flash Coders List Subject: Re: [Flashcoders] Pixel precise Casting to int is faster. var tX:int = int(sprite.x) Jiri jonathan howe wrote: Hi, Laurent, You could use localToGlobal(), apply Math.round() to this global point, compare the original global point with the rounded version, and then offset the child's coordineates by the differences. Caveats are: - if you do this multiple places in a display hierarchy, you'd need to work from the bottom upwards. - during animation you're bound to introduce a certain amount of jumpiness. On Wed, Dec 17, 2008 at 8:39 AM, laurent laur...@logiquefloue.org wrote: Hi, Is there a way to be sure elements are positionned précisely on a Pixel ? I have a sprite containing sprites that are positionned on integer coordinates so they are pixel positionned. And this sprite is re-positionned when the window resize, so I used int() to be sure I got x and y as integers but still the content get blury sometimes. Is there something to do that flash always position element on a pixel not a pixel and half...? thx L ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.9.19/1853 - Release Date: 17-12-2008 8:31 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Problem with Windows Projector, Fullscreen and Video
I had the following problem recently: I was loading a flv for a website intro, and forcing a change of display state to fullscreen. The video wasn't loading and the website stops. Since it's a security restriction the force full screen in latest flash player, I guess that's why it was happening. What I did was a kind of splash screen with a button, and user is required to click to change display state, and all back work again. Regards, Pinatti On Wed, Dec 17, 2008 at 2:02 PM, Cor c...@chello.nl wrote: Just guessing: could it be a codec problem?? HTH Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Daniel Soares Sent: woensdag 17 december 2008 15:01 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Problem with Windows Projector, Fullscreen and Video Hello, This is my first e-mail to the list and I have a problem: I have made a video player using FLVPlayback component and loading an external flv file (on2 VP6 codec). The file output is a Windows Project, with the full screen enabled. It's working very well, but in one of the PC's I have tested (in the others, it works fine) the video does not display. Everything works (sound, controls and close button) but the video. If I exit the full screen mode, the video displays. The player's version is 9, the Flash IDE version is CS3, the action script version is AS3 and I've already used the fullScreenTakeOver set as false. Thanks =) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.9.19/1853 - Release Date: 17-12-2008 8:31 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Fábio Pinatti :: web.developer www.pinatti.com.br :: 19. 9184.3745 / 3342.1130 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Pixel precise
try using Math.round() on your position values... - Original Message - From: laurent To: Flash Coders List Sent: Wednesday, December 17, 2008 7:39 AM Subject: [Flashcoders] Pixel precise Hi, Is there a way to be sure elements are positionned précisely on a Pixel ? I have a sprite containing sprites that are positionned on integer coordinates so they are pixel positionned. And this sprite is re-positionned when the window resize, so I used int() to be sure I got x and y as integers but still the content get blury sometimes. Is there something to do that flash always position element on a pixel not a pixel and half...? thx L ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Pixel precise
Hi, Laurent, You could use localToGlobal(), apply Math.round() to this global point, compare the original global point with the rounded version, and then offset the child's coordineates by the differences. Caveats are: - if you do this multiple places in a display hierarchy, you'd need to work from the bottom upwards. - during animation you're bound to introduce a certain amount of jumpiness. On Wed, Dec 17, 2008 at 8:39 AM, laurent laur...@logiquefloue.org wrote: Hi, Is there a way to be sure elements are positionned précisely on a Pixel ? I have a sprite containing sprites that are positionned on integer coordinates so they are pixel positionned. And this sprite is re-positionned when the window resize, so I used int() to be sure I got x and y as integers but still the content get blury sometimes. Is there something to do that flash always position element on a pixel not a pixel and half...? thx L ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: A funny little hover problem with CSS
On Dec 16, 2008, at 10:49 PM, Ashim D'Silva wrote: I always round everything I place. That was one of the first things I checked. Rotated bitmaps and text often have this problem, which is fair enough because half pixels don't exist. Actually, they do. The native coordinate space for Flash is a twip, which is 1/20th of a pixel. The rasterizer in Flash has to do some funky stuff anyway with rotated content. There are some really annoying display bugs in Flash for this - consider a nice vector shape that's rotated through AS very, very slowly. You'll actually see it jump around when zoomed up. I discovered this one when rendering content for a 1080p animation project ... so annoying. One of the most interesting tests is to create a rounded rectangle and add a 1 pixel border line around it. Notice it looks funky and isn't smooth. Position the rounded rectangle on a half pixel (+0.5 on x and y). It's all nice and smooth again. cheers, jon ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Pixel precise
Make sure to always do Math.round to your x's and y's, so: mc.x = Math.round(xPos); mc.y = Math.round(yPos); And make sure to do the same to all mc's contained within it. .m On Wed, Dec 17, 2008 at 8:39 AM, laurent laur...@logiquefloue.org wrote: Hi, Is there a way to be sure elements are positionned précisely on a Pixel ? I have a sprite containing sprites that are positionned on integer coordinates so they are pixel positionned. And this sprite is re-positionned when the window resize, so I used int() to be sure I got x and y as integers but still the content get blury sometimes. Is there something to do that flash always position element on a pixel not a pixel and half...? thx L ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Pixel precise
Casting to int is faster. var tX:int = int(sprite.x) Jiri jonathan howe wrote: Hi, Laurent, You could use localToGlobal(), apply Math.round() to this global point, compare the original global point with the rounded version, and then offset the child's coordineates by the differences. Caveats are: - if you do this multiple places in a display hierarchy, you'd need to work from the bottom upwards. - during animation you're bound to introduce a certain amount of jumpiness. On Wed, Dec 17, 2008 at 8:39 AM, laurent laur...@logiquefloue.org wrote: Hi, Is there a way to be sure elements are positionned précisely on a Pixel ? I have a sprite containing sprites that are positionned on integer coordinates so they are pixel positionned. And this sprite is re-positionned when the window resize, so I used int() to be sure I got x and y as integers but still the content get blury sometimes. Is there something to do that flash always position element on a pixel not a pixel and half...? thx L ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Pixel precise
On 12/17/08, jonathan howe jonathangh...@gmail.com wrote: - during animation you're bound to introduce a certain amount of jumpiness. For animation, if you're using something like Tweener that wont matter, since only the final position will be Math.round'ed. If you're rolling your own animation, just make sure only the final positions are rounded and allow all inbe'tween positions to non-rounded. .m ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] referencing sprites within a sprite (AS3newbiequestion)
I think your *bigger* problem is the fact that you're actually doing something like; this.that.these.those You should never have to do that, not even in AS2. that' should expose properties and methods to get things done. regards, Muzak - Original Message - From: Mendelsohn, Michael michael.mendels...@fmglobal.com To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Wednesday, December 17, 2008 2:51 PM Subject: RE: [Flashcoders] referencing sprites within a sprite (AS3newbiequestion) Hi everyone... Building an array using the references was the right answer. I really appreciate all of your replies. Migrating from AS2 where I could easily reference via this.that.these.those to DisplayObject references will take a bit of getting used to I suppose. Big thanks! - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: A funny little hover problem with CSS
Now that is odd. Is 0.5 the general rule to follow or is it simply different for every object you put down? 2008/12/18 Jon Bradley jbrad...@postcentral.com On Dec 16, 2008, at 10:49 PM, Ashim D'Silva wrote: I always round everything I place. That was one of the first things I checked. Rotated bitmaps and text often have this problem, which is fair enough because half pixels don't exist. Actually, they do. The native coordinate space for Flash is a twip, which is 1/20th of a pixel. The rasterizer in Flash has to do some funky stuff anyway with rotated content. There are some really annoying display bugs in Flash for this - consider a nice vector shape that's rotated through AS very, very slowly. You'll actually see it jump around when zoomed up. I discovered this one when rendering content for a 1080p animation project ... so annoying. One of the most interesting tests is to create a rounded rectangle and add a 1 pixel border line around it. Notice it looks funky and isn't smooth. Position the rounded rectangle on a half pixel (+0.5 on x and y). It's all nice and smooth again. cheers, jon ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- The Random Lines My online portfolio www.therandomlines.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Re: A funny little hover problem with CSS
Mostly on rounded rectangles and things with arcs. Kinda limited but the rounded rectangle is a unique case because 1-pixel rounded rects have always been a problem. Course, with the 0.5 rule, not so much (unless you're tweening). best, jon On Dec 17, 2008, at 4:41 PM, Ashim D'Silva wrote: Now that is odd. Is 0.5 the general rule to follow or is it simply different for every object you put down? 2008/12/18 Jon Bradley jbrad...@postcentral.com One of the most interesting tests is to create a rounded rectangle and add a 1 pixel border line around it. Notice it looks funky and isn't smooth. Position the rounded rectangle on a half pixel (+0.5 on x and y). It's all nice and smooth again. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] splitting classes into subdirectories?
Hey Geoff, Try this for your import instead... import cal.bentonconsulting.ca.model.mainModel; should work like charm. - Taka On Wed, Dec 17, 2008 at 4:48 PM, Benton Consulting ge...@bentonconsulting.ca wrote: Hi I'm moving from AS2 to AS3, very late to make the switch because I've been working on a large AS2 commercial framework incase you're wondering. in AS2 I could do this: - have a class called Main.as - import model.MainModel but in AS3 I can't, it won't find the file. For example Main.as package ca.bentonconsulting.ca{ import model.mainModel; // compiler error class Main{ } } MainModel.as package ca.bentonconsulting.ca.model{ class MainModel{ } } So far the only way I can work around this problem is to put the model class right beside the Main.as class then say: private var __model:MainModel; // works fine but doesn't allow to split classes into subdirectories What am I doing wrong? Geoff Freedman Flash Developer bentonconsulting.ca 1.403.680.3135 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] conversion avi to flv
Hi, Any quick tips on a Windows .avi to .flv converter app? Also if any server based app would be appreciated. Cheers Ian Ian Hobbs Media ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] conversion avi to flv
Sorenson Squeeze. For servers, FFMPEG On Wed, Dec 17, 2008 at 7:37 PM, 2lakes 2la...@ianhobbs.net wrote: Hi, Any quick tips on a Windows .avi to .flv converter app? Also if any server based app would be appreciated. Cheers Ian Ian Hobbs Media ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders