I want to add some external movies: movie1.swf, movie2.swf to a scrollPanel 
component.

I have done it this way, but I think it can be done easier and cleaner:

sp is an instance of scrollPanel

var numero:int=0;

function drawBox(box:MovieClip,color:uint):void {
 box.graphics.drawRect(0, 0, 1000, 100);
}

var aBox:MovieClip = new MovieClip();
drawBox(aBox, 0xFFFFFF);
//draw a white box : this is stupid but allows the scroll bars to appear ! ! !
sp.source = aBox;

function loadComplete(event:Event):void {
     trace("Complete");
}

function add_movieClip(url:String) {
     trace(numero);
     var request:URLRequest = new URLRequest(url);
     var loader:Loader = new Loader();
     loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
     loader.load(request);
     var temp_mc:MovieClip=new MovieClip();
     temp_mc.addChild(loader);
     temp_mc.x=numero*100;
     aBox.addChild(temp_mc);
     sp.refreshPane();
     numero++;
}

add_movieClip("movie1.swf");
add_movieClip("movie2.swf");
add_movieClip("movie3.swf");


THIS WORKS, but I think it is quite dirty !

Now the hardest part:

Once Movies are loaded into the scrollpane, is it possible to make them 
DRAGGABLE outside the scrollpane ?
I want people to drag one of this loaded movies on the WHOLE STAGE, not only 
inside the scrollpane !
Any way to achieve this ?

Thanks




_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to