[Flashcoders] problem loading dynamically created menus

2007-05-25 Thread Gustavo Duenas
Hi coders. I have created some buttons based on an array ( for you  
this might sound easy but I'm crushing my head right now)
the array has some names and with a for loop, I have my buttons with  
the names of the arrays attached to them  
(this.mc.somethingelse.text=arraynames)
at this point everything is ok, then I create some folders based on  
that names(array). Then the problems happened when I try to order the  
buttons to load the folders
based on the array names and the .swf file inside them. At this point  
it only loads one, what happened with the others??? i don't know.

I'm clueless, I'd appreciate any help.

this is the code:


var menus = new Array ();
menus = [ commercial, children,portraits,models, weddings];
trace(menus.length);

for (i=0; imenus.length; i++){
 var newButtons = menus[i];
 trace (newButtons);
	 var buttons = this.attachMovie(screenCards,newButtons,  
this.getNextHighestDepth());

 trace(buttons);
 buttons._x=0;

 buttons._x=-30*i*6
var names=  buttons.titleCard.text= newButtons;
buttons.screenInside.loadMovie(botones/+newButtons+.jpg);
//so far this point everything is ok
buttons.onRelease = function (){
_root.photomenus.loadMovie(names+/+names+photogallery.swf);
		//here it loads just one folder and share it with all the  
buttons...why??




}

}




Regards


Gustavo Duenas

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] problem loading dynamically created menus

2007-05-25 Thread R�kos Attila

GD buttons.onRelease = function (){
GD   _root.photomenus.loadMovie(names+/+names+photogallery.swf);

What do you think, what is the value of names when you click on a
button and the script inside the onRelease handler is executed?

  Attila

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] problem loading dynamically created menus

2007-05-25 Thread Allandt Bik-Elliott (Receptacle)
i would guess you need to pass the current iteration (i) to the  
button so that it can access it


otherwise you'll iterate through your entire loop and only pass the  
final number to all of the buttons


before you set your onRelease function, try passing a copy of the  
names variable to the button


buttons.names = names

and then refer to the variable in the buttons locally like this

_root.photomenus.loadMovie(this.names+/+this.names 
+photogallery.swf);


i think that should work

a

On 25 May 2007, at 17:39, Gustavo Duenas wrote:

Hi coders. I have created some buttons based on an array ( for you  
this might sound easy but I'm crushing my head right now)
the array has some names and with a for loop, I have my buttons  
with the names of the arrays attached to them  
(this.mc.somethingelse.text=arraynames)
at this point everything is ok, then I create some folders based on  
that names(array). Then the problems happened when I try to order  
the buttons to load the folders
based on the array names and the .swf file inside them. At this  
point it only loads one, what happened with the others??? i don't  
know.

I'm clueless, I'd appreciate any help.

this is the code:


var menus = new Array ();
menus = [ commercial, children,portraits,models, weddings];
trace(menus.length);

for (i=0; imenus.length; i++){
 var newButtons = menus[i];
 trace (newButtons);
	 var buttons = this.attachMovie(screenCards,newButtons,  
this.getNextHighestDepth());

 trace(buttons);
 buttons._x=0;

 buttons._x=-30*i*6
var names=  buttons.titleCard.text= newButtons;
buttons.screenInside.loadMovie(botones/+newButtons+.jpg);
//so far this point everything is ok
buttons.onRelease = function (){
_root.photomenus.loadMovie(names+/+names+photogallery.swf);
		//here it loads just one folder and share it with all the  
buttons...why??




}

}




Regards


Gustavo Duenas

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] problem loading dynamically created menus

2007-05-25 Thread Gustavo Duenas

Hi Attila, I think the values should be the one inside the the array:
 weddings, models, portrait and so on
I don't know why the handler of every button point to only one  
(weddings)


Regards


Gustavo


On May 25, 2007, at 1:22 PM, Rákos Attila wrote:



GD buttons.onRelease = function (){
GD   _root.photomenus.loadMovie(names+/+names+photogallery.swf);

What do you think, what is the value of names when you click on a
button and the script inside the onRelease handler is executed?

  Attila

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



Gustavo Duenas
Creative Director
LEFT AND RIGHT SOLUTIONS LLC
1225 W. Beaver St. Suite 119
Jacksonville, Fl.  32204
904 . 2650330
www.leftandrightsolutions.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] problem loading dynamically created menus[solved]

2007-05-25 Thread Gustavo Duenas

Man, that was right!! It works!!

Thanks


Gustavo

On May 25, 2007, at 1:28 PM, Allandt Bik-Elliott (Receptacle) wrote:

