Hello!
In my code there's a function that shows an image on the screen (or load the
image and show a progress bar) that is called by clicking on a thumbnail,
and uses a parameter [e.target.name] refering to the property "name" of the
thumbnail clicked, which is an integer. The thumbnails are placed inside the
cointaner_mc MovieClip.

container_mc.addEventListener(MouseEvent.CLICK, clickThumb);

function clickThumb(e:MouseEvent):void{
if (my_full_images[e.target.name] == undefined){
var full_url = my_images[e.target.nam...@full;

etc...

but I want to call this function by clicking on a button, which would need
to pass another type of parameter, in this case, a variable which refers to
the number of the image displayed on the screen plus one.

I tried this:

clickThumb(image_num + 1)

But it doesn't work, I get the following error:

1067: Implicit coercion of a value of type Number to an unrelated type
flash.events:MouseEvent.

How could I call the function clickThumb and make it use "image_num + 1"
instead of "e.target.name" ?

Could I dispatch the event (MouseEvent.CLICK, clickThumb), passing this
value  "image_num + 1" ?

Thanks in advance !!
Isaac
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to