Solved

createEmptyClip and Properties Problem

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to record live broadcast.

734 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