i would guess you need to pass the current iteration (i) to the  
button so that it can access it


otherwise you'll iterate through your entire loop and only pass the  
final number to all of the buttons


before you set your onRelease function, try passing a copy of the  
names variable to the button


buttons.names = names

and then refer to the variable in the buttons locally like this

_root.photomenus.loadMovie(this.names+/+this.names 
+photogallery.swf);


i think that should work

a

On 25 May 2007, at 17:39, Gustavo Duenas wrote:

Hi coders. I have created some buttons based on an array ( for you  
this might sound easy but I'm crushing my head right now)
the array has some names and with a for loop, I have my buttons  
with the names of the arrays attached to them  
(this.mc.somethingelse.text=arraynames)
at this point everything is ok, then I create some folders based  
on that names(array). Then the problems happened when I try to  
order the buttons to load the folders
based on the array names and the .swf file inside them. At this  
point it only loads one, what happened with the others??? i don't  
know.

I'm clueless, I'd appreciate any help.

this is the code:


var menus = new Array ();
menus = [ commercial, children,portraits,models, weddings];
trace(menus.length);

for (i=0; imenus.length; i++){
 var newButtons = menus[i];
 trace (newButtons);
	 var buttons = this.attachMovie(screenCards,newButtons,  
this.getNextHighestDepth());

 trace(buttons);
 buttons._x=0;

 buttons._x=-30*i*6
var names=  buttons.titleCard.text= newButtons;
buttons.screenInside.loadMovie(botones/+newButtons+.jpg);
//so far this point everything is ok
buttons.onRelease = function (){
_root.photomenus.loadMovie(names+/+names+photogallery.swf);
		//here it loads just one folder and share it with all the  
buttons...why??




}

}




Regards


Gustavo Duenas

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



Gustavo Duenas
Creative Director
LEFT AND RIGHT SOLUTIONS LLC
1225 W. Beaver St. Suite 119
Jacksonville, Fl.  32204
904 . 2650330
www.leftandrightsolutions.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] problem loading dynamically created menus

2007-05-25 Thread John Trentini

Thanks Attila,

I solved it by embedding the buttons into a dynamic mc_holder and then 
remve the parent.


JohnT

Rákos Attila wrote:


GD buttons.onRelease = function (){
GD   _root.photomenus.loadMovie(names+/+names+photogallery.swf);

What do you think, what is the value of names when you click on a
button and the script inside the onRelease handler is executed?

 Attila

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

 



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] problem loading dynamically created menus

2007-05-25 Thread John Trentini

Thanks Allandt,
that is what I managed but I resolved it by using a mc_holder as the 
parent and then just removing that, much easier and cleaner as suggested 
by Sebastian.

Cheers
JohnT


Allandt Bik-Elliott (Receptacle) wrote:

i would guess you need to pass the current iteration (i) to the  
button so that it can access it


otherwise you'll iterate through your entire loop and only pass the  
final number to all of the buttons


before you set your onRelease function, try passing a copy of the  
names variable to the button


buttons.names = names

and then refer to the variable in the buttons locally like this

_root.photomenus.loadMovie(this.names+/+this.names 
+photogallery.swf);


i think that should work

a

On 25 May 2007, at 17:39, Gustavo Duenas wrote:

Hi coders. I have created some buttons based on an array ( for you  
this might sound easy but I'm crushing my head right now)
the array has some names and with a for loop, I have my buttons  with 
the names of the arrays attached to them  
(this.mc.somethingelse.text=arraynames)
at this point everything is ok, then I create some folders based on  
that names(array). Then the problems happened when I try to order  
the buttons to load the folders
based on the array names and the .swf file inside them. At this  
point it only loads one, what happened with the others??? i don't  know.

I'm clueless, I'd appreciate any help.

this is the code:


var menus = new Array ();
menus = [ commercial, children,portraits,models, weddings];
trace(menus.length);

for (i=0; imenus.length; i++){
 var newButtons = menus[i];
 trace (newButtons);
 var buttons = this.attachMovie(screenCards,newButtons,  
this.getNextHighestDepth());

 trace(buttons);
 buttons._x=0;

 buttons._x=-30*i*6

var names=  buttons.titleCard.text= newButtons;
buttons.screenInside.loadMovie(botones/+newButtons+.jpg);
//so far this point everything is ok
buttons.onRelease = function (){
_root.photomenus.loadMovie(names+/+names+photogallery.swf);
//here it loads just one folder and share it with all the  
buttons...why??
   
   
   
}

}





Regards


Gustavo Duenas

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com