# HELP problem with accessing movieclip (using target)

**URL:** <https://forum.kirupa.com/t/help-problem-with-accessing-movieclip-using-target/203208>\
**Category:** flash\
**Created:** [October 9, 2006, 2:22am UTC](https://forum.kirupa.com/t/help-problem-with-accessing-movieclip-using-target/203208 "2006-10-09T02:22:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ika\_nursila](https://avatars.discourse-cdn.com/v4/letter/i/d2c977/32.png) [@ika\_nursila](https://forum.kirupa.com/u/ika_nursila)\
**Post date:** [October 9, 2006, 2:22am UTC](https://forum.kirupa.com/t/help-problem-with-accessing-movieclip-using-target/203208/1 "2006-10-09T02:22:32Z")

</div>

dear all,  
I have problem with ‘target’ in my flash movie.  
I have flash that show my data from database, into text n images. when i put the text n blank movieclip (container for images) into “main stage” no problem to show the data. i show data for many record, so it must be looping.

## this is my code :

[COLOR=navy][COLOR=gray]// depth[/COLOR]  
depth = -1;[/COLOR]  
[COLOR=navy]  
[COLOR=gray]// hide the origional clips[/COLOR]  
ImgSmall.\_visible = 0;  
VillaName.\_visible = 0;  
VillaDesc.\_visible = 0;[/COLOR]  
[COLOR=navy]  
[COLOR=gray]// split up the array by looking for the commas (from asp files)[/COLOR]  
[/COLOR][COLOR=navy]ImgSmall\_array = ImgSmall\_output.split("#");  
VillaName\_array = VillaName\_output.split("#");  
VillaDesc\_array = VillaDesc\_output.split("#");[/COLOR]  
[COLOR=navy]  
[COLOR=gray]// get the length of the array[/COLOR]

ImgSmall\_length = ImgSmall\_array.length;  
VillaName\_length = VillaName\_array.length;  
VillaDesc\_length = VillaDesc\_array.length;

[COLOR=gray]// set the start y position (x position depends on where you put it on the screen)[/COLOR]  
yposition =30;

[COLOR=gray]// looping everything[/COLOR]  
for (i=0; i\<ImgSmall\_length; i++) {

[COLOR=gray]//put the images to empty movieclip “ImgSmall”[/COLOR]  
duplicateMovieClip(ImgSmall, “ImgSmall” add i, depth);  
setProperty(“ImgSmall” add i, \_y, yposition);  
loadMovie(""+ ImgSmall\_array\* +"",“ImgSmall” add i);  
set(“ImgSmall” add i , ImgSmall\_array\*);  
depth–;

[COLOR=gray]// put the villa name desc into text VillaName[/COLOR]  
duplicateMovieClip(VillaName, “VillaName” add i, depth);  
setProperty(“VillaName” add i, \_y, yposition+10);  
VillaName.VillaName = VillaName\_array[1];  
set(“VillaName” add i add “.var\_VillaName”, VillaName\_array\*);  
depth–;

[COLOR=#808080]// put the villa desc into text VillaDsc[/COLOR]  
duplicateMovieClip(VillaDesc, “VillaDesc” add i, depth);  
setProperty(“VillaDesc” add i, \_y, yposition+30);  
VillaDesc.VillaDesc = VillaDesc\_array[1];  
set(“VillaDesc” add i add “.var\_VillaDesc”, VillaDesc\_array\*);  
depth–;

## [COLOR=gray]// Set the y position plus 30 [/COLOR]yposition = yposition+120; }[/COLOR]

the code aboved are WORKS fine! :party: in my main stage. it;s mean in the \_root.

then, i want create new movie clip that contain all this data, it’s name “listVilla”, and the instance for the main stage is “listVilla”.  
but it;s geeting error, no data displayed in my flash movie ☹

so i think in this case the problem is define the target

this is the structure (that i know) :  
[COLOR=blue]\_root[/COLOR] = main stage  
[COLOR=blue]…listVilla[/COLOR] = movieclip n instance name for the all data  
[COLOR=blue]…ImgSmall[/COLOR] = empty movieclip for images from database  
[COLOR=blue]…VillaName[/COLOR] = textfield for villa name  
[COLOR=blue]…VillaDec[/COLOR] = textfield for villa desc

## i’ve try this code

[COLOR=navy][COLOR=gray]// depth[/COLOR]  
depth = -1;[/COLOR]  
[COLOR=navy]  
[COLOR=gray]// hide the origional clips[/COLOR]  
ImgSmall.\_visible = 0;  
VillaName.\_visible = 0;  
VillaDesc.\_visible = 0;[/COLOR]  
[COLOR=navy]  
[COLOR=gray]// split up the array by looking for the commas (from asp files)[/COLOR]  
[/COLOR][COLOR=navy]ImgSmall\_array = ImgSmall\_output.split("#");  
VillaName\_array = VillaName\_output.split("#");  
VillaDesc\_array = VillaDesc\_output.split("#");[/COLOR]  
[COLOR=navy]  
[COLOR=gray]// get the length of the array[/COLOR]

ImgSmall\_length = ImgSmall\_array.length;  
VillaName\_length = VillaName\_array.length;  
VillaDesc\_length = VillaDesc\_array.length;

[COLOR=gray]// set the start y position (x position depends on where you put it on the screen)[/COLOR]  
yposition =30;

[COLOR=gray]// looping everything[/COLOR]  
for (i=0; i\<ImgSmall\_length; i++) {

[COLOR=gray]//put the images to empty movieclip “ImgSmall”[/COLOR]  
duplicateMovieClip(ImgSmall, “ImgSmall” add i, depth);  
setProperty[COLOR=blue]("\_root.listVilla.[/COLOR]ImgSmall" add i, \_y, yposition);  
loadMovie(""+ ImgSmall\_array\* +"","[COLOR=#0000ff]\_root.listVilla.[/COLOR]ImgSmall" add i);  
set("[COLOR=#0000ff]\_root.listVilla.[/COLOR]ImgSmall" add i , ImgSmall\_array\*);  
depth–;

[COLOR=gray]// put the villa name desc into text VillaName[/COLOR]  
duplicateMovieClip(VillaName, “VillaName” add i, depth);  
setProperty("[COLOR=#0000ff]\_root.listVilla.[/COLOR]VillaName" add i, \_y, yposition+10);  
[COLOR=#0000ff]\_root.listVilla.[/COLOR]VillaName.VillaName = VillaName\_array[1];  
set("[COLOR=#0000ff]\_root.listVilla.[/COLOR]VillaName" add i add “.var\_VillaName”, VillaName\_array\*);  
depth–;

[COLOR=#808080]// put the villa desc into text VillaDsc[/COLOR]  
duplicateMovieClip(VillaDesc, “VillaDesc” add i, depth);  
setProperty("[COLOR=#0000ff]\_root.listVilla.[/COLOR]VillaDesc" add i, \_y, yposition+30);  
[COLOR=#0000ff]\_root.listVilla.[/COLOR]VillaDesc.VillaDesc = VillaDesc\_array[1];  
set("[COLOR=#0000ff]\_root.listVilla.[/COLOR]VillaDesc" add i add “.var\_VillaDesc”, VillaDesc\_array\*);  
depth–;

## [COLOR=gray]// Set the y position plus 30 [/COLOR]yposition = yposition+120; }[/COLOR]

but it’s no data display in my movie???:q:  
any body can HELP me… please…:love: .because i get a very hard deadline for this job. ☹ thanks for your help.

best,  
ika nursila  
indonesia
