Solved

createEmptyClip and Properties Problem

Posted on 2006-07-22
2
284 Views
Last Modified: 2011-09-20
Hi and thanks for reading;

What I want to do is duplicate/attach my "NEO" MC from the lib onto the stage as indicated below. I have the MC likned and I can get only 1 copy to appear on the stage anbd all my traces return indefined. I have tried a couple different variations to no avail including attacing only one mc to each empty clip that has been created and no difference. the closest I got was getitng 0 for x and y props.

I want to have several clips that I populate with the NEO mc in different locations.

What gives lol and TIA

initx = 100;
inity = 150;
dx = 30;
dy = 36;

createEmptyMovieClip("c1",this.getNextHighestDepth());
createEmptyMovieClip("c2",this.getNextHighestDepth());
createEmptyMovieClip("c3",this.getNextHighestDepth());
createEmptyMovieClip("c4",this.getNextHighestDepth());
createEmptyMovieClip("c5",this.getNextHighestDepth());

for (i=1; i<=3; i++) {
newName = "r" + i;
c1.attachMovie("neo", newName, this.getNextHighestDepth());
trace("newname = " + newName);
eval("c1." + newName)._x = 50 ;
eval("c1." + newName)._y = inity  + (dy*i);
}
trace (c1.r1._y);
trace (c1.r2._y);
trace (c1.r3._y);
0
Comment
Question by:MartiniMon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
laner2k earned 250 total points
ID: 17162939
initx = 100;
inity = 150;
dx = 30;
dy = 36;

createEmptyMovieClip("c1",this.getNextHighestDepth());
createEmptyMovieClip("c2",this.getNextHighestDepth());
createEmptyMovieClip("c3",this.getNextHighestDepth());
createEmptyMovieClip("c4",this.getNextHighestDepth());
createEmptyMovieClip("c5",this.getNextHighestDepth());

for (i=1; i<=3; i++) {
newName = "r" + i;
c1.attachMovie("neo", newName, c1.getNextHighestDepth());
trace("newname = " + newName);
eval("c1." + newName)._x = 50 ;
eval("c1." + newName)._y = inity  + (dy*i);
}
trace (c1.r1._y);
trace (c1.r2._y);
trace (c1.r3._y);


//////////////////////////////////////////////////////////////////////////////////////////////////

try that.

what is are the function of the 4 other empty mc? or will you be using them for other stuff, as they arent doing anything at the moment. btw it was the this.getNextHighestDepth() in the attachMovie that was causing it to not function as this wasn't c1 as you might expect but _level0

hope this helps
0
 
LVL 1

Author Comment

by:MartiniMon
ID: 17171370
that has solved the issue. Thanks for the fasdt response. I was able to move forward on that project over the weekend as a result.

I have some other thing I plan to put into the other clips that will be very similar to what I have for the first. If you want to see the final project moving forward go to ***Admin Delete***.com.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question