# Cannot Manipulate Frames when creating an MC in Acionscript

**URL:** <https://forum.kirupa.com/t/cannot-manipulate-frames-when-creating-an-mc-in-acionscript/246698>\
**Category:** flash\
**Created:** [December 13, 2007, 3:53pm UTC](https://forum.kirupa.com/t/cannot-manipulate-frames-when-creating-an-mc-in-acionscript/246698 "2007-12-13T15:53:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nogame](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@nogame](https://forum.kirupa.com/u/nogame)\
**Post date:** [December 13, 2007, 3:53pm UTC](https://forum.kirupa.com/t/cannot-manipulate-frames-when-creating-an-mc-in-acionscript/246698/1 "2007-12-13T15:53:08Z")

</div>

I’m having an odd problem and I have to be missing something.

I was creating a MovieClip with Actionscript and pulling an existing Library MovieClip (which only exists in the Library) to the stage. Everything went well and the MovieClip appeared and referenced properly (ie: i could modify height, width, etc). However, when I tried to add a simple listener to the stage I quickly found that though I could modify the properties of the movie, I could not manipulate my new MovieClip’s timeline.

I’ve isolated the code and still can’t manipulate the timeline. In fact, if the MovieClip itself is already playing a default animation, any event to change the frame puts a stop on the animation. So I’m stumped.

Here is the code:

```auto
 
var classRef:Class = getDefinitionByName('mcPlayer') as Class;
var playerLink:MovieClip = new classRef();
var thePlayer:MovieClip = new MovieClip();
thePlayer.addChild(playerLink);
thePlayer.x = 333;
thePlayer.y = 222;
thePlayer.name = 'hmm';
 
stage.addChild(thePlayer);
stage.addEventListener(Event.ENTER_FRAME,myFunction);
function myFunction(event:Event)
{
 thePlayer.nextFrame();
 thePlayer.height += 1;
}

```

The Library Movieclip consists of 3 frames:

Frame 1: plays  
Frame 2: plays  
Frame 3: gotoAndPlay(1)

Any help would be appreciated. The final line of code is simply to illustrate that thePlayer properties work fine.
