Looks like I can add a mask to my SWFLoader so at least its contents are restricted to the area I want.

        public var myLoader:SWFLoader = new SWFLoader();
        public var rect:UIComponent = new UIComponent();

        private function init(e:Event):void{
                rect.graphics.beginFill(0xFFFFFF);
                rect.graphics.drawRect(0, 0, 786, 194);
                rect.graphics.endFill();
                this.addChild(rect);
                myLoader.mask = rect;
                this.addChild(myLoader);
        }

Still get annoyed by the stage being the whole flex application though.
Any idea ?
Should I change my swf by not using any Stage object ? If then how ?
How can I restrict mouse positions to just the size of my SWFLoader ?

Gonna give up pretty soon i guess.


On Apr 25, 2007, at 4:59 PM, smazurek wrote:

Sorry, beginner's post.

I'm loading a flash 8 swf into my flex app, through SWFloader or image
components, that plays with stage and mouse position. (basically moving
textfields around depending on mouse position)

Problem is, once in flex, its stage looks/is? shared with flex one, ie
my textfields are all over the place, way beyond the SWFloader or Image
components I loaded it into.

In other words, _root._xmouse and Stage.width in my swf actionscript 2
now refer to the whole flex app. How do I load an "independant" sfw ?

Thanks!
Stan




Reply via email to