views:

366

answers:

3

Using Flash 8, and ActionScript 2, what is the max value that an _x property on a MovieClip can be? For instance, is it okay to position a movieclip at _x = 60000?

A: 

I think limitations will come from the dimensions of your clip, not as much from the position. The limit is 2880x2880 size wise, and I there might not be one for positioning, but even if, 60000 px should work. I tried creating and empty clip, positioning it and tracing it. Something as simple as that works.

What exactly are trying to test/achieve ? This sounds a bit like a workaround, maybe it can be avoided.

George Profenza
Document size Limitations only apply when working in the IDE, so yes, from actionscript, I also think it's safe to possition anywhere.
Virusescu
We ran into an issue when we were positioning instances of a 600px wide movie clip, one after another along the x-axis, all inside one parent movie clip. When we reached around 100 instance we started seeing some strange behavior. It appeared as if some of the instances were "wrapping around" back to zero, like the x-axis was a 60000 px loop that came back to 0. Reducing the number of movie clip instances to around 87 fixed the problem. So we can't quite explain it, but to fix it we're taking a different design approach, one where we aren't positioning the movie clips along an axis.
Rafe
If you have clips that are 600px wide, that means the 3rd clip would never be seen anyway, if kept at 100%, right ? Can you not set the _x property of all the clips that have index > currentIndex+1 to be on Stage.width + some padding ? and when you go to the previous/next item, you tween from that position ? You would be moving 3 clips all the time, instead of all of them. The user wouldn't notice anyway.
George Profenza
A: 

To answer your question, as far as i know, you can set the ._x property of a movieclip to any value you want as long as it is within the boundaries for of a (32 bit) Integer.

Setting the property to extreme high values will effectively hide the movieclip as it will sit far outside the boundaries of the stage.

Of course setting ._visible to false is a much cleaner way to achieve the same thing.

Hendrik
A: 

On my system here (Intel 6300), a quick code test produced a +/- limit of 107374182 on the _x and _y properties.

I assume this may change depending on the hardware running the player.

Mike Stead