Cannot Get 3-Level "stagescale" Sequence Correct

  • Hi Folks,

    I need to be able to achieve two things:

    1. Open a tour in 3 different window sizes and have the interface automatically scaled at the correct size
    2. Resize the browser window and have the interface responsively scale to those same 3 different sizes

    The problem is I'm getting an irritating "flickering" between the middle and smallest sizes when I drag the browser window between these two thresholds.

    Here's the relevant code:


    Code
    onstart="startup();checkReso();">
    
    
    <events onresize="checkReso2();checkReso1();checkReso();"/>	<action name="checkReso">if(device.html5 AND stagewidth LT 400,set(stagescale,0.5));</action> <action name="checkReso1">if(device.html5 AND stagewidth LT 640 AND stagewidth GE 400,set(stagescale,0.7));</action> <action name="checkReso2">if(device.html5 AND stagewidth GE 640,set(stagescale,1),set(stagescale,0.5));</action>

    ---
    The interface smoothly resizes between the 640+ (biggest) version and the 400+ (middle) version, but between 400+ (middle) and 400- (smallest) it flickers.

    I really struggle with sequence logic so any help here, as ever would be hugely appreciated! Happy to have any other feedback on the above code and execution here.

    Thanks,

    Malcolm

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!