A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Can flash transform a square into a trapezoid? (for forced perspective)

  1. #1
    Senior Member Alluvian's Avatar
    Join Date
    Jun 2006
    Posts
    967

    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.

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    why couldn't you simply draw it?

    gparis

  3. #3
    14yr old Member shavingcream's Avatar
    Join Date
    Jun 2007
    Location
    Santa Cruz CA
    Posts
    272
    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
    Signature Goes Here

  4. #4

  5. #5
    14yr old Member shavingcream's Avatar
    Join Date
    Jun 2007
    Location
    Santa Cruz CA
    Posts
    272
    isn't papervision a store in santa cruz?
    Signature Goes Here

  6. #6

  7. #7
    14yr old Member shavingcream's Avatar
    Join Date
    Jun 2007
    Location
    Santa Cruz CA
    Posts
    272
    lol
    Signature Goes Here

  8. #8
    Senior Member Alluvian's Avatar
    Join Date
    Jun 2006
    Posts
    967
    Quote 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?

  9. #9
    14yr old Member shavingcream's Avatar
    Join Date
    Jun 2007
    Location
    Santa Cruz CA
    Posts
    272
    what? thousands of movie clips will extremely slow down your computor i dont quite understand what you are trying to do
    Signature Goes Here

  10. #10
    Senior Member Alluvian's Avatar
    Join Date
    Jun 2006
    Posts
    967
    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.

  11. #11
    14yr old Member shavingcream's Avatar
    Join Date
    Jun 2007
    Location
    Santa Cruz CA
    Posts
    272
    yea you would probably get more answers there
    Signature Goes Here

  12. #12
    Member
    Join Date
    Jul 2007
    Posts
    77
    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.
    www.ugonna-nwosu.com
    If at first you don't succeed... Try not to look suprised.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center