That's retarded. But thanks for the insight. So I changed the code to attach a 
MC for the library that had another MC inside to load the img into and it 
worked fine. So all is good again today. Thanks!

Corban Baxter      |      rich media designer      |      www.funimation.com


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Winterhalder
Sent: Monday, January 30, 2006 4:25 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] except onRelease

hi Corban,

>                 this[charThumb_MC].loadMovie(charThumb);

loadMovie is delayed until all scripts in the frame have finished, so
you assign the onRelease to a movieclip that will be replaced by a
newly loaded one moments later.
use a container to load it into, and assign your onRelease to the container.

btw, createEmptyMovieClip returns a reference to the new clip, very
useful if you don't want to type this[charThumb_MC] over and over
again:

var clip = this.createEmptyMovieClip(charThumb_MC, this.getNextHighestDepth());
clip._x = ...

hth,
mark



On 1/30/06, Corban Baxter <[EMAIL PROTECTED]> wrote:
> Guys can you tell me why this entire block of code work in F8 except the part 
> where it hits the onRelease its like it doesn't even make it a button when 
> applied. Any ideas?
>
> buildCharMenu = function(totalChars, setNum){
>         setMax = setNum * 5;
>         trace("setMax: " + setMax); //if set is 1 this returns 4
>         setMin = setMax - 5; //limits total created in set to be 5
>         trace("setMin: " + setMin); //if setMax is 4 this returns 0
>
>         for(i=setMin; i<setMax; i++){
>                 charThumb = xmlNode.childNodes[i].attributes.thumb;
>                 trace("charThumb: " + charThumb);
>                 charThumb_MC = "charThumb" + i; //set new mc name
>                 trace(charThumb_MC);
>                 this.createEmptyMovieClip(charThumb_MC, 
> this.getNextHighestDepth());
>                 this[charThumb_MC]._x = 365 + (50 * i); //initially the value 
> is 0 so nothing is added
>                 this[charThumb_MC]._y = 408;
>                 //trace(charThumb_MC + ": " + this[charThumb_MC]._x);
>                 this[charThumb_MC].loadMovie(charThumb);
>                 this[charThumb_MC].myNum = i;
>
>                 this[charThumb_MC].onRelease = function(){
>                         input_char_info(myNum);
>                         trace("myNum: " + myNum);
>                 }
>         }
> }
>
> Corban Baxter |rich media designer |www.funimation.com
>
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>


--
http://snafoo.org/
jabber: [EMAIL PROTECTED]
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to