# Unable to load movieclip from library

**URL:** <https://forum.kirupa.com/t/unable-to-load-movieclip-from-library/304122>\
**Category:** flash\
**Created:** [February 2, 2010, 5:14am UTC](https://forum.kirupa.com/t/unable-to-load-movieclip-from-library/304122 "2010-02-02T05:14:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![logan3975](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@logan3975](https://forum.kirupa.com/u/logan3975)\
**Post date:** [February 2, 2010, 5:14am UTC](https://forum.kirupa.com/t/unable-to-load-movieclip-from-library/304122/1 "2010-02-02T05:14:36Z")

</div>

Hello everyone…I am new to the forum and new to Flash and AS. I am using Flash CS4 and AS2. I have been following along a video tutorial that has me stuck. The code below is as far as we got and when it was time to test it, mine didn’t work.

This project is a carousel and I am trying to load the movieclip “item” to the stage. I have the linkage set to Export to ActionScrip.

Sometimes I get a compiler error, something to the effect of “unable to load identifier or class named item”

Right now, however, I am not receiving any errors but still no movieclip on the stage.

If someone could help me with this, I would really appreciate it.

/_variable which stores how many items in carousel_/  
var numOfItem:Number = 1;

/_variable which indicates how wide and how tall the carousel to be_/  
var radiusX:Number = 250;  
var radiusY:Number = 75;

/_variable which indicates the center of the stage_/  
var centerX:Number = Stage.width/2;  
var centerY:Number = Stage.height/2;

/_variable to indicate the carousel speed_/  
var speed:Number = 0.05;

/_calls up the movie file_/  
/_places each item evenly spaced across a 360 degree circle_/  
/_on enter frame event_/  
for(var i=0;i\<numOfItems;i++)  
{  
var t = this.attachMovie(“item”,“item”+i,i+1);  
t.angle = i \* ((Math.PI\*2)/numOfItems);  
t.onEnterFrame = mover;  
}

/_x position use cos to calculate the angle_/  
/_y position use sin to calculate the angle_/  
/_add speed to every angle as it passes through_/  
function mover()  
{  
this.\_x = Math.cos(this.angle) \* radiusX + centerX;  
this.\_y = Math.sin(this.angle) \* radiusY + centerY;  
this.angle += this.\_parent.speed;  
}
