• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Flash / Chrome / ScaleMode

New Here ,
Jun 12, 2015 Jun 12, 2015

Copy link to clipboard

Copied

It seems that in a recent release of Chrome (we're not yet 100% certain which build yet) there has been a change in the way the ScaleMode property of the stage is respected. Some of our content is set to StageScaleMode.NO_SCALE which (in the past and on all other browsers) prevents scaling of the content but will change the values of stageWidth & stageHeight. Now it appears as though Chrome scales EVERYTHING and our stuff is getting quite distorted (e.g., increasing magnification now results in a smaller stageWidth & stageHeight but larger interface items).

Has anyone else noticed this?

Cheers,

r o b

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 12, 2015 Jun 12, 2015

Copy link to clipboard

Copied

Hi Rob,

I suspect this is due to a change with Flash Player 18 that effects PPAPI and ActiveX versions of Flash Player. What's the zoom factor for Chrome when this occurs?

  • Browser Zoom Factor for PPAPI Plugin and non-Win 8x ActiveX

We've introduced a feature that proposes scaling of Flash content in the web browser in response to web page zoom factor change. This feature was already present for Internet Explorer on Window 8.x.  In Flash Player 18, it now supports PPAPI (Opera and Chrome) and Internet Explorer on Windows 7 and below.

Originally added in Flash Player 15 for Windows 8.x

  • Improved support for browser zoom levels - Windows 8

Flash Player now has improved support for browser zoom factors other than 100% on Internet Explorer on Windows 8.x.  Devices, like the Microsoft Surface tablets, default to a zoom level of 150%.  In the past, this could cause problems with Flash Player and some 3D content.  With our new implementation, we can now scale the content and 3D buffers to keep everything aligned.  In addition, Flash Player introduces an option to render to an increased Stage3D back buffer, rather than scaling, on browser zoom to keep the resolution of the rendered content high. This option allows to the stage3D buffer to change in size in synch with the change in the browser zoom factor.  Developers are notified of this change with a new ZOOM_FACTOR_CHANGE event.

For additional detail, please see the article Improved Resolution of Stage3D Content on Browser Zoom

Thanks,
Chris

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 14, 2015 Jun 14, 2015

Copy link to clipboard

Copied

Hi Chris,

I'm not 100% certain what you are asking me wrt Chrome...can you clarify?

It sounds like the behaviour I'm seeing may be more feature than bug. Can you confirm that StageScaleMode.NO_SCALE is no longer intended to prevent scaling of Flash content? If so we will need to seriously (and quickly) rethink our approach. We have 2 very popular games that are having serious issues at the moment...

BTW, we are NOT using Stage3D.

Regards,

r o b

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 15, 2015 Jun 15, 2015

Copy link to clipboard

Copied

Hi Rob,

Browswer Zoom factor feature, is intended to support the scaling with respect to zoom value for flash contents (swf) with StageScaleMode.No_Scale mode.

Is that what you are asking?


Thanks,

Kratika

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 16, 2015 Jun 16, 2015

Copy link to clipboard

Copied

Hi Kratika,

I understand that you are intending to support the browser's zoom factor feature. There are a few issues:

1) StageScaleMode.No_Scale was intended to *prevent* any scaling of the stage (according to the documentation)

2) Before v18 of the Flash Player, StageScaleMode.No_Scale did prevent the scaling of the stage in all browsers (so this is new behaviour)

3) The intended new behaviour does not occur in all browsers (creating an inconsistency)

Where we are seeing the most problems with the new behaviour is when the width & height of the swf are set to 100% inside of a daughter window that can be dynamically resized. It has been critical for us to be able to change the dimensions of the stage, have those changes reflected in stage.stageWidth and stage.stageHeight, and then have our unscaled content dynamically spread itself over the resized stage. With dimensions set to a percentage, we can't even use currentStageWidth / originalStageWidth to determine the amount of scaling that has been applied.

Contact me privately and I can supply you with a URL that demonstrates the issues we are seeing.

In conclusion, i believe that StageScaleMode.No_Scale should be preventing scaling in all cases and ignore the browser's zoom factor (there are 3 other settings for StageScaleMode that should be sufficient to dictate how Flash content renders when zoomed). At the very least, the current implementation is not consistent across browsers - which I would consider as a bug, and in those browsers in which it does work runs counter to the StageScaleMode.No_Scale documentation (which would require a documentation update).

Cheers,

r o b

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 16, 2015 Jun 16, 2015

Copy link to clipboard

Copied

...just wanted to add one more detail. I *could* work around this issue by doing the following:

- detect the actual window width in Javascript accounting for zooming (not easy to get a cross browser solution, but something like window.innerWidth * window.devicePixelRatio)

- get a ratio by dividing the stageWidth by the windowWidth

- setting the scaleX & scaleY of the root MovieClip to this ratio

It's a messy solution and requires interaction with Javascript (which I would rather avoid).

r o b

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 16, 2015 Jun 16, 2015

Copy link to clipboard

Copied

Hi rob,

As you said that current implementation doesn't work consistent on all browsers, can you share the behavior difference of different browsers you are checking this issue on.

Browser Zoom Factor feature is currently not supported on Firefox.

Thanks

Kratika

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 16, 2015 Jun 16, 2015

Copy link to clipboard

Copied

Hi Kratika,

I am aware that the implementation is limited to the PPAPI Plugin (Opera/Chrome) and non-Window 8.x ActiveX (IE), however since our players use a variety of browsers they are seeing very different behaviour from one browser to another. The entire joy of working with Flash is that we have a degree of independence from the browser, and now our content is behaving in VERY different ways due to this change. On browsers where the Browser Zoom Factor is not supported (e.g., Firefox, Safari) we are seeing the expected behaviour where content set not to scale doesn't and the stageWidth and stageHeight are resized accordingly with the window dimensions and browser zooming is effectively ignored. I'm not sure how else to describe the differences. As mentioned, I can provide you with a url to test on (Chris Campbell has it and can share it with you). I can see how being able to scale with the browser might be interesting in many cases, but we already have scaleModes that allow for that. NO_SCALE should mean exactly that - do not scale the content.

Cheers,

r o b

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 16, 2015 Jun 16, 2015

Copy link to clipboard

Copied

Hi Rob,

We're also discussing this internally and we will get back to you here and via email once we have additional information.  That said, you make a good point about parity.  This feature is currently on ActiveX and PPAPI at this time.  We expect to bring this to NPAPI once the browsers (Firefox in particular) have implemented the support we require.  We'll make sure to give plenty of heads up on our beta channel so I'd recommend testing against that when you can.

Thanks,

Chris

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 16, 2015 Jun 16, 2015

Copy link to clipboard

Copied

Hey Chris,

Thanks for the update. It does seem that the intention is for Flash content to respect the zoom level set by the browser. I'm not opposed to this in principal, but need to spend some time thinking about how to adjust the functionality of some of our content to accommodate for this. Presently it's proving to be a bit of a messy affair, and it doesn't help that there seems to be no truly bullet-proof way to get the true dimensions of the stage without employing an overly convoluted (and I would have hoped unnecessary) set of tests to see which browser and which plugin we're playing in.

I know I'm being a little repetitive here, but I still feel that setting our content to NO_SCALE should have the expected effect...that it does not scale.

I look forward to any developments you can share.

Regards,

r o b

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 17, 2015 Jun 17, 2015

Copy link to clipboard

Copied

LATEST

One quick follow up on this...

I spent quite a bit more time trying to work out a good solution to restore the functionality we need and I thought I would post it here for the sake of completeness. I have a better understanding of what you tried to accomplish with this feature - but my overall conclusion is that what we really need is an additional ScaleMode to provide for the functionality you implemented (e.g., BROWSER_SCALE). NO_SCALE should do as it always did, leave the content in its original resolution regardless of browser settings.

The solution, which we limited to v18 of the Flash Player (detectable through Capabilities.version) and affected browsers (detectable through ExternalInterface.call("window.navigator.userAgent.toString")) is to catch both Event.RESIZE and Event.BROWSER_ZOOM_CHANGE. To restore the scaled stage to its original resolution you implement the following: scaleX = scaleY = 1/stage.browserZoomFactor. To get the unscaled width and height of the stage you do the following: w = stage.stageWidth * stage.browserZoomFactor, h = stage.stageHeight * stage.browserZoomFactor. The remaining step involves accommodating for scaled mouse events which will need to unscaled by multiplication with stage.browserZoomFactor.

Cheers,

r o b

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines