Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-17-2005, 06:24 PM   #1
Eend
Registered User
 
Join Date: Feb 2005
Posts: 2
Default Flash 4 creating an array on screen with duplicate movieclip

Hi,

i want to create a virtual array (like a grid) in a flash 4 file. I've made up this script. The problem is that i do not see an entire grid, only the first horizontal line and the last vertical line. I think there's a problem in the depth of the created movieclip but I don't have a single clue what the problem is. Do you have an idea?

This is my script:
ActionScript Code:
while(i<10) {     i++     while(j<10) {         j++         depthOfMc++         pos_x = i * 20         pos_y = j * 20         duplicateMovieClip("gridPoint_mc" , "gridPoint_x"+i+"_y"+j, depthOfMc);         eval("gridPoint_x"+i+"_y"+j)._x = pos_x;         eval("gridPoint_x"+i+"_y"+j)._y = pos_y;     }     j = 0 }

Last edited by CyanBlue; 02-17-2005 at 08:35 PM. Reason: AS tag is applied
Eend is offline   Reply With Quote
Old 02-18-2005, 03:13 AM   #2
Byronc
Digital Curmudgeon
 
Byronc's Avatar
 
Join Date: Feb 2005
Location: Lake Forest Park, WA
Posts: 59
Default

Well, one reason it's not working is that duplicateMovieClip is not supported in Flash 4 (nor are depths).
__________________
Byron “Barn” Canfield
Fervently hoping that, after a number of years of oldnewbie's juvenile behavior, that he/she has been banned from the forum.
Byronc is offline   Reply With Quote
Old 02-18-2005, 03:23 AM   #3
Byronc
Digital Curmudgeon
 
Byronc's Avatar
 
Join Date: Feb 2005
Location: Lake Forest Park, WA
Posts: 59
Default

I don't see anything glaring, but I wonder if you need to use slash notation or tellTarget to set the _x and _y properties of the movieclip. (It's been so long now since I used Flash 4.)
__________________
Byron “Barn” Canfield
Fervently hoping that, after a number of years of oldnewbie's juvenile behavior, that he/she has been banned from the forum.
Byronc is offline   Reply With Quote
Old 02-18-2005, 03:25 AM   #4
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

Welcome aboard, Barn!!!
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 02-18-2005, 04:51 AM   #5
Byronc
Digital Curmudgeon
 
Byronc's Avatar
 
Join Date: Feb 2005
Location: Lake Forest Park, WA
Posts: 59
Default

Thanks, CB. I tried to register as Barn, and got all the way through the process but the email alias that I set up hadn't propagated yet when the first email was sent out by the system, so I guess it bounced.

Do you know who I'd talk to to get it resent, so I could return to my "normal self" (if such a thing is not an oxymoron)?

In addition, can't get my blasted SWF to show in my sig (the bbcode instruction page is wrong -- doesn't work with the syntax displayed there).
__________________
Byron “Barn” Canfield
Fervently hoping that, after a number of years of oldnewbie's juvenile behavior, that he/she has been banned from the forum.

Last edited by Byronc; 02-18-2005 at 05:15 AM.
Byronc is offline   Reply With Quote
Old 02-18-2005, 04:54 AM   #6
Byronc
Digital Curmudgeon
 
Byronc's Avatar
 
Join Date: Feb 2005
Location: Lake Forest Park, WA
Posts: 59
Default

Hey, CB -- fess up now: how do you embed a SWF in a sig here?
__________________
Byron “Barn” Canfield
Fervently hoping that, after a number of years of oldnewbie's juvenile behavior, that he/she has been banned from the forum.
Byronc is offline   Reply With Quote
Old 02-18-2005, 09:32 AM   #7
Eend
Registered User
 
Join Date: Feb 2005
Posts: 2
Default

Hmmm :S Thats not it i'm affraid.
The interpreter knows the dot notation, there's no error and still 20 cubes are drawn.

When I ask a list of the objects in the rendered scene i get this:
Quote:
Level #0: Frame=1
Movie Clip: Frame=1 Target="_level0.gridPoint_mc"
Shape:
Movie Clip: Frame=1 Target="_level0.2"
Shape:
Movie Clip: Frame=1 Target="_level0.3"
Shape:
Movie Clip: Frame=1 Target="_level0.4"
Shape:
Movie Clip: Frame=1 Target="_level0.5"
Shape:
Movie Clip: Frame=1 Target="_level0.6"
Shape:
Movie Clip: Frame=1 Target="_level0.7"
Shape:
Movie Clip: Frame=1 Target="_level0.8"
Shape:
Movie Clip: Frame=1 Target="_level0.9"
Shape:
Movie Clip: Frame=1 Target="_level0.10"
Shape:
Movie Clip: Frame=1 Target="_level0.11"
Shape:
Movie Clip: Frame=1 Target="_level0.3"
Shape:
Movie Clip: Frame=1 Target="_level0.4"
Shape:
Movie Clip: Frame=1 Target="_level0.5"
Shape:
Movie Clip: Frame=1 Target="_level0.6"
Shape:
Movie Clip: Frame=1 Target="_level0.7"
Shape:
Movie Clip: Frame=1 Target="_level0.8"
Shape:
Movie Clip: Frame=1 Target="_level0.9"
Shape:
Movie Clip: Frame=1 Target="_level0.10"
Shape:
Movie Clip: Frame=1 Target="_level0.11"
Shape:
Movie Clip: Frame=1 Target="_level0.12"
Shape:
Movie Clip: Frame=1 Target="_level0.4"
Shape:
Movie Clip: Frame=1 Target="_level0.5"
Shape:
Movie Clip: Frame=1 Target="_level0.6"
Shape:
Movie Clip: Frame=1 Target="_level0.7"
Shape:
Movie Clip: Frame=1 Target="_level0.8"
Shape:
Movie Clip: Frame=1 Target="_level0.9"
Shape:
Movie Clip: Frame=1 Target="_level0.10"
Shape:
Movie Clip: Frame=1 Target="_level0.11"
Shape:
Movie Clip: Frame=1 Target="_level0.12"
Shape:
Movie Clip: Frame=1 Target="_level0.13"
Shape:
Movie Clip: Frame=1 Target="_level0.5"
Shape:
Movie Clip: Frame=1 Target="_level0.6"
Shape:
Movie Clip: Frame=1 Target="_level0.7"
Shape:
Movie Clip: Frame=1 Target="_level0.8"
Shape:
Movie Clip: Frame=1 Target="_level0.9"
Shape:
Movie Clip: Frame=1 Target="_level0.10"
Shape:
Movie Clip: Frame=1 Target="_level0.11"
Shape:
Movie Clip: Frame=1 Target="_level0.12"
Shape:
Movie Clip: Frame=1 Target="_level0.13"
Shape:
Movie Clip: Frame=1 Target="_level0.14"
Shape:
Movie Clip: Frame=1 Target="_level0.6"
Shape:
Movie Clip: Frame=1 Target="_level0.7"
Shape:
Movie Clip: Frame=1 Target="_level0.8"
Shape:
Movie Clip: Frame=1 Target="_level0.9"
Shape:
Movie Clip: Frame=1 Target="_level0.10"
Shape:
Movie Clip: Frame=1 Target="_level0.11"
Shape:
Movie Clip: Frame=1 Target="_level0.12"
Shape:
Movie Clip: Frame=1 Target="_level0.13"
Shape:
Movie Clip: Frame=1 Target="_level0.14"
Shape:
Movie Clip: Frame=1 Target="_level0.15"
Shape:
Movie Clip: Frame=1 Target="_level0.7"
Shape:
Movie Clip: Frame=1 Target="_level0.8"
Shape:
Movie Clip: Frame=1 Target="_level0.9"
Shape:
Movie Clip: Frame=1 Target="_level0.10"
Shape:
Movie Clip: Frame=1 Target="_level0.11"
Shape:
Movie Clip: Frame=1 Target="_level0.12"
Shape:
Movie Clip: Frame=1 Target="_level0.13"
Shape:
Movie Clip: Frame=1 Target="_level0.14"
Shape:
Movie Clip: Frame=1 Target="_level0.15"
Shape:
Movie Clip: Frame=1 Target="_level0.16"
Shape:
Movie Clip: Frame=1 Target="_level0.8"
Shape:
Movie Clip: Frame=1 Target="_level0.9"
Shape:
Movie Clip: Frame=1 Target="_level0.10"
Shape:
Movie Clip: Frame=1 Target="_level0.11"
Shape:
Movie Clip: Frame=1 Target="_level0.12"
Shape:
Movie Clip: Frame=1 Target="_level0.13"
Shape:
Movie Clip: Frame=1 Target="_level0.14"
Shape:
Movie Clip: Frame=1 Target="_level0.15"
Shape:
Movie Clip: Frame=1 Target="_level0.16"
Shape:
Movie Clip: Frame=1 Target="_level0.17"
Shape:
Movie Clip: Frame=1 Target="_level0.9"
Shape:
Movie Clip: Frame=1 Target="_level0.10"
Shape:
Movie Clip: Frame=1 Target="_level0.11"
Shape:
Movie Clip: Frame=1 Target="_level0.12"
Shape:
Movie Clip: Frame=1 Target="_level0.13"
Shape:
Movie Clip: Frame=1 Target="_level0.14"
Shape:
Movie Clip: Frame=1 Target="_level0.15"
Shape:
Movie Clip: Frame=1 Target="_level0.16"
Shape:
Movie Clip: Frame=1 Target="_level0.17"
Shape:
Movie Clip: Frame=1 Target="_level0.18"
Shape:
Movie Clip: Frame=1 Target="_level0.10"
Shape:
Movie Clip: Frame=1 Target="_level0.11"
Shape:
Movie Clip: Frame=1 Target="_level0.12"
Shape:
Movie Clip: Frame=1 Target="_level0.13"
Shape:
Movie Clip: Frame=1 Target="_level0.14"
Shape:
Movie Clip: Frame=1 Target="_level0.15"
Shape:
Movie Clip: Frame=1 Target="_level0.16"
Shape:
Movie Clip: Frame=1 Target="_level0.17"
Shape:
Movie Clip: Frame=1 Target="_level0.18"
Shape:
Movie Clip: Frame=1 Target="_level0.19"
Shape:
Movie Clip: Frame=1 Target="_level0.11"
Shape:
Movie Clip: Frame=1 Target="_level0.12"
Shape:
Movie Clip: Frame=1 Target="_level0.13"
Shape:
Movie Clip: Frame=1 Target="_level0.14"
Shape:
Movie Clip: Frame=1 Target="_level0.15"
Shape:
Movie Clip: Frame=1 Target="_level0.16"
Shape:
Movie Clip: Frame=1 Target="_level0.17"
Shape:
Movie Clip: Frame=1 Target="_level0.18"
Shape:
Movie Clip: Frame=1 Target="_level0.19"
Shape:
Movie Clip: Frame=1 Target="_level0.20"
Shape:
I've read in the helpfiles that duplicating movieclips cannot be done in the same level and that clearly happens in this case... But I just don't know why. The depth is an increasing number (checked that with a trace on it).

I'm clueless...

Last edited by CyanBlue; 02-19-2005 at 01:56 AM. Reason: QUOTE tag is applied
Eend is offline   Reply With Quote
Old 02-18-2005, 11:11 AM   #8
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

That'd be either Strok or Jesse, Barn...

As for the signature... I use this...
Quote:
[ swf=http://www.domain.com/path/flashsig.swf width=500 height=65][ /swf]
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 02-18-2005, 09:07 PM   #9
Byronc
Digital Curmudgeon
 
Byronc's Avatar
 
Join Date: Feb 2005
Location: Lake Forest Park, WA
Posts: 59
Default

Quote:
When I ask a list of the objects in the rendered scene i get this:
And there is your problem. You are using illegal instance names. Instance names, and most other names in Flash, may not begin with numeric characters, and certainly may not consist of only numeric characters, AND the instances your code is attempting to manipulate simply don't exist.

Something doesn't jive between the code you posted and the results your output indicates. Did you copy and paste your script or did you retype it?
__________________
Byron “Barn” Canfield
Fervently hoping that, after a number of years of oldnewbie's juvenile behavior, that he/she has been banned from the forum.

Last edited by Byronc; 02-18-2005 at 09:10 PM.
Byronc is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:40 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.