A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Line drawing optimization???

  1. #1
    aidanmack.co.uk
    Join Date
    Dec 2001
    Location
    York, UK
    Posts
    400

    Line drawing optimization???

    Hi,
    I have this little application made where by...

    A user draws something on screen. (I use lineTo class for this)

    As a user draws the x,y,linesize,colour ect is written to a new object then pushed to an array.


    When the user presses a button called "fly" the above array is then push to another array.

    I then go to a empty frame,
    I then have some code that runs through the array with all the lineTo details init and flash is able to redraw on screen what the user had previously drawn.


    I then give this new MC random xy coridonates to move around on the screen to using an EnterFrame.

    The user can then go back if they so wish and draw somthing else. when they hit "fly" it redraws the first thing they drew and then the new one.

    This all works find and dandy.

    However,

    The more complex a drawing is (more x/y's (lineTo's)) the more it cane's the processor. And obviously the more of these complex drawings there on screen that need to moved around the harder it gets for the processor.

    === MY MAIN QUESTION===
    So what this boils down to is, can anyone suggest away i can optimize this or the way in which a user draws on screen, so that one it comes to move the object round on screen its not so processor hungry. Ive looked at bitmap data?? dont think I could use that??

    Any help would be great

    Thanks
    Aidan

  2. #2
    :
    Join Date
    Dec 2002
    Posts
    3,518
    What version of Flash and AS are you using?

  3. #3
    aidanmack.co.uk
    Join Date
    Dec 2001
    Location
    York, UK
    Posts
    400
    Flash cs4 pro.
    AS2 (unfortunately)
    Publishing to flashlite 3.1

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