This is my prob: :ponder:
I want to load swf into a scrollpane. I use this code but I have
some problems:
This code places a scrollpane on the stage. Is there a way to already
have a scrollpane on the stage and just change its content from actionscript? That would solve my other problem: having one scrollpane
over another - I want to replace its contect, not having another over it-
that’s what this code does)
I hope what I’m saying makes sense to you :puzzle:
[COLOR=darkred]newsbtn.addEventListener(
MouseEvent.MOUSE_UP,
function(evt:MouseEvent):void {
[/COLOR]
[COLOR=darkred] import fl.containers.ScrollPane;
var [/COLOR][COLOR=darkred]url:String[/COLOR][COLOR=darkred] = “news.swf”;
var aa:MovieClip = new MovieClip();
var bb:Loader = new Loader();
bb.contentLoaderInfo.addEventListener (Event.COMPLETE, completeHandler);
function completeHandler (e:Event)
{
var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.setSize (320, 240);
myScrollPane.move (10, 10);
myScrollPane.source=aa;
addChild (myScrollPane);
}
bb.load (new URLRequest(url));
aa.addChild (bb);
}
);[/COLOR]