
Welcome Guest
|
#1
|
||||
|
||||
|
i'M redoing the fractalstuff for F5 and well i want to make it really good.
flash 4 was too slow and i used for generationg the fractal lots of duplicate movieclips every copy was 2X2 dots wide so i filled the whole movie with copies of one dot giving every single color and alpha values all together now then look like one fractal. i want to redo it much nicer now so every dot is just one pixel in square i thought of 600X600 dots for a nice fractal. but some problems need to b solved first. 1. arrays r slowing the machine down enourmously first i tried to store all the values in a huge array like values[x][y] = ... ok after 5 lines (of 600 horizontal) the filling of the array slowed down too much so i thought of another possibility. storing the value of the equations in the copied movieclip instance. so i made a "mama"-movieclip and prepared it for containing data adding theses lines set("value",0); stop(); this is the object later to be copied thousands of times (360000) it only has one frame so after initializing and stoping i should have access to the value in the variable value or? ok part of the maintimeline looks like this. locator++; duplicateMovieClip ("/mama", "dot"+locator, locator); setProperty ("dot"+locator, _x, x); setProperty ("dot"+locator, _y, y); eval("dot"+locator).value = sum; ok the instance on the stage was named mama and the duplicating process can be followed on the screen... (flash is drawing lines which become to an area) but obviously the value of the variable sum which i calculated according the algorythms for fractal calculations doesn'T seem to reach it's destination . everytime i trace using set("wert", 0); wert = eval("dot"+60).value; trace(wert); flash replies the value i put in for initializing the "value"variable. (u remember set("value", 159); stop(); eval("dot"+anyofthecopiedinstances).value replies 159 ) so the question is. when duplicating a movieclipinstance that is able to store values how to push them in there from the maintime line? perhaps i'm too tired already to c my own mistake... but i don't wanna do it the old way again coz i want the new one look nicer. and after intializing all the values. i want to offer the user to color it on his own. so i just store the values and later the user decides which range of values gets which color... 2. there i think is going to b another problem we gonna have 360000 values to store every float variable normally (that r ****ing undocumented parts of Flash action script but normally (i mean in other coding languages)) needs 4 or 8 bytes to store the value let'S calculate with 8 so 8*360000 r 2880000 bytes = 2812.5 kb or 2.7... MB ok this was just the value. but what about all the graphical data flash needs to display the duplicated movieclips? a square r 2 vectors every of them descirbed with two floats... and then we still need some data for adressing and color values. then, even if flash would do some code improvement, like not using the names we give it, and compyling all the stuff we do, u also got to notice that we might run out of memory soon (except someone owns more than 128 MB of RAM). so anyone out there having an idea how to get out of the trouble? ------------------ <Embed Src="http://flashmove.com/board/sig/Gargoyle.swf" type="application/x-shockwave-flash" width="243" height="59"></Embed> |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|






