09 novembre 2006

Comparing Lingo and ActionScript

"... Loops

Director uses script-like syntax for loops. The key word is repeat. A typical loop will look like this:

repeat with i = 1 to 10
  -- do something
end repeat

In Flash, you use the more common for keyword, along with syntax like you would use in C.

for (var i = 1; i <= 10; i++) {
    // do something
}

..."

From :
 
 

et Hammers Within Hammers: Dynamic Hierarchical Structures in Flash

Aucun commentaire: