Full screen swf don't auto-size until the browser window is resized

Hi all
I posted my test here at http://www.urbanlinx.com/Test.swf.
I have 4 MCs in the film. A header, content box (Center), footer and background image.
When the browser is set to scale the background will scale proportionally to the widow and maintains its proportions.
My problem: when the clip is loaded first, the background is not resized until the browser to resize manually by the user.
Is there a code I can add that will check the size of the window prior to the loading of the movie?

My code is attached.
Stop();

Stage.scaleMode = "noscale";
Stage.Align = "tl";
Stage.addListener({onResize:reposition});)


function reposition() {}
var header = _root.myHeader_mc;
var bg = _root.image_mc;
var content = _root.myContent_mc;
var _root.myFooter_mc = footer;

var NPOS;

NPOS = getNewPosition (header);
Header._x = nPos.x;
Header._y = 0;

NPOS = getNewPosition (content);
Content._x = nPos.x;
Content._y = nPos.y;

NPOS = getNewPosition (bg);
BG._x = nPos.x;
BG._y = nPos.y;

NPOS = getNewPosition (footer);
footer._x = nPos.x;
footer._y = Stage.height - footer._height;
};

function getNewPosition (mc) {}
var agree = Math.floor ((Stage.width-mc._width) / 2);
var = Math.floor ((Stage.height-mc._height) y / 2);
return to {x: agree, y: Y};
};

reposition();

Stage.scaleMode = "noScale";
Automatic resizing
stageListener = new Object();
stageListener.onResize = function() {}
backgroundResize (_root.image_mc);
};
Stage.addListener (stageListener);
Background resizing
function backgroundResize (image) {}
var imageHeight = 400;
var imageWidth = 700;
var wRatio = Stage.width/imageWidth;
var hRatio = Stage.height/imageHeight;
Report higher
If (wRatio > hRatio) {}
var ratio = wRatio;
} else {}
var ratio = hRatio;
}
Resize
If (Stage.width < = imageWidth & & Stage.height < = imageHeight) {}
image._width = imageWidth;
image._height = imageHeight;
} else {}
image._width = imageWidth * ratio;
image._height = imageHeight * ratio;
}
}
backgroundResize (_root.image_mc);

Special thanks in advance.

PS: If you know a way to do this with a cleaner code, help would be greatly appreciated... If it is already the correct code... Thanks to all the people in the community who taught me :)

Well right after that a whole bunch of tracks and errors as much as I found the resize code is not like code reposition. Tried another code to reposition and its working great. It is also much smoother during resizing.

Here is the code I use. Basically the bottom scales proportionally to the browser window, keeps its ratio and scales of the Center. If anyone has any advice on how to do it more easily if you please drop me a line.

Tags: Adobe Animate

