I have a problem concerning Math. My app need to draw points
using movieclip from library. the data comes from the xml file. there are
nearly 7000 nodes in the xml describing each points, esp it's X and Y
coordinate.
Using a single for loop (counting 1, 2, 3, ...and so forth) doesn't let me
give a visual cue that application is still drawing. So I switch to setInterval
method to attach the same points and let some animation play while drawing the
nodes, BUT this STILL requires some time to render.
my current thought was to use the same event but with more variables who act
as counter. for example to be able to enumerate all 7000 nodes i just assign
variables namely a, b, c,d, e, f, g that counts the number with different
starting number. "a" starts counting from 1 and add 7 to each counts. "b"
starts from 2 and add 7 to each counts, "c" starts from 3 and add 7 to each
counts, and the same also goes to rest.
Using onEnterFrame, the code look like this (on frame 1) :
//run 7 times faster for attaching symbol in the library
//(depends on how many people count)
var a = 1;
var b = 2;
var c = 3;
var d = 4;
var e = 5;
var f = 6;
var g = 7;
trace("first Number = " + a + " - " + b + " - " + c + " - " + d + " - " + e + "
- " + f + " - " + g);
trace("Next Number =" + newline);
_root.onEnterFrame = function(){
a +=7;
b +=7;
c +=7;
d +=7;
e +=7;
f +=7;
g +=7;
trace(a + " - " + b + " - " + c + " - " + d + " - " + e + " - " + f + " - " +
g);
if (g == 70){
delete _root.onEnterFrame ;
}
}
Does anyone has a simpler function to achieve this pattern?
also assuring that all nodes are read?
thanks in advanced
erich erlangga
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com