View Full Version : animating dynamic menu
tigei3281
03-27-2003, 11:50 PM
Hey all, just had a quick question:
On my site I have six MC acting as a menu. You can check out what I mean here (http://home.cfl.rr.com/tigei)
My question is this:
I had to hard code of that into the swf. Is there any way to dynamically load the menu (from a text file) and still keep the animation. I can do it with text by itself (like on the "music page", but how do I it when I have different pics associated for each menu item?
Thanks for the help!
kajica
03-28-2003, 02:31 PM
after the intro there is nothing happening when its clicked on enter site
can you post the fla?
tigei3281
03-28-2003, 10:13 PM
That's odd. I didn't know that the link didn't work. It works over here, so that's weird. But then again, I AM using a free web host... Anyway, about posting the .FLA, it might show some errors b/c I have some MC loading external SWF, but the menus will still show.
To get the full effect, maybe this (home.cfl.rr.com/tigei/main.html) link might work. But I posted the fla just in case.
Thanks for the help!
*.fla (http://www.snugglepuffs.com/test/main1.fla)
tigei3281
03-28-2003, 10:37 PM
That's odd. I didn't know that the link didn't work. It works over here, so that's weird. But then again, I AM using a free web host... Anyway, about posting the .FLA, it might show some errors b/c I have some MC loading external SWF, but the menus will still show.
To get the full effect, maybe this (home.cfl.rr.com/tigei/main.html) link might work. But I posted the fla just in case.
Thanks for the help!
*.fla (http://www.snugglepuffs.com/test/main1.fla)
plugwatson
03-28-2003, 10:58 PM
the link worked for me
I would start looking at duplicatemovieclip
and you should learn how to and notice the z component of that command
this is how you make movie clips on the fly with different properties
also look at getvariables or loadvariables I can't remember which one. presumably you know how to access a text file, if not you may need to write somehting in CGI, perl is quite easy for that but if your serious about web design you'll have to look at PHP too. then you've got to deal with file permissions and so on. off to bed (UK) good luck, and er. make it hot.
tigei3281
03-29-2003, 12:04 AM
thanks for the response!
So let me get this straight...I make one MC instance with all the animation and what not and then I duplicate that movie clip but dyanmically load the other items from a text file?
Something like this:
var menuText = new Array();
var menuLV = new LoadVars();
menuLV.load("textfile.txt");
menuLV.onLoad = function(success){
if(success){
//duplicate the movie clip and change the pic
menuText = menuLV.variables.split(",");
for (i=0; i<menuText.length; i++){
menuMC.duplicateMovieClip("xxx"+i, i);
//there's a textbox in the MC called instTextBox
this["xxx"+i].instTextBox. text = menuText[i];
//there's a MC that does the animation for the pics
this["xxx"+i].instLoadMC.loadMovie("" + menuText[i] + ".swf");
//blah blah blah...not wanting to overload this with minor details such as _x, _y positioning and what not
Will this do the trick? I'm going to try it now in Flash MX
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.