Similar Questions

  • SWF play parameters and size of the browser window

    I'm at the beginning of learning things DW and FL. I have a swf file that I converted to fla format. The swf file is set to loop continuously in read mode, and when he played is displayed in mode full screen. I want to adjust the settings to make it play only once (no loop) and open a specific size on a browser page (for example, half the size of the available window). Sounds pretty basic and should accomplish this adjustment and have not reached this level in my learning again. Any help? Thank you.

    You can put a stop() on the last frame of your main timeline to stop the main timeline of a loop.

    You can click on publish files/settings/html and select 50% x 50% for your size to see if that does what you want for the dimensioning of publish.  You can also use:

    Stage.scaleMode = "noScale";  but test with and without it.

  • Set the size of the browser window?

    Can Muse define the size of the browser window when it opens. It's that I want to resize it to a certain size, when it opens the browser window.  I know you can do it using javascript, but it would mean mucking with html/javascript files after publication. I want to know if Muse can do this for me.

    No, Muse is unable to do so. If it were, it might be "mucking around with JavaScript. And at a very general level, this is just a terrible idea. It's bad behavior and rude users to mess with their office meticulously arranged windows. Or in other words: it is the design of web sites for 10 years.

    Mylenium

  • Images of full size in the browser window?

    Hello


    I have problems trying to replicate a combination of things that I saw on a website (build in Adobe Muse). Web site - www.tatianapavlova.me


    I'm quite new to dream so please bear with me if it's all relatively simple substance. I looked through a few hours of YouTube videos and not managed to get close to an answer to my problem.

    I want to be able to reproduce the scalability of the slideshow, but also have the opportunity to see 'portfolio' of the Web site as soon as I start to scroll from the slide show, regardless of the size, I did my browser window.

    I've included a few screen grabs to illustrate my point a little better that I probably explained above. In IMG1 you will see that my browser window is about half the height of my screen, but as soon as I start scrolling down, I can see the whites of the portfolio section. IMG2 my browser window is almost the size of my screen, but I can still see only the background of slide show of images until I scroll down.

    I guess it's a kind of widget that needs to be added to the page to allow the slide show to do this, however as stated I don't know who he is.

    Once again, my apologies if this is relatively easy, I am new to the program.

    All the advice/help is welcome and appreciated

    Thank you!

    IMG1.jpgIMG2.jpg

    Check out this video for more details:

    https://www.YouTube.com/watch?v=gZI_K1TXqOM

    Thank you

    Sanjit

  • Get div to auto may not resize with the browser window

    I'm trying to get a div with a paragraph of text will resize automatically when the browser window is resized.

    I've seen what happens automatically, when I had no style applied to the < div > tag, but because I have my content centered using a < div > Interior inside a container fixed-width < div >, the inner div is now fixed so despite not having a fixed width.

    Here is the page I'm trying to settle (the box with the text is the < div > inner circle in question):

    http://beta.deltsig.com/about.html

    Here's a test page showing what I want the text to do when the window is resized:

    http://beta.deltsig.com/test.html

    And here's the CSS of the inner divs and container:

    {#div-container}

    Width: 768px;

    text-align: center;

    left margin: auto;

    margin-right: auto;

    }

    .div-redtint-flexsize {}

    padding: 1px 20px 20px 20px;

    text-align: left;

    background-color: #f3e4e4;

    -moz-box-shadow: 0 0 7px rgba (0, 0, 0,. 7);

    -webkit-box-shadow: 0 0 7px rgba (0, 0, 0,. 7);

    box-shadow: 0 0 7px rgba (0, 0, 0,. 7);

    }

    I tried to add different styles of width to the CSS, but nothing had no effect.

    It's a style that I have to change in the container div?

    You cannot have two meanings.  Your page is fixed (px or em based) or liquid (% based).

    A container fixed width parent does everything inside it fixed.

    If you want to try to work with liquid layouts, go to file > New > blank page > HTML > layouts and select one of the liquid patterns from the 3rd Panel.  Creating success.

    Nancy O.

  • Win 8/IE 10: video Flash in mode full screen in dual monitor; video freezes on the second monitor

    All,

    At the launch of a Flash video in full screen when you are using two monitors, the video freezes at a still image on the second monitor. This happens in mirror and screen extended mode images.  The video continues to play normally on the first screen, and the audio continues normally as well.  This problem appears only during playback of the video using Internet Explorer, do not not Firefox.

    This seems to be a software problem, not memory or devices.  To be clear, the video is not stutter. rather, it freezes at a still image. I didn't have this problem using internet explore with the same configuration until I upgraded my laptop Windows 8.

    Here is my configuration:

    Windows 8. Internet Explore 10.

    Shockwave Flash Object: 11.6.602.167

    ASUS laptop computer connected to a HD LED TV via HDMI.

    GeForce GT650M graphics card.

    Core i7 and 8 GB of RAM.

    You think, what is happening? Troubleshooting ideas? Thank you.

    I just gave it a try on my setup triple monitor, but could not reproduce the problem.  I tried both stretching and duplicate the work stations, but they all work as expected.  If Firefox works well, then I wouldn't suspect your video driver but it is probably useful to take a look without worrying to do of course, you have the latest driver installed.  Then, try to temporarily disable hardware acceleration to see if that makes a difference.

    How to disable or enable hardware acceleration?

    http://support.Microsoft.com/kb/2528233

    Using IE in desktop mode or modern/metro?

    Thank you

    Chris

  • changing screen size of the browser fitt?

    Hello
    I exported my swf with fetch, but my index file appears to be encapsulated in a white
    a resident inside the browser window. How can I change that so it fitts full screen. ?
    Thanks a lot for help
    still to learn!

    you will find in the html file that incorporates your swf file:

    change the following line:

  • My apple tv has been full screen but suddenly black bars apears on the side, how can I get full screen again?

    My apple tv has been full screen but suddenly black bars apears on the side, how can I get full screen again?

    Post a picture of your screen and the model number and brand of your TV.  Sounds like a TV problem.

  • How can I insert images of full-width that reach until the edges of the browser window?

    I would like to insert pictures full-width that reach until the edges of the browser window. When I try to do and break the boundaries of the image to the absolute limits of the page in edit mode, you can push the image back to the borders of the body in preview mode.


    I can do rectangle normal blocks full-width, but no pictures.

    Who can help me?

    1. Create a box, and then click the '100% width' along the menu bar icon to define your area to scale to the width of the browser.
    2. Import an image in the box using the parameters shown in the second picture,

  • Setting the default size of the popup window

    I need a way to set the default size of the popup window on a specific area or all areas (whichever is easier). There is a particular site that pulls up a PDF in a pop-up window, and always default to a small window, but I need full screen. Apart from the obvious 'simply click on the button full screen every time ", can someone offer me some suggestions? If it were me, I'd just hit the button fullscreen, but I'm trying to set it up for some end-users rather capricious. The device in question (if important) is a Tablet from Dell XPS 18, and the version of Firefox is 24.0, just installed about twenty minutes ago. Forums for research, the only thing I found remotely close to what I'm looking for is to force the popup to allow resizing; This isn't what I need; the pop-up window already allows resizing. I need a way to automatically open it full screen. Thanks in advance for your help.

    Where the tab setting you are interested in I mentioned, the method to define who is in this previous post: https://support.mozilla.org/en-US/questions/968159#answer-469644

  • How can I keep centered slidshow regardless of the size of the browser

    I have a slideshow with 40 images stretched right to 8850.  I basically want to pin it but does not lose the left to right scrolling of the miniature container.  How can I do this?

    Currently floats slideshow when you change the size of the browser and will cover the header.  I want to keep it centered on the page regardless of the dimensions of browsers

    Any help would be appreciated with gratitude!

    Thank you!

    I checked out the site you mentioned, not exactly the same thing you mentioned (like the one you described is more reactive behavior), but you can go full-screen with slide show.

    Where the images will be suitable for all sizes of screens. I suggest to try, create a new site and then check with the images in the slide show full-width.

    Thank you

    Sanjit

  • The browser window does not whole screen, despite the actual program in doing so.

    At one point, I opened FF and the browser window has stopped picking up full-screen. The program actually fills the screen, but the current browser window has some sort of right margin. Do a right click in the right margin produced no popup menu. Browser currently looking like such http://i.imgur.com/8pgtE.jpg. I tried closing, closing force and the PC restarts and does not return to normal. No plug in installed, however cannot be certain it did not update, although in my view, that none has.

    Found my culprit. Whitespace Remover for plugin Google more recently updated course. I disabled v1.28 and everything went back to normal

  • The content inside the af: showDetailItem not vertically stretched to adjust the size of the browser

    Hello

    The structure of my page is as follows:

    < af:panelTabbed id = "pt1" dimensionsFrom = "disclosedChild" styleClass = 'AFStretchWidth AFStretchHeight' > >

    < af:showDetailItem id = "sdi1" styleClass = "AFStretchWidth AFStretchHeight" >

    < af:panelStretchLayout id = "pgl21" styleClass = "AFStretchWidth AFStretchHeight" >

    < f: facet name = "center" >

    < af:panelGroupLayout id = "pgl1" layout = "scroll" >

    ........ (content)

    < / af:panelGroupLayout >

    < / f: facet >

    < / af:panelStretchLayout >

    < / af:showDetailItem >

    < / af:panelTabbed >

    If the size of the browser's 1936 X 1056, the content inside the component - panelGroupLayout is not the size of the full browser and it seems that it does fit for 1024 X 768 size of the browser.

    How to create content to occupy the size according to the size of the different browser?

    Thank you!

    Susan

    Susan, she doesn't look like you have given to your disposal. I see the problem could well be the surrounding container facet "contenseStretch." There you have a layout of the Group Panel in scroll mode. This container does not stretch its children.

    Try my or your sample (the stuff of Panel tabs) in a new page in the facet of the center of a provision of the expandable Panel or a set of tie of available grid 100%.

    See if it works then.

    Timo

  • Stage size: scale to FILL in the size of the browser

    Hello

    I want as the adapted Web page.

    I know that there is a checkbox sensitive scaling in EA

    but it is a PROPORTIONAL scale or scale-To-Fit, that I don't want.

    the <>size and the size of the stage must be equal to the size of the browser.

    Can someone let me know the scale of the scene to fill the width and height of the browser?

    Maybe you need to rephrase your question a bit because it doesn't have much sense.

    The sensitive scale checkbox dimensionnera step to fill the browser width and height - have you tried to adjust this value to the width / height / both?

    Or maybe you want to really scale all you just want to use the calculated percentages sizing and positioning to make your sensitive project without scale?

    like this: do a Responsive Web Design with edge animate - YouTube ?

  • Adjust the width of the image and position automatically with the size of the browser.

    Hi, I am trying to place an image on the left edge of the browser window, and the width of the image is 50% the size of browser window. Similar effect can be found on this Web site. Lenzing Instruments

    Note that, like the browser zoom out, the image is half of the width of the browser window and align the right edge of the browser.

    I am new to Muse. Not sure if it is possible to achieve this effect in Muse. I know that Muse adjustable width 100% image browser window, but how about 50%, 75% of the other user-defined proportion?

    Any help will be appreciated!

    By saying that I mean that you can use the features available where pine will set the location of the content, full-width makes the background or the flexible content with edges of browser. Not all items will be covered to significant effect.

    Thank you

    Sanjit

Maybe you are looking for