I'm importing SWF created in CS5 Flash Professional. I have a nice animation with various objects that fly in and out fo the visible area in Flash. The SWF file plays correctly in Flash player, in an HTML, etc.
The problem - when I import the SWF into FLEX using SWFLoader - the objects outside the visible stage area come into view. I completely loses the intent of the animation.
Need: Need the imported content to just display the visible stage area like Flash Player, etc.
Have been trying to look at Explicit Height, With, Scale. So far no luck.
Have been reading forums and saw where someone is trying to put SWFLoader in a Canvas and than mask the Canvas display.....no luck yet.
I'm sure this is a common task and I'm probably getting hung on a common error.
Thanks to anyone who knows for sharing what the source of the problem is and how to fix.
SWFLoader just checks the bounds of the root movieclip so it will pick up things normally off-screen. I would think the Canvas trick would work. Position the SWFLoader so the top-left of what you want to see is at 0,0 in the Canvas, then size the Canvas and it should clip the bottom right. You’ll probably have to set horizontalScrollPolicy and verticalScrollPolicy=”off”.
Thanks for taking the time to respond.
The mask approach does seem to work. When I was testing, I had the elements spread out to observe behavior.
For the mask to work the Canvas (or similar containers) must be superimposed positionally.
Make sure the mask container appears on top of the other content. The mask object needs the
background color set to something like black so the mask knows what to do.