-
Senior Member
Can flash transform a square into a trapezoid? (for forced perspective)
I know flash can do skewing, but that preserves the parallels, as does every matrix transformation.
I am looking to do basically a tabletop with some forced perspective so the back side (top) is narrower than the front side (bottom), but I would like the originating movieclip be square since I have a series of square tiles on it.
Not the end of the world if it isn't there, but it would be nice.
-
why couldn't you simply draw it?
gparis
-
14yr old Member
yea i agree with gparis but if you dont want to do that draw it dynamicly
createEmptyMovieClip("line",1)
line.lineStyle(3,0x000000, 100)
line.moveTo(100,100)
line.lineTo(200,100)
if you dont know what i just did ask me
-
http://pat.theorigin.net
you can check out sandy and papervision, they are 3d apis that will do this.
http://www.flashsandy.org/
http://blog.papervision3d.org/
-
14yr old Member
isn't papervision a store in santa cruz?
-
http://pat.theorigin.net
could be... but this isn't that.
-
14yr old Member
lol
-
Senior Member
Originally Posted by gparis
why couldn't you simply draw it?
gparis
The objective is not to make a trapezoid, but to take a square movieclip with thousands of movieclips in it (most _visible=false) and deform that parent movieclip into a trapezoid dynamically not because we want the parentclip deformed, but because we want the children to properly deform relative to each other without way too much math.
The concept works GREAT for scaling, transposing, and skewing, but what forced perspective needs is deformation (the vertical parallels all need to meet at a distant point. Can actionscript do that?
-
14yr old Member
what? thousands of movie clips will extremely slow down your computor i dont quite understand what you are trying to do
-
Senior Member
It is a tile engine, for a game, and it handles 100x100 (10,000 movieclips) quite fine actually. You just don't render (set _visible=false to all offscreen tiles) anymore than what is visible at any given time and control how far you can zoom out. Once you cap your zoom out, the only bottleneck to number of invisible movieclips is the ram, and that isn't really an issue at all.
I'll ask in the game section I guess. Figured shape deformation would have fit better in the general actionscript forum. Guess not.
-
14yr old Member
yea you would probably get more answers there
-
Rather than try to deform a 'square' think of manipulating 2 triangles to form your trapezoid. Can't help you on the maths.. hurts my head.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|