473,788 Members | 2,857 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

duplicate Mc

67 New Member
Expand|Select|Wrap|Line Numbers
  1. _root.text_mc.duplicateMovieClip("test",1);
  2. _root.test._x="10";
  3. _root.test._y="10";
  4.  
I have a mc called text_mc Inside is a colored line. There is no instance of this clip, it is in the library. I am trying to generate an instance. The above code seems to not do anything. Is there something i am missing? Eventually i would like to put this in a loop and have:

Expand|Select|Wrap|Line Numbers
  1. duplicate....("test"+i,i);
  2. _root.test+i._x=..... ?????? 
  3.  
I am unsure about the line with the ???? i dont think that would work, is there another way?

Thanks
Nov 4 '07 #1
5 3071
rsdev
149 New Member
Expand|Select|Wrap|Line Numbers
  1. _root.text_mc.duplicateMovieClip("test",1);
  2. _root.test._x="10";
  3. _root.test._y="10";
  4.  
I have a mc called text_mc Inside is a colored line. There is no instance of this clip, it is in the library. I am trying to generate an instance. The above code seems to not do anything. Is there something i am missing? Eventually i would like to put this in a loop and have:

Expand|Select|Wrap|Line Numbers
  1. duplicate....("test"+i,i);
  2. _root.test+i._x=..... ?????? 
  3.  
I am unsure about the line with the ???? i dont think that would work, is there another way?

Thanks
Hi Shawn,

FInd text_mc in the library 'right-click' and tick the box that says export for runtime sharing. Then you can access the clip in your AS.

When referencing dynamic names you can use [].

_root["test"+i]._x=....
Nov 5 '07 #2
Shawn Northrop
67 New Member
Did you mean export for actionscript? I have that checked. The other option wanted a url? anyways i posted my file online. Its extremely small and simple. Could someone please check it out and let me know? Thanks

www.jeannefligh t.com/xmltest.fla
Nov 6 '07 #3
rsdev
149 New Member
Did you mean export for actionscript? I have that checked. The other option wanted a url? anyways i posted my file online. Its extremely small and simple. Could someone please check it out and let me know? Thanks

www.jeannefligh t.com/xmltest.fla
Hi Shawn,

Apologies I meant export for actionscript. A little tired when I wrote the reply.

Then the identifier is how you would acees the clip using attachMovie in actionscript. Then you can duplicate the clip.
Nov 7 '07 #4
rsdev
149 New Member
Otherwise you can drag the text_mc somewhere off stage and name it. From there you can duplicate the clip.
Nov 7 '07 #5
rsdev
149 New Member
Otherwise you can drag the text_mc somewhere off stage and name it. From there you can duplicate the clip.
If you want to change the settings of clip after duplicating try this;

Expand|Select|Wrap|Line Numbers
  1. circle_mc.duplicateMovieClip("circle1_mc", this.getNextHighestDepth(), {_x:20, _y:20});
The curly brackets set init properties. Or;

Expand|Select|Wrap|Line Numbers
  1. var clip = _root.text_mc.duplicateMovieClip("circle1_mc", 10);
  2. with(clip){
  3.   _x = 210;
  4.   _y = 210;
  5. }
Hope this helps!
Nov 7 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
3224
by: Giloosh | last post by:
Hello, i need some help if possible... i have a payments table with over 500 records i want to run a query that searches through the table spotting out any duplicate ID#'s and Dates. So basically it will run a search spotting out duplicate ID#'s. Than with in those ID#'s spot out duplicate dates. I could do this by eye and spend hours spotting out the duplicated dates, but it would be much easier and funner having a script do it for you.
3
3948
by: Mohammed Mazid | last post by:
Hi, Basically I have a problem with registering to my quiz system. I had borrowed some code from an existing program but I just do not know why it doesn't work. If (txtUsername = "" Or txtPassword = "") Or (txtFirstName = "" Or txtLastName = "") Then MsgBox "Please complete all the fields", vbCritical = vbOKOnly, "Incomplete Login Details"
44
4072
by: Xah Lee | last post by:
here's a large exercise that uses what we built before. suppose you have tens of thousands of files in various directories. Some of these files are identical, but you don't know which ones are identical with which. Write a program that prints out which file are redundant copies. Here's the spec. -------------------------- The program is to be used on the command line. Its arguments are one or
1
838
by: Gary Lundquest | last post by:
It appears to me that MySQL version 4 returns an error messge when doing an Insert that results in duplicate entries. Version 3 did NOT return an error - it dropped the duplicate entries and ran to completion. Version 4 seems to STOP when it encounters a duplicate entry, so that the records before the duplicate are inserted and the records after the duplicate are not inserted. 3.22.27.1 - previous ver MySQL that did not return error...
9
5102
by: vbportal | last post by:
Hi, I would like to add BitArrays to an ArrayList and then remove any duplicates - can someone please help me forward. I seem to have (at leaset ;-) )2 problems/lack of understanding (see test code below): (a)When adding BitArrays to the ArrayList and then looping through the ArrayList I seem to access only the latest added BitArray and I'm not exactly clear on best way to access each BItArray in the ArrayList (b)When I try to remove...
2
7704
by: news | last post by:
I just upgraded to PHP 4.4.2 on my Slackware 10.2 system. And Apache/mySQL/PHP all work great through a browser. No errors. But when I try to run a PHP script through the command line, which I need to do, I get blocks of errors like: root@slackserve:/var/www/htdocs# php ./phptest.php PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php/extensions/mysql.so' - libmysqlclient.so.14: cannot open shared object file: No such...
5
3993
by: Manish | last post by:
The topic is related to MySQL database. Suppose a table "address" contains the following records ------------------------------------------------------- | name | address | phone | ------------------------------------------------------- | mr x | 8th lane | 124364 | | mr x | 6th lane | 435783 | | mrs x | 6th lane | 435783 |
7
1861
by: ucfcpegirl06 | last post by:
Hello, I have a dilemma. I am trying to flag duplicate messages received off of a com port. I have a software tool that is supposed to detect dup messages and flag and write the text "DUP" on the GUI of the software tool to let the user know that a duplicate message was sent or received. Here is the code:
4
5868
by: FangQ | last post by:
hi I am very new to mysql. I have a question about using the "on duplicate update" clause with insert command. my table "data" has two columns, field1 and field2, where field1 is the index and is "unique". when I run
3
10948
by: rajeshkrsingh | last post by:
Hi friends, Step1- create table duplicate ( intId int, varName varchar(50) ) insert into duplicate(intId,varName) values(1,'rajesh') insert into duplicate(intId,varName) values(2,'raj12') insert into duplicate(intId,varName) values(1,'rajesh')
0
10366
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10112
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5399
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4070
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.