actionscript 3 - Using a mask in a data driven display -


my application displays data on graph. graph extracts data database , displays series of points appear horizontally on graph. each point joined line viewer view data points. has worked until when started notice line failing appear. interestingly, line disappears when there 96 or more data points in database. i've checked data , not problem database. have spent 2 days attempting track down bug , found if stop joining line being mask, bug disappears, lose important visual effect. suspect problem might connected use of mask, cannot find similar bug reports online. has seen similar problem or can recommend approach might take fix error? i'll happy add more code post below, have not done code quite complex.

            //draw backgrond gradient masking         var gradientboxmatrix:matrix = new matrix();         gradientboxmatrix.creategradientbox(gradientboxwidth, 400, math.pi/2, 0, 0);         backgroundgradient.graphics.begingradientfill(gradienttype.linear, [0xff0000, 0xffff00,0x00ff00, 0x00ffff, 0x0000ff], [1, 1, 1, 1, 1],              [0, 64, 128, 192, 255], gradientboxmatrix);         backgroundgradient.graphics.drawrect(0, 0, gradientboxwidth, 400);         backgroundgradient.graphics.endfill();         backgroundgradient.cacheasbitmap = true;         linechartcontainer.addchild(backgroundgradient) ;          backgroundgradient.mask = myline;         myline = new datapoint_line;          //set line masking , drawing         myline.cacheasbitmap=true;         linechartcontainer.addchild(myline); 

there's max size graphical object once becomes bitmap (cacheasbitmap = true). remove , you'll have slower render visible graph :)

break graph many images , "glue" them when need scroll or @ least re-render whole graphics object each time scroll.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -