A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: If flash was as low level as hardware language

  1. #1
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,218

    If flash was as low level as hardware language

    If flash was as low level as a hardware language its max shapes it could handle moving around would be 2 squares @ 20fps XD, this is basically what a graphics library that manages your pixels would look like:
    oh and create a linkage image the size of a pixel and name it pix_img



    PHP Code:
    var tv_headers={pixel_row_count:100,pixel_column_count:100,x_pos:0,y_pos:0};
    var 
    square_object={pixel_array:[]};
    for(var 
    i=1;i<tv_headers.pixel_row_count*tv_headers.pixel_column_count;i++){
    var 
    pix:pix_img=new pix_img();
    addChild(pix);
    pix.name="p"+i
    tv_headers
    .x_pos++
    pix.x=tv_headers.x_pos;
    pix.y=tv_headers.y_pos;
    if(
    i%100==0){
    tv_headers.y_pos++;
    tv_headers.x_pos=0;
    }
    pix.xpos=pix.x;
    pix.ypos=pix.y;
    square_object.pixel_array.push(pix);
    }

    addEventListener(Event.ENTER_FRAME,recurse);
    function 
    recurse(e:Event){
    for(var 
    i=0;i<square_object.pixel_array.length;i++){
    square_object.pixel_array[i].xpos++
    square_object.pixel_array[i].x=square_object.pixel_array[i].xpos;
    }

    ab duc tion

  2. #2
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,218
    Actually reverting the setpixel commands back to the original color was a better idea as opposed to using movieclips as pixels.
    Last edited by AS3.0; 09-11-2021 at 10:14 PM.
    ab duc tion

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