You could try creating a container movieclip inside your clip and load the
image inside that clip.
for (i=0; i<models.length; i++){
movieName = models[i];
var newMC = this.container1.createEmptyMovieClip(movieName, 0+i);
// here, create a mc inside newMC
var imageMC = newMC.createEmptyMovieClip("container",0);
//loadMovie inside that mc
imageMC.loadMovie("models/"+movieName+".jpg");
// and then leave the rest as it is (exept for the onRollOver thingy)
newMC._x=100*-i;
newMC._y=100*i;
newMC.onRollOver= function(){
trace("hello")
};
}
On 4/6/07 1:43 PM, "Gustavo Duenas" <[EMAIL PROTECTED]>
wrote:
> Hi , Ok it doesn't sound as simple,
>
> I've created a series of empty movieclips which loads pics from an
> array, so far it loads perfectly but I can attach to the newly
> created movie clip any kind of
> events.
>
> I'm using this.
>
> stop();
>
> var models = new Array();
>
> models = [ "model1", "model2", "model3", "model4"];
>
> trace(models.length);
> for (i=0; i<models.length; i++){
> movieName=models[i];
> var newMC= this.container1.createEmptyMovieClip(movieName, 0+i);
> newMC.loadMovie("models/"+movieName+".jpg");
> newMC._x=100*-i;
> newMC._y=100*i;
> trace (newMC);// so far works until here, creating the movieclips
> and loading the pics inside then and assigning them a respective
> value for x and y
>
> ///from now on, I got the problem, it appear that can't accept any
> event in the movie clips
> newMC.rollOver= function(){
> trace("hello");
> }
>
> }
>
> I hope you got it...because I'm still dont get it.
>
> Regards
>
>
> Gustavo Duenas
>
> _______________________________________________
> [email protected]
> 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
_______________________________________________
[email protected]
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