ActionScript 3.0 :: External SWF Scaling Relating To Window Resize?
May 23, 2010
menu_mc.about_btn.addEventListener(MouseEvent.CLIC K,aboutClick);
function aboutClick(e:MouseEvent):void {
removeChild(loader);
var about:URLRequest = new URLRequest("demo1.swf");
loader.load(about);
addChild(loader);
[Code]....
View 3 Replies
Similar Posts:
May 23, 2010
I am trying to scale external swfs to the window size that exists at the point when the button is clicked. The external swf is being loaded into a dynamically created mc in the main swf. I am using a resize handler and the issue i am having is that all external swfs only become veiwable when the window is resized. After the window is resized, they become viewable and scale on the resizing of the window. I call the resize handler to upate the scale base on the window size but to no avail.
The AS (3.0) that I am using can be seen below.
ActionScript Code:
stop();
var Xpos:Number = 0;
var Ypos:Number = 0;
[Code].....
View 0 Replies
Apr 10, 2010
How come my content isn't scaling when I resize the player window (see attachment)?
View 2 Replies
Mar 11, 2008
I've search through all the threads with "scaling" and "resizing" and can't find the solution.
Basically I have a GUI element on a gallery that I don't want to scale, while the rest of the page is free to resize/scale.
I think I need to add a listener of some sort to the stage, but I'm not sure how to do this.
View 2 Replies
Mar 8, 2010
I'm trying to load a local SWF Application in my Air Application via the SWFLoader class. The SWFLoader class is displayed in a new Window. Therefore, i'm trying to resize the window automatically, when the Flash Application is resizing. But here's the problem. The SWFLoader does not get any events when the loader App has been resized.
The Problem seems to be the Sandbox Restrictions. I'm able to call methods in the childSandboxBridge and parentSandboxBridge Objects that i've set in the LoaderInfo of the SWFLoaders content (the loaded SWF Application). But i cannot listen to any ResizeEvents or something like that when i'm resizing the loaded App.
View 2 Replies
Jan 4, 2009
I have a main movie here that loads in an external swf through a container mc. everything is aligned and positioned to where it should be, and they are also set to that value onresize. the problem is, when my swf is loaded in, it works fine and is in the right position, same when you resize it. BUT, if you resize the window before the swf is loaded, it misaligns, until you resize!!
View 2 Replies
Mar 15, 2012
The problem is: i have a flash movie (*.swf) 1280w x 640h,, and & want to remove the resize function, i mean block the window from being bigger window. i actually set a noscale function that is working on content, but the problem is with the window..... my code for nonscale is now:
[Code]....
View 4 Replies
Jun 10, 2011
Essentially I'm building an application in Flash, just for the fun of it really. Upon the initial design it was just a static size, now however I've been working on making it completely resizeable (with the original size as the minimum). I've done this on most of the screens correctly. However on the main screen I have several components. All custom built MovieClips basically, and inside these are more MovieClips, and inside those are even more movieclips.
For my question, I'm going to be using a button as my example. I created a button movieclip with a resize function to call after I change the size of it. So it works like this:
ActionScript Code:
buttonMC.width = 200;
buttonMC.height = 150;
buttonMC.resized();
Now this button is inside of another movieclip which is designed to just house a group of similar movieclips. (this structure is not changable; several hundreds of lines are code are specifically designed around it). How to get our button's width from the root timeline, we'd do this:
ActionScript Code:
trace(housingMC.buttonMC.width);
Now, when this frame gets resized, the resizing script changes the width height of the housingMC. Something like this: (not a working example)
ActionScript Code:
//resize listener {
housingMC.width += stageWidth - oldStageWidth; //width difference
housingMC.width += stageHeight - oldStageHeight; //height difference
And the housingMC changes to the correct size in the correct position of the screen.
[Code] .....
View 7 Replies
Jun 30, 2007
how do I code stage resize with scaling movieclips? I can do stage resize and position/scale movieclips relative to stage size..but i don't how to have a scalable movieclip retain its scale relative to stage size. how do I code this? for example, i have a movieclip originally 50px wide, and the stage 100px wide..when i click the mc, it scales up to 80px wide. and when I resize the stage to 50px,(50% of stage size) i want the mc to scale to 40px too(50% of mc size).. and when I click it again to restore to it's original size, i want it to scale to 25px(50% of original size). then finally when i scale the stage back to 100px, the mc again is 50px wide.
View 2 Replies
Apr 8, 2010
i've been running into weird problems regarding Senocular's Layout Class. It's a nice little framework to align and scale objects in a fluid layout, though.Some images in the background (currentContainer) don't resize all the way to fit stage's height, and sometimes they get really small in a corner.[code]each time the currentContainer mc gets a different bitmap images (with varying dimensions) on it, it gets assigned to bgLayout , whis is added to the stageLayout.actually, do I need to do that ? Or maybe I should remove bgLayout from stageLayout before assigning it again?[code]
View 2 Replies
Mar 4, 2010
I have set a movie clip with instance name if "body" to resize automatically based on the size of the browser window using:
body._x = Stage.width / 2;
body._y = Stage.height - 44;
body._height = Stage.height - 149;
body._width = Stage.width-20;
(that code may not actually have any relevance?)
What I'm wanting to happen is that when the "body" movie clip changes size, I want the objects within it to be scaled proportionally (keeping the x:y ratio the same). The result that I'm wanting will result in the contents (as a whole) being proportionally scaled to the height (because it will always be the smaller dimension in my case) of the current size of the body mc.
I've uploaded my .fla so you can see what im working with. The red square is the body that i've managed to scale but I have not yet added anything within it. (I have tried but it's contents distort when the body is resized)
View 1 Replies
Aug 1, 2007
I want a flv to fill the browser. I am using this code:
Code:
Select allStage.align = "TL";
Stage.scaleMode = "noScale";
Stage.showMenu = false;
var timeline:MovieClip = this;
var _minW:Number = 320;
var _minH:Number = 240;
[Code] .....
It works perfectly as written. It scale the movie on resize perfectly and retains the proportions of the video. It doesn't fill the browser completely though when the proportions arent correct(leaving bars or the background color on the sides or top and bottom). I want it to scale proportionately, but fill the browser, so effectively some of the movie will be cut off.
View 6 Replies
Mar 16, 2012
I am looking to create an animation (perhaps frame by frame) that corresponds with the coordinates of an object. Specifically, I want to have a draggable object's coordinates (locked to the x-axis) indicate where the playhead of a specific movie clip should be. In other words, let's say that I have a 100px wide stage and I want each px location of an object on that stage to correspond to a particular frame of a movieclip. In concept, I feel that it should be as easy as loading an objects coordinates into a variable, then passing that variable on with a simple math equation, adjusting it for movieclip length... but right about then my brain gets fried. Finding out how to lock a draggable object to the x-axis has been pretty easy, but from there I'm stumped. I'm not particularly well versed in AS3 but I do like to think I understand the concepts.
View 1 Replies
May 11, 2010
i am creating flex 3 component when i re size the window i need to re size the labels and text.how to do this?
View 1 Replies
Feb 22, 2009
I have a flash document with movie clips in it that i want to scale depending on the monitor or window size. it looks great on 1024 x 768.....but not on small laptops
View 6 Replies
Feb 14, 2012
I have a project that's 1024x768. However, on screens with a resolution of 1024x768, the users still have to scroll (the project is too big to fit in the browser window). Is there a way to allow scaling of the project only if it's too big for the user's window? I don't want the project to always scale to fit the window size. I only want to scale it down if it's too large to fit on screen without scrollbars.
View 10 Replies
Oct 30, 2009
I'm using the code below to scale my main movie with the browser window.What happens is that the images in the movie are baldy distorted ..Can I preserve the images to scale or at least can I scale them with a different scale?I'm using CS3 ,AS2 and Flash Player 9
Code:
// ***Stage aligned top left
Stage.align = "TL";
// *** stage scaling with the browser window.
Stage.scaleMode = "Scale";
[code]....
View 9 Replies
Sep 20, 2004
I'm using the textArea component, but i want to scale it to the size of the browser window. The problem is it scale the content(xml+css) and the scrollbar, and i want to just change the size. I've also tried to attach the Component and then setting the size, but that give the same problem.
View 3 Replies
May 7, 2005
I am trying to scale a background image to the size of the browser window. For some reason it does not fill the entire stage?
Stage.scaleMode = "noScale";
Stage.align = "TL";
background_mc._width =Stage.width
background_mc._height =Stage.height
background_mc.onResize = function() {
background_mc._width = Stage.width
background_mc._height = Stage.height
} Stage.addListener(background_mc);
View 1 Replies
Oct 10, 2011
I have a swf which embeds around 40 various png and fxg objects using the embed metatag... eg.:
public class OneOfMyEbeddedAssets
{
[Embed(source = "./assets/OneOfMyEbeddedAssets.png")]
[code].....
View 1 Replies
Oct 19, 2011
I'm writing a web based flash app that's written entirely in AS3. I have objects on the screen as part of a GUI. I would like the user to be able to resize the window, or make it full screen. I would like everything to auto-scale with the resize, but also remain in the same relative position on the stage.
View 1 Replies
Feb 12, 2010
I am trying to achieve the resizing effect as seen on [URL]There is no distortion no matter what direction the browser window is resized.
View 1 Replies
Jul 29, 2011
I'm trying to run my swf by going directly to it on my serer eg(www.example.com/mySWF.swf), later I will embed it using HTML or PHP, however Im wondering why it keeps getting resized to the window size, I want it to stay the size of the swf. In the publish settings I set dimension to Match Movie, and I set scale to No Scale in the HTML tab of publish settings, am I doing something wrong or can you not have it stay its original size without emedding it into html?
View 5 Replies
Apr 2, 2010
So I've noticed Windows 7 has a disturbing tendency to prevent you from dragging the title bar of windows off the top of the screen. If you try - in this case, using an air app with a draggable area at the bottom of the window, allowing you to push the top of the window up past the screen - it just kicks the window back down far enough that the title bar is at the top of what it considers the 'visible area.'
One solution would be to resize the app window as it moves, so that the title bar is always where windows wants it. How would you resize the window while you're dragging it, though? Would you do it like this?
dragHitArea.addEventListener(MouseEvent.MOUSE_DOWN, function(e:MouseEvent):void{
stage.nativeWindow.height += 50;
stage.nativeWindow.startMove();
stage.nativeWindow.height -= 50;
});
see what's going on there? When I click, I'm doing startMove(), which is hooking into the OS' function for dragging a window around. I'm also increasing and decreasing the height of the window by 50 pixels - which should give me no net increase, right?
Wrong - the first '.height +=' gets executed, but the '.height -=' after the .startMove() never runs.
View 3 Replies
Feb 19, 2009
Normally the user can resize the swf window when it is playing on flash player. I want to stop the user to resize it. It is possible when we use 'fscommand("allowscale", "false")'. I dont know why it is not working for me. Did i use the script wrongly or do I need to do anything in somewhere?
View 1 Replies
Jul 29, 2009
I have been scouring the net for some answers on how to get a swf to automatically resize to fit all browser windows (resolutions)...
I found one javascript [url]... that is meant to do this, but I havent had any luck in getting it to work.
View 2 Replies
Oct 26, 2003
the allow scale only disables scaling of the content..can we actually disallow scaling of the window that plays the projector file ?I want it at a fixed window of 800x600 projector...and set it to the centre...
View 3 Replies
Oct 28, 2007
What I've got is a fla with some window resize code in it, and another fla that is linked to from the window resize fla, so basically when the window is resized the loaded swf eases back to the center. This works fine if all the content of the loaded swf stays within the boundries of the swf... BUT... if I place a scroller in the loaded swf then when the window is resized the loaded swf moves upwards and to the right (Not in the center!!).
The fla for the window resize fla is here The fla for the loaded swf with scroller is here
View 3 Replies
Feb 19, 2009
Normally the user can resize the swf window when it is playing on flash player. I want to stop the user to resize it. It is possible when we use'fscommand("allowscale", "false")'. I dont know why it is not working for me. Did i use the script wrongly or do I need to do anything in somewhere
View 2 Replies
Oct 26, 2003
Well..the allow scale only disables scaling of the content..can we actually disallow scaling of the window that plays the projector file ?I want it at a fixed window of 800x600 projector...
View 5 Replies