# Addressing a movie within a movie

**URL:** <https://forum.kirupa.com/t/addressing-a-movie-within-a-movie/210106>\
**Category:** flash\
**Created:** [December 15, 2006, 12:28am UTC](https://forum.kirupa.com/t/addressing-a-movie-within-a-movie/210106 "2006-12-15T00:28:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![juice22](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@juice22](https://forum.kirupa.com/u/juice22)\
**Post date:** [December 15, 2006, 12:28am UTC](https://forum.kirupa.com/t/addressing-a-movie-within-a-movie/210106/1 "2006-12-15T00:28:29Z")

</div>

I’m creating a gallery page on which I’m gonna display my portfolio

I have 8 animated layers on the main timeline for my gallery. Each layer holds a seperate thumbnail that is introduced through animation into the page. I’ve created rollover animations for each thumbnail and I’m having difficulty trying to add rollout animations to them…each thumbnail is a seperate movieclip (like thumbnails that slide into the page for example) then at the end of each movieclip I’ve added a stop function and on that last frame the thumbnail changes from a graphic symbol into a movieclip. So I have second movie clip at the end of each thumbnail’s animation

I’ve created an over label and an over animation and an out label and an out animation for each thumbnail. Basically I’m trying to address a movieclip within another movieclip to play my Over and Out animations.

Here is what the AS looks like on the first frame of the main timeline for my gallery:  
///////////////////////////  
function over(){  
this.gotoAndPlay(“over”);  
}

function out(){  
this.gotoAndPlay(“out”);  
}

this.winter\_mc.winterbtn\_mc.onRollOver = over;  
this.winter\_mc.winterbtn\_mc.onRollOut = out;  
///////////////////////////////

Here are my questions:

1. Is the way I addressed the movieclip winterbtn\_mc (the movieclip on the last frame of the intro animation) inside of winter\_mc (the intro animation) correct?

2. Do I have to create a hit area over the movieclip for the button to play the Over animation? Or does flash automatically play the rollover animation when the viewer places the mouse atop the movieclip?

3. Because each rollover and rollout animation is different for every thumbnail I would have to create 16 functions  
for example…

////////////////////////////  
function winterover(){  
this.gotoAndPlay(“winterover”);  
}

function winterout(){  
this.gotoAndPlay(“winterout”);  
}

function abstractover(){  
this.gotoAndPlay(“abstractover”);  
}

function abstractout(){  
this.gotoAndPlay(“abstractout”);  
}

etc. Is that right?

I’ve also tried placing the AS on the first frame inside of the 2nd movieclip on which winterbtn\_mc appears on the last frame. However this didn’t work either, I’ve been trying to figure this out for awhile but I can’t seem to get it. If anyone could reply at his earliest convenience I’d appreciate it a lot,  
Justin
