Quasidandy
10-15-2005, 08:01 PM
I'm quite stuck here. I've managed to load external .swf's into a scrollpane, and as they are loaded, I am adding an onPress and an onRelease handler to each swf's mc as they are loaded. However, I am unable to drag these clips once the whole file is running. I have encountered some posts suggesting that since the scrollpane component can enable the enclosing mc to be draggable, any of my mc's reside under that draggable layer and hence are unavailable to the mouse. I can find no reliable documentation on the inner workings of the v2 components, and I can't seem to find any way to fix this.
I am on MX 2004. My code:
graphics=["shape1","shape2","shape3"];
p.palette_holder.contentPath = "main_container";
var foo = p.palette_holder.content;
var x=0;
var incr=90;
for (i=0;i<graphics.length;i++){
var path = "files/" + graphics[i] + ".swf";
num = i + 1;
var filename = "shape" + num;
foo.createEmptyMovieClip(filename,num);
foo[filename].loadMovie(path);
foo[filename]._x =x;
foo[filename].onPress = function () {clipDrag(this)};
foo[filename].onRelease = function () {clipRelease(this)};
x=x+incr;
}
foo.onEnterFrame=function(){
if (this["shape"+(graphics.length)].getBytesTotal() > 0 && this["shape"+(graphics.length)].getBytesLoaded() == this["shape"+(graphics.length)].getBytesTotal())
{
p.palette_holder.onComplete();
delete this.onEnterFrame ;
}
}
Any thoughts? Thanks.
Quasi
I am on MX 2004. My code:
graphics=["shape1","shape2","shape3"];
p.palette_holder.contentPath = "main_container";
var foo = p.palette_holder.content;
var x=0;
var incr=90;
for (i=0;i<graphics.length;i++){
var path = "files/" + graphics[i] + ".swf";
num = i + 1;
var filename = "shape" + num;
foo.createEmptyMovieClip(filename,num);
foo[filename].loadMovie(path);
foo[filename]._x =x;
foo[filename].onPress = function () {clipDrag(this)};
foo[filename].onRelease = function () {clipRelease(this)};
x=x+incr;
}
foo.onEnterFrame=function(){
if (this["shape"+(graphics.length)].getBytesTotal() > 0 && this["shape"+(graphics.length)].getBytesLoaded() == this["shape"+(graphics.length)].getBytesTotal())
{
p.palette_holder.onComplete();
delete this.onEnterFrame ;
}
}
Any thoughts? Thanks.
Quasi