Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 3rd, 2002, 05:21 PM
cuboctahedron cuboctahedron is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Netherlands
Posts: 458 cuboctahedron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 13 h 54 m 38 sec
Reputation Power: 11
small piece of code help please

Hi, I have to following snippet:

_root.MyMovie0._y -= 10;
_root.MyMovie1._y -= 10;
_root.MyMovie2._y -= 10;
_root.MyMovie3._y -= 10;
_root.MyMovie._y -= 10;

I want to replace the "MyMovie"-values with an array. I did the following but it doesnt work.

for (i=0; i<Descriptions_length; i++) {
_root.this["MyMovie" + i]._y -= 10;
)
Anyone an idea?

cheers
Patrick

Reply With Quote
  #2  
Old August 8th, 2002, 02:19 PM
fbr fbr is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 2 fbr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
If your movie instances are really in the root, try to do it in the more reliable two-step way:

for (i=0; i<Descriptions_length; i++) {
newIns = eval("_root.MyMovie"+i);
newIns._y -= 10;
}

or, after declaration of newIns variable in the root: var newIns = null;, do the following:

for (i=0; i<Descriptions_length; i++) {
_root.newIns = eval("MyMovie"+i);
_root.newIns._y -= 10;
}

Reply With Quote
  #3  
Old August 9th, 2002, 11:35 AM
cuboctahedron cuboctahedron is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Netherlands
Posts: 458 cuboctahedron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 13 h 54 m 38 sec
Reputation Power: 11
Thanks!
I'll have a go at it

Patrick

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > small piece of code help please

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap