Flex: Impossible to resize the external loaded SWF's content

前端 未结 3 689
甜味超标
甜味超标 2021-01-14 02:30

I have an application where I try to load an external SWF. So, we have:

  • My application: The Stage\'s dimensions are 768x1280. ScaleMode = EXACT_FIT.
3条回答
  •  抹茶落季
    2021-01-14 02:55

    I don't think the issue is with your ScaleMode. There can only be one Stage per flash player. The "stage" property of your 'external' SWF references the Stage of your 'application' SWF after it's added to the display list. If the SWF is loaded and not added to the display list, the loaded SWF's 'stage' property will equal 'null'. Setting the stage scaleMode inside your external SWF won't dictate how it scales once loaded into another SWF.

    Also, you're probably resizing the SWFContainer, not the SWF itself...thats why the SWF width and height properties are always 800x600. I'm not sure if this is what you're asking for, but from what I'm understanding, you may need to create a stage resize event listener.

提交回复
热议问题