|
-
XRave
How to - duplicateMovieClip
I made a pop-up window, and now what i need is a special sort of thing to attach (or duplicate) the window onto the screen. The window's instance name is window and its export name is window_x.
so how do I attach the movieclip into the main movie?
Regards,
Tongxn
When you actually know what "OMG I have so much homework!" means, you won't want to be me.
Xrave
-
OOP is one letter from OOPS
I think you are looking for _root.attachMovie();
-
XRave
O - K.. so what do I use in the ()?
When you actually know what "OMG I have so much homework!" means, you won't want to be me.
Xrave
-
Hey Timmy!!!
First is the linkage name, you can do that by selecting the object in the library and right clicking it. Then in the menu select linkage. With the pop-up up check the first box. Then in the text box above it type in a easy name to remember.
Back to the code, _root.attachMovie("Linkage name", new name, _root.getNextHighestDepth());
-
XRave
mmm so how could I create different new names everytime...
is it by putting a variable up? like if i set a
var pi = 1;
_root.attachMovie("link" , link + "pi" , _root.getNextHighestDepth()) ;
pi += 1;
would that work?
When you actually know what "OMG I have so much homework!" means, you won't want to be me.
Xrave
-
Hey Timmy!!!
Yes, you could create a new variable. Your example is pretty close, instead of having the pi+=1 after the attach it should be before it.
pi+=1
_root.attachMovie("link", "newName"+pi, _root.getNextHighestDepth());
-
XRave
ah thank you all for your time..
When you actually know what "OMG I have so much homework!" means, you won't want to be me.
Xrave
-
XRave
ahh.. i got another problem.
this is my preloader's actionscript:
// percentDone is a var for a dynamic textbox
var bytestotal = _root.getBytesTotal();
var bytesloaded = _root.getBytesLoaded();
if (bytesloaded == bytestotal) {
gotoAndPlay(5);
} else {
play();
}
percentDone = int((loadedbytes/totalbytes)*100);
now that don't seem to work at all, and I checked up everything i could use to make percentDone show the % that is done!?
so what is the problem? i copied this AS from one of my template preloaders and linked up everything to it but it's not working.
Regards,
Tongxn
p.s. is it ok to post another topic in here coz i don't want to add another thread...?
When you actually know what "OMG I have so much homework!" means, you won't want to be me.
Xrave
-
Hey Timmy!!!
Not a problem at all. As for your other question, I haven't really played around with pre-loaders. But from what I can tell on the code you have written I kinda see a mistake.
percentDone = int((loadedbytes/totalbytes)*100); shouldn't you change the variables
percentDone = int((bytesloaded/bytestotal)*100);
I just noticed that from your variables above that line and they were different. Not sure if that could help out. You might to do a search on he topic in the forums or even in tutorials.
-
XRave
That might be it you are a GENIUS!
When you actually know what "OMG I have so much homework!" means, you won't want to be me.
Xrave
-
Hey Timmy!!!
Please yet me know if that works or not?
-
XRave
When you actually know what "OMG I have so much homework!" means, you won't want to be me.
Xrave
-
Hey Timmy!!!
Awesome, it always seems to be the little things that mess stuff up.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|