Solved

createEmptyClip and Properties Problem

Posted on 2006-07-22
2
257 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
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now