Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: Why does this not work? (Flash 5) |
From: | Paul Steven |
Date: | Sun, 24 Sep 2000 10:47:28 +0100 |
Hi all
I am creating a grid of movie clips using duplicate movie clip. I am reading
the grid data from an array called Grid_Data. i.e
// ///////////////////////////////
// Initialise Gme Grid Data
// Key: D=Dot, W=Wall, S=SuperDot
// ///////////////////////////////
Grid_Data = new Array();
Grid_Data[0] = new Array("W", "W", "W", "W", "W", "W", "W", "W", "W", "W",
"W", "W", "W", "W", "W", "W", "W", "W", "W", "W", "W");
Grid_Data[1] = new Array("W", "D", "D", "D", "W", "D", "D", "D", "D", "S",
"D", "D", "D", "D", "D", "D", "D", "D", "D", "D", "W");
etc
var Dot1_X_Position=90.7;
var Dot1_y_Position=89.5;
var Distance_Between_Dots=15;
for (index1=0;index1<21;index1++){
for (index2=0;index2<21;index2++){
if ((Grid_Data[index1][index2])=="D"){
duplicateMovieClip ("Dot", "Dot" + index1 + "_" + index2 , 10 );
var Dot_X_Position=Dot1_X_Position+(index2*Distance_Between_Dots);
var Dot_Y_Position=Dot1_Y_Position+(index1*Distance_Between_Dots);
trace (Dot_X_Position);
trace (Dot_Y_Position);
setProperty ("Dot" + index1 + "_" + index2,_x, Dot_X_Position);
setProperty ("Dot" + index1 + "_" + index2,_y, Dot_Y_Position);
alert="Dot" + index1 + "_" + index2;
trace (alert);
}
}
}
It is creating the correct positions - however I don't think it is actually
creating any movie clips - anyone see anything wrong with my code. I think
the problem may lie in the bit where I create the name of the new movie clip
i.e "Dot" + index1 + "_" + index2
Any help much appreciated
Paul
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
Re: FLASH: Why does this not work? (Flas, listmail
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]