Resize loaded SWF to paste into canvas

a.fla - 500 x 300. Inside, the content moves from the 500 x 300 level so that it looks like it is hiding or moving away from the screen.

.fla did ... loaded into Flex via SWFLoader:

<mx:Conainer width="500" height="300">
       <mx:SWFLoader width="100%" height="100%" />
</mx:Conainer>

The downloaded .swf file is displayed outside the 500 x 300 container in Flex.

How can I get it so that only what is inside the container is visible?

+3
source share
3 answers

Ok, I figured it out.

<mx:Canvas id="swfHolder" mask="{maskCanvas}">
        <mx:SWFLoader id="swffer" scaleContent="true" />
</mx:Canvas>

<mx:Canvas id="maskCanvas" backgroundColor="#000000"/>

"mask". , , "", backgroundColor. :

+1
<mx:Conainer width="500" height="300" clipContent="true">
       <mx:SWFLoader width="100%" height="100%" />
</mx:Conainer>

"clipContent"

Flex Canvas:

clipContent: Boolean [-]

, / . false, , . true, .

clipContent false, , . clipContent , , . . HorizontalScrollPolicy verticalScrollPolicy.

0

use scaleContent="true"in tag SWFLoader .

0
source

Source: https://habr.com/ru/post/1713877/


All Articles