Flash :: StageScaleMode.NO_BORDER: Event.Resize Won't Work
Apr 15, 2011[Code]...
if I set StageScaleMode to NO_SCALE, code works properly, but if I set it to NO_BORDER, code won't working How to avoid this problem?
[Code]...
if I set StageScaleMode to NO_SCALE, code works properly, but if I set it to NO_BORDER, code won't working How to avoid this problem?
I want my swf file to open on a standalone Flash player on my computer to fullscreen but with no borders.I have tried using the StageScaleMode class but it keeps giving me an error.Below are two variations on how I've been trying to use it. 1)import flash.display.StageScaleMode;in constructor:stage.StageScaleMode = "noBorder";error:1119: Access of possibly undefined property StageScaleMode through a reference with static type flash.display:Stage.
View 2 RepliesIf you set the stage.scaleMode to StageScaleMode.SHOW_ALL, your swf may be scaled up or down, and may be padded on the top/bottom or left/right. However, stage.width + height always return the width and height as defined by your swf, and stage.scaleX + Y always return 1. As I understand it, resize events are not thrown. So how do I get the actual scale and dimensions?
I want them for two problems:I want to fill that padding on the top/bottom or left/right with something only if the user can see it.
I am drawing vectors into bitmaps and want to properly scale it so it doesn't look jagged (or fuzzy with bitmap.smoothing). Flash seems to do the scaling correctly when you cacheAsBitmap=true, so how do I recreate this?
I'm having a bit of a problem here. As per the title, my flash swf file works fine when tested from the IDE, but when I publish it and open it through the browser, the stage doesn't seem to resize along with the window.I post below a bare-bones example. The "back" movie clip should resize, only it remains at the starting dimensions
Code:
import flash.events.Event;
import flash.display.MovieClip;
[code].....
I'm having a little issue with the resize event and resize effect of a VBox.
I have something like this:
<mx:VBox id="container"
backgroundColor="0xFFFFFF"
backgroundAlpha=".9"
paddingTop="15"
paddingLeft="15"
[Code]...
[URL]This swf object load an external xml file (generated by php script which doesn't locate on the same machine) and then display the product list (thumbnail and title). The script was tested working fine on my local machine, but when updating to the hosting, the images don't resize. At the first i thought that it's hosting performance issue, so i migrated it to amazon s3, but it still doesn't work.
View 2 RepliesIn a div, we use swfobject to embed a flash player. We wrote the flash player in action script. During the initialization of the web page, we use javascript to resize the div to make the player best fits the browser. The enclosed flash player registers an OnResize event listener and handler. The question is the OnResize event is not called when the enclosing div's resized. (The OnResize event does get called when we drag to resize the browser afterwards.) Could the be caused by the Flash VM is not fully ready when the div's being resized? What is the best way to make sure the OnResize event is called in this case?
View 1 RepliesIs anybody else finding their flash website event.RESIZE isn't working in Windows 7?My website works fine when I run it at home in Vista, however at work in Windows 7 it just does not work and I have no idea why???! Essentially the bit that says portfolio works should stick in the top right corner on resize and the mute and sound button in the bottom left.
View 9 RepliesI have a CMain class that extends MovieClip and sets:
Code:
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
The scale mode works properly for any children movieclips added directly to the CMain class, however, any children added one layer deeper get scaled when the resize event occurs. I imagined that once the stage scale mode was set, that it would "trickle" down to any movie clips being added to it.
Im basically trying to put together a multi layered swf in which I handle all of the scaling.
I've read that the enter keycode should be 13. However when using
trace(event.keyCode);
other keys will show up but the enter key does not. Could it be my computer or something? Using macbook pro keyboard.
stage.addEventListener(KeyboardEvent.KEY_DOWN, entered);
function entered(event:KeyboardEvent):void {
trace(event.keyCode);
[Code]....
i.e. I can't get this to trace "enter button" Also noticed no code traceable for Ctrl. alt Tab or Backpace
I have an array and want to add event listener to these. I have cards on stage and define their name using "event.target.name"HP Code:trace(event.target.name)returns the clicked objetc's instance name. But When I want to add event listener to these, some problems occur.I try to use it in so many places like;
PHP Code:
mainsTimeline2.insert(new TweenMax(event.target.name, {x:stage.stageWidth y:(stage.stageHeigh /
[code]...
I have an event handler that handles multiple event types so inside it I am trying to do a test for the event type, which to my understanding is a case-sensitive String. I have a statement such as:
[Code]..
I have a VBox, I assigned a handler to click, and inside the VBox I have components such as images and texts with no handler assigned for click. Would the click function be called when I click on the text and image? If not how can I make it so without assigning handlers individually, but on the container level?
View 3 RepliesI have searched on the Internet and didn't find any clue on how to do so, any idea ? I don't want flex only flash (my objects are not visual components).
View 3 RepliesI am trying to use the resize even so that when the .swf window is expanded or minimized the vanishing point is always in the center of the window. Here is the code I have:
[Code]...
I'm not understanding something. When resize the flash window itself it traces the width and height of the stage just fine. But when I publish it as an html page the resize handler doesn't work and it traces nothing...
View 3 RepliesI've this swf with its natively height of 550px. I've the bottom bar, height 92px. So i write this code in AS:
bar.y = stage.stageHeight - bar.y / 2;
I wrote /2 cause the registration point of the bar is in the middle of it.My pourpose was to place the bar always in the bottom, no matter how tall is stage. But as you can look from the link, it doesnt' work right.while was trying to undestand what is worng, I noticed that the effective repositiong is the duoble of what I wrote in AS3 code. If i resize of 3px larger, the bar goes 6px down, and so on.
I'm trying to make a site for all screen resolution. Seems this method don't work when I have a tween navigation. The navigation border stay the same even after I put this coding:
[Code]...
I've a flash site 100x100% in browser window. When I open new tab in browser window Event.RESIZE doesn'tdispatched.how to handle this event except EnterFrame or
Timer listeners?
I want to do something very similar to the resizing effect on this website.
[URL]
Basically if you resize the browser, it seems like it's programmed to only display/load/transition in the images once the user lets go of the mouse and the browser is done moving.
I would like to know if there is a Resize on mouse release event or a work around to do this. Currently my images keep refreshing every time you drag/resize the browser screen, before you let go of the mouse.
So basically while your dragging the browser window size to different size it keeps reloading and updating the images. I want it to reload and update the images once the user is done dragging and resizing the browser.
I have this problem: I have no idea how and where to add event listener to resize the menu. Here is main part of the code:
[Code]...
I am trying to make it so that when the window is resized, a color bar resized to be the width of the stage and the moves to the bottom of the window. The width resize works fine, but item disappears out of view when i include the new y location. I've set up a trace and everything seems to be fine. What am i doing wrong?
[Code]...
I'm working on a project that uses a resize event and the Flash is full-browser (100% height and width). This means of course that every time the Flash stage size will change the resize function will be triggered. This works all fine. But the problem is that if you open a new tab in a browser besides the Flash tab and you go to another website and you resize the browser itself than the rezise event wasn't triggered when you return to the Flash tab. It only triggeres when you resize the browser with THAT tab open.
So is there a normal way (without having an enterFrame loop) to still trigger the event if you return to the Flash tab?
I thought maybe a timer is best way. It should trigger the resize every 3 or 5 seconds or so.
I'm currently working on a center stage component and I was wondering if there's a good way to detect when a stage component has been changed if any of the elements inside it have been enlarged?
This seems like it should be available but I can't find one that doesn't fire before the redraw. Or at all for that matter.
ive been using this tutorial [URL] after following the tutorial everything works except when I have an image that is not on all frames, the fluid layout doesnt work on that image until I resize the browser again after I have gone to that frame, which obviously isnt quite right.
View 1 RepliesThis example relies on 1 MC on the stage called testMc now when you run this code it works fine. Every time you click the movieclip in does what its suppose to do.
The output shows
trans
trans
trans
trans
etc
The problem lies when you resize the screen and then press the button again for a few times you will see this in the output
transresizeresizeresizeresizeresizeresizetransresizetransresizetransresizetransresize
Somehow after the resize is done it keeps calling out for the resize event.
How is this possible ?! I made it in CS5.
import flash.events.MouseEvent;import fl.transitions.*;import fl.transitions.easing.*;
stage.addEventListener(Event.RESIZE, stageResize, false, 0, true);
function stageResize(evt:Event):void{
trace('resize');
[Code] .....
I want to set width and height of the stage during resize of that swf..I do it in resize event handling..but doesn't work..any other way to achieve this?[code]
View 3 RepliesI have is as I add objects from other classes to the stage, is there a way to automatically add them to the resize event I have on the main stage to keep them in position in my fluid flash layout? Currently I am declaring all the variables in the project at the top of my primary class, adding them to the stage in the opening function, and then finally adding them to the resize event.
View 0 Replieslets say i have 2 classes in the same package.and i add the same event listener to each of them, for example i add event.resize to some display object container in both of them.how can i prevent the code attached to that listener to execute in one of the classes if that event happens?
View 2 RepliesI have Buttons which I have rotated vertically within a Canvas, that is working fine. The problem occurs, when the user resizes the window to a small size a vertical scroll bar appears, I would rather have each button squashed upto a smaller size.
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="40" maxWidth="40" xmlns:myComponents="myComponents.*"
horizontalScrollPolicy="off"
[code].....