Re: [Flashcoders] referencing sprites within a sprite (AS3 newbie question)

2008-12-17 Thread Ian Thomas
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

Re: [Flashcoders] Pixel precise

2008-12-17 Thread laurent
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:

Re: [Flashcoders] Pixel precise

2008-12-17 Thread jonathan howe
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

RE: [Flashcoders] Pixel precise

2008-12-17 Thread Cor
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

[Flashcoders] How to show first item of a TileList in a UILoader

2008-12-17 Thread Cor
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

Re: [Flashcoders] Pixel precise

2008-12-17 Thread Ian Thomas
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,

Re: [Flashcoders] referencing sprites within a sprite (AS3 newbie question)

2008-12-17 Thread Matt S.
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

RE: [Flashcoders] referencing sprites within a sprite (AS3 newbiequestion)

2008-12-17 Thread Mendelsohn, Michael
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] Pixel precise

2008-12-17 Thread laurent
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

[Flashcoders] Problem with Windows Projector, Fullscreen and Video

2008-12-17 Thread Daniel Soares
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

RE: [Flashcoders] Problem with Windows Projector, Fullscreen and Video

2008-12-17 Thread Cor
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:

Re: [Flashcoders] Pixel precise

2008-12-17 Thread Jiri Heitlager
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

RE: [Flashcoders] Pixel precise

2008-12-17 Thread Cor
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

Re: [Flashcoders] Problem with Windows Projector, Fullscreen and Video

2008-12-17 Thread Fabio Pinatti
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.

Re: [Flashcoders] Pixel precise

2008-12-17 Thread -whispers-
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

Re: [Flashcoders] Pixel precise

2008-12-17 Thread jonathan howe
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

Re: [Flashcoders] Re: A funny little hover problem with CSS

2008-12-17 Thread Jon Bradley
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

Re: [Flashcoders] Pixel precise

2008-12-17 Thread Matt S.
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

Re: [Flashcoders] Pixel precise

2008-12-17 Thread Jiri Heitlager
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.

Re: [Flashcoders] Pixel precise

2008-12-17 Thread Matt S.
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

Re: [Flashcoders] referencing sprites within a sprite (AS3newbiequestion)

2008-12-17 Thread Muzak
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,

Re: [Flashcoders] Re: A funny little hover problem with CSS

2008-12-17 Thread Ashim D'Silva
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.

Re: [Flashcoders] Re: A funny little hover problem with CSS

2008-12-17 Thread Jon Bradley
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

Re: [Flashcoders] splitting classes into subdirectories?

2008-12-17 Thread Taka Kojima
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

[Flashcoders] conversion avi to flv

2008-12-17 Thread 2lakes
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

Re: [Flashcoders] conversion avi to flv

2008-12-17 Thread Taka Kojima
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