Topic: Embedding into Flash: Tiltviewer Pro rescaling whole site :(

Hi,


I've built a website in Flash AS3 and have embedded the Tiltviewer Pro for the Gallery's page. Everything seems to be working fine (including the Unload option) EXCEPT Tiltviewer resizes my whole site upon viewing the Gallery page and re-aligns everything!

Is there anyway around this? All I want to do is to be able to open Tiltviewer Pro on a Gallery page that doesn't alter anything else in the way my site looks (including 100% view and alignment)


I was due to launch this site yesterday but I've been struggling to solve this problem!

HELP!


Thanks in advance,

Dan

Re: Embedding into Flash: Tiltviewer Pro rescaling whole site :(

Loading TiltViewer-Pro sets the shell SWF to use top left alignment and no scale. For n example of resizing using these settings, check the Flash Embed example actionscript.

Felix Turner
SimpleViewer Support Team.

Re: Embedding into Flash: Tiltviewer Pro rescaling whole site :(

Loading TiltViewer-Pro sets the shell SWF to use top left alignment and no scale. For n example of resizing using these settings, check the Flash Embed example actionscript.

The test site is here:
www thesummerslam com/showdown/vlvshowdown html

As you can see, the whole site resizes/re-aligns when you click on the "Gallery" image in the bottom right of the screen

Sorry for the stupidity, but which part of the code do I need to amend?

This bit?
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_RIGHT;
       


Or this bit?
stage.addEventListener(Event.ENTER_FRAME,resizeTiltViewer);
function resizeTiltViewer(e:Event){       
    //example tiltViewer size and position values
    var tvWidth = stage.stageWidth/2;
    var tvHeight = stage.stageHeight/2;
    var tvX = stage.stageWidth/4;
    var tvY = stage.stageHeight/4;       
    ldr.x = tvX;
    ldr.y = tvY;
    var tiltviewer = Object(ldr.content)._app;
    if ( tiltviewer != null){
        tiltviewer.autoSize = false;
        tiltviewer.setSize(tvWidth,tvHeight);
    }   
}

Re: Embedding into Flash: Tiltviewer Pro rescaling whole site :(

Not to worry, ran out of time with that project so had to build a simple 2D gallery at last minute instead...


On the plus side I can now use Tiltviewer for another project (which will be HTML + Flash so it should be drama free!)