View Full Version : Movie Clip in LIbrary
RitaDhiman
06-30-2006, 08:56 AM
Hello
Can someone help me out in knowing how can I make 10 copies of the movie clip which is there in the library with the help of action scripting
Thanx
RitaDhiman
06-30-2006, 08:59 AM
I have a .swf file in which i can drag the elements on press function as I have put startDrag and stop Drag function there so that I can change the position of elements on that file. What i want is that everytime when I open that file then those elements should be opened with the new position which I changed while dragging last time. Can Anyone tell me how I can do this.
Hi,
First create a variable, lets say i=0; Then increment it: i++;
Here id the code:
Put this function to the button:
var i =0;
on(press){
_root.attachMovie ("MovieInLibrary_mc", "MovieInLibrary1_mc"+i);
i++;
}
hope that helps..
ofcourse...change MovieInLibrary_mc with your mc in Library...so as the instance name.
mooska
06-30-2006, 09:54 AM
var i =0;
on(press){
_root.attachMovie ("MovieInLibrary_mc", "MovieInLibrary1_mc"+i, i);
i++;
}
You forgot depth ;)
10 at one time
for(i=0; i<10; i++){
this.attachMovie("Movieinlib", "movieonstage"+i, i);
}
Second question is about Shared Object. Flash help will tell you more.
RitaDhiman
06-30-2006, 10:08 AM
Hi there,
Thanx but is not working...
Hi,
First create a variable, lets say i=0; Then increment it: i++;
Here id the code:
Put this function to the button:
var i =0;
on(press){
_root.attachMovie ("MovieInLibrary_mc", "MovieInLibrary1_mc"+i);
i++;
}
hope that helps..
ofcourse...change MovieInLibrary_mc with your mc in Library...so as the instance name.
mooska
06-30-2006, 10:20 AM
right click on library item, select linkage, export for as, name it "MovieInLibrary_mc" for this example
_root.attachMovie ("MovieInLibrary_mc", "MovieInLibrary1_mc"+i, i);
RitaDhiman
06-30-2006, 10:20 AM
Hello Thanx its working now after modifying the code later on by specyfying the depth
Thanx
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.