mybrainhurts
October 20th, 2005, 05:54 PM
Hi there! I want to attach several small movie clips to a big container movie clip, which i then want to put in a scroll pane. I would really appreciate it if someone could help me out.=)
I can generate the small clips and attach them to the container clip, but I can't get the container clip to be displayed in the scroll pane. I get the following error:
Error opening URL "file:///C|/Documents%20and%20Settings/Roger/My%20Documents/My%20Flash/MyClip (file:///C|/Documents%20and%20Settings/Roger/My%20Documents/My%20Flash/MyClip)"
First of all I created a "Face" movie clip (which was a smiley face) and stored it in the library (giving linkage/export name "Face"). Then I added a scroll pane to the stage (giving it an instance name "sp"). I then put "MyClip" in the 'contentPath' parameter of 'sp'.
I generated the movie clips using the following actionscript:
var objects:Number = 10; //number of small movie clips to attach
var ypos:Number = 0; //start y position of movieclip
//create a big movie clip to contain the smaller ones
var mc:MovieClip = createEmptyMovieClip("mc", 0);
var clips:Array = new Array(); //array to store small movie clip references
//generate small movie clips and attach to big container clip
for (i=0; i<objects; i++) {
var clipName:String = "clips" + i;
clips[i] = mc.createEmptyMovieClip(clipName, i);
clips[i].attachMovie("Face", "face" + i, i);
clips[i]._y = ypos; //allocate new position for small clip
ypos += 250;
}
//Register "MyClip" movie clip class for the scroll pane to use
function MyClip () {
this = mc;
}
MyClip.prototype = new MovieClip ();
Object.registerClass("MyClip", MyClip);
Pleaseeeee can some Flash genius help me? :diss:
I can generate the small clips and attach them to the container clip, but I can't get the container clip to be displayed in the scroll pane. I get the following error:
Error opening URL "file:///C|/Documents%20and%20Settings/Roger/My%20Documents/My%20Flash/MyClip (file:///C|/Documents%20and%20Settings/Roger/My%20Documents/My%20Flash/MyClip)"
First of all I created a "Face" movie clip (which was a smiley face) and stored it in the library (giving linkage/export name "Face"). Then I added a scroll pane to the stage (giving it an instance name "sp"). I then put "MyClip" in the 'contentPath' parameter of 'sp'.
I generated the movie clips using the following actionscript:
var objects:Number = 10; //number of small movie clips to attach
var ypos:Number = 0; //start y position of movieclip
//create a big movie clip to contain the smaller ones
var mc:MovieClip = createEmptyMovieClip("mc", 0);
var clips:Array = new Array(); //array to store small movie clip references
//generate small movie clips and attach to big container clip
for (i=0; i<objects; i++) {
var clipName:String = "clips" + i;
clips[i] = mc.createEmptyMovieClip(clipName, i);
clips[i].attachMovie("Face", "face" + i, i);
clips[i]._y = ypos; //allocate new position for small clip
ypos += 250;
}
//Register "MyClip" movie clip class for the scroll pane to use
function MyClip () {
this = mc;
}
MyClip.prototype = new MovieClip ();
Object.registerClass("MyClip", MyClip);
Pleaseeeee can some Flash genius help me? :diss: