Topic: resize listener

Hello,

I am trying to embed simple viewer into my site, however I am having problems getting the viewer to resize with the listener. I copy the embed code from the example (minus the buttons, their functions and listeners) and into my site and the listener breaks. It works in the example file, but not in mine. if I change it so in the listener it resizes mcLoader, instead of mcLoader.mcFrame the viewer freaks out and shrinks. Any ideas?

Re: resize listener

SimpleViewer requires StageScaleMode.NO_SCALE and StageAlign.TOP_LEFT. If you wish to embed SimpleViewer Pro in a container movie, then you must modify the loading SWF to work with those parameters.
Please see the resize code (the 'onResize' function in the example .fla file from the SimpleViewer Pro download package - 'simpleviewer_pro_213/examples/flash_embed/simpleviewer_flash_embed.fla') to see how to handle resizing with these parameters set.
For reference, the 'Embedding in Flash' section of the 'Embedding SimpleViewer-Pro' support page can be found here: http://simpleviewer.net/simpleviewer/pr … html#flash

Steven Speirs
SimpleViewer Support Team.

Re: resize listener

I have looked at those files. Heres the problem. When I copy the action script from the example, where it resizes correctly and has no errors, and paste into a new fla with a movieclip on the stage called mcLoader. It no longer works.

The error I get is:
TypeError: Error #1010: A term is undefined and has no properties.
    at Untitled_fla::MainTimeline/onResize()[Untitled_fla.MainTimeline::frame1:120]
    at Untitled_fla::MainTimeline/frame1()[Untitled_fla.MainTimeline::frame1:111]
SecurityError: Error #2000: No active security context.

which referencess to the these lines of as:

mcLoader.mcFrame.width = stage.stageWidth - mcLoader.x - 20;
mcLoader.mcFrame.height = stage.stageHeight - mcLoader.y - 20;

I have checked to make sure the new fla has the same publish settings,flash version,as version,etc.

Re: resize listener

I figured it out. Didn't realize there was another movie clip inside of mcLoader called mcFrame.

Re: resize listener

I'm glad you have resolved your problem. Thank you for posting back to let us know.

Steven Speirs
SimpleViewer Support Team.