PDA

View Full Version : draggable mc's inside scrollpane


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

Ruben
10-15-2005, 10:55 PM
Just a wild guess but maybe it's got something to do with the scrollpane requiring focus (http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary643.html)? Try it out I'd say...:)

- Ruben


PS. If that doesn't work out try reading up on the scrollpane-component (http://livedocs.macromedia.com/flash/mx2004/main_7_2/00002762.html) on the macromedia-site...

wharfrat
11-20-2005, 05:33 PM
did you ever find an answer to this issue? I'm having a similar issue with scrollPane. Thanks.