Abobe Flash CS3 Stage width and height Using script
Hi,
How do control the stagewidh and stageheight USing script in AS3?
Thanks.
stage.stageWidth=whatever;
but check the stagescalemode class.
Similar Messages
-
Hiya.
I'm loading with SWFLoader games that where written using stage functions to get the width and height of the stage and to draw the game and calculate game movements accordinly. When I load a game using SWFLoader, the stage size changes from the stage size of the flash application that i loaded with SWFLoader to the stage size of my entire flex application with breaks the loaded flash application.
is there a way to override the stage related functions in the loaded flash application in order for them to return the proper value ?
if my flash application is width=50px height=50px and it's located at my flex stage at x=20px width=20px,
then the width and height of the stage of the flash application will return 70px.
is there a way to resolve that ?If an app has dependencies on stage size, it will not behave well as a
sub-app. -
Fullscreen published in flash - htm 100% width and height file is too big
Hello everyone
I need some help to create a fullcreen flash animation inside
dreamweaver.
What I did was to create a html file published in flash 100%
width and height.
It worked well on my explorer browser, but the size of the
file is 995 k and this would be my index.
When I publish on my provider the file doesn't open, probably
is too big as an index, i don't know.
Is there anyone there that could help me on that one?
Thank you
This is the code on Dreamweaver html
<HTML>
<HEAD>
<meta http-equiv=Content-Type content="text/html;
charset=ISO-8859-1">
<TITLE>back_men</TITLE>
</HEAD>
<BODY bgcolor="#262626">
<!-- URL's used in the movie-->
<!-- text used in the movie-->
11cf-96B8-444553540000"
codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="100%" HEIGHT="100%" id="back_men" ALIGN="">
<PARAM NAME=movie
VALUE="file:///C|/betoko_webfiles/flash_files/betoko/back_men.swf">
<PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor
VALUE=#262626> <EMBED
src="file:///C|/betoko_webfiles/flash_files/betoko/back_men.swf"
quality=high bgcolor=#262626 WIDTH="100%" HEIGHT="100%"
NAME="back_men" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="
http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
</BODY>
</HTML>
<script type="text/javascript"
src="fixit.js"></script>Well, firstly you have > 60 minutes of video, therefore, you should not use the 60 minute preset. Since you have 80 minutes of video, you're probably better off using the 90 minute preset.
Secondly, the presets assume that you are compressing your audio to AC3 with A.pack or Compressor 2 (depending on which version of DVDSP you're using). Uncompressed audio takes up lots of disc space and bandwidth.
Thirdly, the difference between the measured size in the Finder and the size in DVDSP is the difference between true gigabytes (how the Finder measures things) and billions of bytes (how DVDSP measures things). When you Get Info in the Finder, look at the number following the file size in GB... it's a larger number that's so many billions of bytes. This larger number should agree with the number you see in DVDSP. See the DVD FAQ for a discussion of this issue. -
How do I save the width and height of a photo for repeated use?
How do I save the width and height of a picture for repeated use, rather than having to enter it each time in the 'new file' box?
Thanks, Ed Jackson.It could be that I'm older and have forgotten. I'm now 73 and will admit I have forgotten many things over the years. I have been using Photoshop since Photoshop version 3. And can not really recall which features or changes were made in ever version of Photoshop I have installed. Adobe has added many features over the years. The number of bugs introduce has also greatly increased after CS3. "New Doc Sizes.psp" in your user id preferences is edited using the two buttons in the new document dialog.
As for guide lines in new documents Photoshop CS6 or CC seem to add some for video file presets with guide lines. I do not know how to edit or add guide line to new doc presets. Guide line actions are easy to create. I have also seem some guideline in new documents when I did not expect any perhaps a new bug. Photoshop like most software has bugs. If you do not see Adobe new presets perhaps you copied an old "New Doc Sizes.psp" over Adobe's newer default file or Adobe migrared you presets and wand wiped their presets out. There are bugs. Close Photoshop down and rename your current "New Doc Sizes.psp" in you user id Photoshop cc preferences folder and start Photoshop it will add a dedault "New Doc Sizes.psp" file see if you see Adobe new presets in the new doc pull down when you select video and film... -
How to set a minimum width and height for a stage or scene?
Hello,
Does anyone how to set a minimum width and height for a stage or scene?
I tried listening for width/height property value changes and then adjust the width/height if necessary, but that causes unpleasant flickering of the window.
In JavaFX 2.1 beta SDK for Mac OS, the Stage class has setMinWidth() and setMinHeight() functions which work very well.
I'm wondering what's the equivalent way to do that when using the FX SDK for Windows.
Any help is appreciated!
Thanks.I was wondering how to enforce a minimum stage size with JavaFX 2.0.3.The same flickering way you are currently doing it. See: http://javafx-jira.kenai.com/browse/RT-15200 "Need a way to set the minimum size of a window"
-
Flex 4 Premium reference to the Stage issue! width and height seem to be switched??
So I am doing a very basic resize effect with a panel, but if I want it to fill the screen, I have to switch stage.stageWidth and stage.stageHeight. I have also traced them out and they come out as switched values. Anyone else having this issue?
protected function panel1_addedToStageHandler(event:Event):void
trace(stage.stageWidth, " " , stage.stageHeight);Hi,
You maybe running into some sort of layout constraint also it depends on how you are initiating the animation, if you are doing it on startup you need to wait for creationComplete to ensure all your dimensions have been calculated for the browser. You shouldn't need to use stage dimensions either. The following code resizes a panel to fill the browser. (note using top/left/bottom/right is a lot smoother than width and height).
David
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
creationComplete="application1_creationCompleteHandler(event)">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function application1_creationCompleteHandler(event:FlexEvent):void
pw.valueFrom=pnl.width;
ph.valueFrom=pnl.height;
fillscreen.play();
]]>
</fx:Script>
<fx:Declarations>
<s:Animate id="fillscreen" target="{pnl}" repeatCount="1" duration="1000">
<s:SimpleMotionPath id="pw" property="width" valueTo="{width}"/>
<s:SimpleMotionPath id="ph" property="height" valueTo="{height}"/>
</s:Animate>
</fx:Declarations>
<s:Panel id="pnl" width="250" height="200" horizontalCenter="0" verticalCenter="0">
</s:Panel>
</s:Application> -
Perspective 3D width and height (stage relative values) in Actionscript
Hello!
I have a small square movieclip in Stage, 100x100 width and height.
I translated it 90º in Y axis. Then, it looks like almost a vertical line.
I want to know the "Perspective 3D width" and "Perspective 3D height" values (something like 24x120 as the rotated square now looks like almost a vertical line).
These values are shown in the movieclip properties, in "3D position and view".
I put an image showing where the values appear. Does anyone know how I access the values via Actionscript?
Thank you!Hello!
Thanks for the feedback.
After your answer, I searched for an hour to find the relation between matrix3D, transform, and the width and height properties. But I couldn't find the answer in there (I already had tried to search there before posting here).
Maybe the answer can be there too, but "por casualidad" now I just found the solution using this piece of code:
myMc.getBounds(root).height;
myMc.getBounds(root).width;
It solved the problem after 3 hours trying to find the solution! \o/
Thanks for your attention! -
Revision: 12007
Revision: 12007
Author: [email protected]
Date: 2009-11-19 12:45:27 -0800 (Thu, 19 Nov 2009)
Log Message:
When the Internet Explorer browser window is obscured Stage.width and Stage.height never return the proper sizes until/unless the IE window is unobscured long enough for the player to feel it needs to render initially. This was preventing our preloader from completing, since we were waiting for a non-0 Stage size. Took a slightly different approach to solving the bug for which the original logic was added to work around.
QE notes: None
Doc notes: None
Bugs: SDK-24191
Reviewer: Alex, Evtim
Tests run: Checkin
Is noteworthy for integration: No
Ticket Links:
http://bugs.adobe.com/jira/browse/non-0
http://bugs.adobe.com/jira/browse/SDK-24191
Modified Paths:
flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as
flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/Preloader.asRevision: 12007
Revision: 12007
Author: [email protected]
Date: 2009-11-19 12:45:27 -0800 (Thu, 19 Nov 2009)
Log Message:
When the Internet Explorer browser window is obscured Stage.width and Stage.height never return the proper sizes until/unless the IE window is unobscured long enough for the player to feel it needs to render initially. This was preventing our preloader from completing, since we were waiting for a non-0 Stage size. Took a slightly different approach to solving the bug for which the original logic was added to work around.
QE notes: None
Doc notes: None
Bugs: SDK-24191
Reviewer: Alex, Evtim
Tests run: Checkin
Is noteworthy for integration: No
Ticket Links:
http://bugs.adobe.com/jira/browse/non-0
http://bugs.adobe.com/jira/browse/SDK-24191
Modified Paths:
flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as
flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/Preloader.as -
Is there any way to make column width and height 0 by using formula?
Eg:
=If (column = value) then Column width = 0px and height = 0pxHi Riaz,
Instead of kepping column width and height as 0, you can just hide the particular column by using the same function that you mentioned above, (if column = value) in hide..
You can just right click on the column->hide->hide if->dimension=value. -
Scripting TGetProperty width and height
Hello all,
i have a problem with the flash player in IE6 and FF2.
I have a html page with some flash movie elements on it.
I'm using SWFObject to bind the movies in.
After the onload event is fired, for each flash movie the
javascript function setCorrectSize4Flash will be called to resize
the html container element (embed, object tag) automatically by the
given width and height of the flash movie.
Therefore i'm checking if the movie is completely loaded and
if width and height is not undefined.
So if i'm getting width and height, i'm resizing the
container element to best fit in.
My problem is now, that the same movie used several times in
the same html page has every time different width and height
values. Sometimes the aspect ratio is 1:2 and sometimes it's 2:1.
Is this a problem of the flash player plugin or am i doing
something wrong.
Best regards,
bartmarkThank you for your answer. But I don't understand:
The question is not the margin. I put in the body margin: 0; padding:0; and there is no margin.
I want to know the viewport: the width and height with the iPad in horizontal position and without the address bar.
This does not coincide with the 1024 x 768. (nor the 946 x 768 if I rest the address bar). I don't understand why
Thank you
Narcís -
Obtain width and height in device central?
I'm using device Central with Flash CS5.
How do I obtain the width and height of the device being simulated?
I need to write some special code to handle screen size in device central - as my application is already able to obtain the screen dimensions when run on a real device.I need to know if this is possible, too!
Hopefully this is working somehow.
Thanks -
Getting maximum width and height of frame
In my Flash CS4 application I have a problem working out the maximum x and y coordinates of the display objects that have been created in a frame using the frame editor. This is the sequence
1. Using the frame editor on the timeline, I create a keyframe with a mixture of library symbols and text/graphics which are not symbols.
2. In AS3 I take all of the screen objects and make them children of a Sprite that I created in my AS3 script. I then delete the objects off the screen and pass the parent Sprite to a class that I use to manage the screen.
3. In the manage screen class the first thing I do is go through the child display objects to work out the maximum x and y coordinates so that I can centralise them on the screen later on.
The problem is that I'm not able to work out the maximum x & y coordinates correctly. There is no problem with the symbol objects, I just add the x and width for example, for the maximum x coordinate. But for the non symbol objects this does not work. They appear to be combined in some way and the x/y & width/height do not seem to correspond to anything in the frame editor.
Is there a writeup anywhere on how Flash manages the graphics/text obects which are not symbols and are created by the editor in keyframes on the timeline? Finding the maximum x and y coordinates of a screen full of objects should be fairly simple, but I cannot see a way of doing it at the moment.
JerryOn my JPanel I want to draw stuff, and for this I need to know the > > width and height of the JPanelIf you are drawing stuff, then you are in control off
how big you want to draw the stuff. You can make the
panel as big or small as you want and do your drawing
accordingly.But doesn't the Layoutmanager of the frame set the size of the added panel according to the rest of the layout, or am I way off here?
Do I need to setPreferredSize() or anything on thepanel before pack()?
Try it and see what happens. If you don't give the
panel a size then the pack() method basically ignores
it as you have found out.Perhaps if I gave an example, you could point me in the right direction? The code below creates a JPanel of size 200x200, and draws a ball at a random spot on the panel. But since the frame is way bigger than 200x200 the panel gets stretched by the layoutmanager (right?). So what I really want to use when I calculate the x and y position is the width and height of the panel as it is displayed in the frame.
Here goes:
import javax.swing.*;
import java.awt.*;
class MyFrame extends JFrame {
public MyFrame() {
super("A ball");
JPanel panel = new JPanel();
panel.setSize(200, 200);
int x = (int)(Math.random()*200);
int y = (int)(Math.random()*200);
panel.add(new Ball(x, y)); // Object Ball draws a ball at x,y
getContentPane().add(panel, BorderLayout.CENTER);
setSize(640, 480);
show();
public static void main(String[] args) {
new MyFrame();
} -
Get width and height of a dynamically loaded image once it's done loading?!
hello : :
well... i'm taking my first shots at flex after programming
in flash for a year now. it's been fun and i've been picking up on
things pretty well (or so i think), but i come across something
today that i used to be able to do in my as2 programming and don't
know how to do in as3...
in flex, i'm loading an image into an image control (by using
"myImgControl.load(urlString)"). i have a "complete" parameter on
the image control that calls a function just fine after the image
is loaded, but if i try and check the hight and width of the loaded
image once it loads, it comes back as zero. how can i get the
height and width of the image after it's loaded?!
in flash/as2 i used to do this little trick/work-around i
found in a forum (kirupa.com, i think) to find out the width and
height once the loaded image listener checked the loading process
and came back "complete"... in the code below, "imgLoader" is the
movieClip the image was loaded using
imgLoaderListener.loadClip(urlString, imgLoader).
quote:
iTot = imgLoader.getBytesTotal();
iLoad = imgLoader.getBytesLoaded();
if (iLoad == iTot && iTot > 4) {
imgH = imgLoader._height;
imgW = imgLoader._width;
that all make sense?!
basically, it's as simple as this: i need to find something
similar to the above for as3 that will tell me the width and height
of a dynamically loaded image after it's done loading...
so there ya have it. i appreciate any help any of you can
throw my way! thank you so much for even reading this!
: : michaelI assume you have probably already figured this out, but just
in case, there should be an event to listen for after which you can
get the height and width information successfully. I can't remember
the exact name, however. Experiment and see which one works
time-wise. -
How to change the width and height of the visible part of the of the report
I have define a report with paper size 'Letter', orientation 'landscape' and 30 columns. Dynamically I am changing width of columns and suppressing many columns of the report.
Mostly using first 16-20 columns and others get suppressed.
Now problem is that when navigating the report thru crystal viewer, a huge blank spaces getting display on right of the report. When we take jump to some part of report thru navigation tree, the whole report gets shifted to left and only blank part is visible and it is required to scroll left.
Even printing is not working correctly.
Is there any way to change the width and height of the visible part of the report in the viewer thru .net classes? Setting the width and height of the report in Load event handler doesn't help.
Example: CrystalReportViewer1.Width = 200; - is not helping.
Is there any other solution?
Please let me know.
Thanks
Mahesh PatelHi Yogesh,
Your suggestion 'reportDocument.PrintOptions.PaperSize=PaperSize.PaperLedger;' along with 'PaperOrientation' setting as follow works fine. I tried to switch between Landscape and Portrait depending on report width.
reportDocument.PrintOptions.PaperOrientation = PaperOrientation.Landscape;
But problem with crystal viewer remain as it is.
While navigating report thru crystal viewer, when we take jump to some part of report thru navigation tree, the whole report gets shifted to left and it is required to scroll left.
Thanks for your very good suggestion.
Mahesh Patel -
How to create a map that is larger than the game in width and height?
hi,
i wounder how i can create a map(not the design) that is larger than the game in width and height, part of it will appear in the main page and anther part you can move to it after you press the arrow symbol, but the map is just one image so i want put it in line and out line the game page, and the out line part includes buttons and symbols the player can use, but it will be in line and the other part will be out line when you press the left arrow or the down arrow, how i can do that?
and is that possible to animate it so when the player press the arrow, will give it action to start the animation in one sec, i know how to animate it if that possible but i don't know which code i will use for the mouse click with the arrow symbol, and how to use the same code in the same symbol to start anther animation depending on which part of the map is on?I don't know a lot about mask and masked layers and how to work with the normal layers beside i will use some 3D graphics but not in the background, i will explain all this to you to be more clearly.
first i am using action script 3.0
close ex,
you have 2d map"image" 900*300 pixel.
this image contains some 2d symbols when you click will go to anther normal map (anther normal layer) so they must appear.
your game 320*320 px, and the place the map will show on 300*300, and there's basics objects will be in most pages including the page that show the map so i don't know a lot about how this will work with mask layers.
so you can only see the left side of the map image and what it contains, while there's two arrows one to the left and one to the right there's three cases here,
first when it show the left side(start from x:0 to x:300), the left arrow will not active when you press and the right arrow will start an animation that make the map image move to the mid side in one sec when you press.
in mid side (start from x:301 to x:600) the same left arrow will active when you press to send you back to the left side while the same right arrow will be active to send you not to the mid side but to the right side,
when moved to the right side the same left arrow will be active to send you to the mid and the right will not active when you press and depending on that,
first how to make the large image appear with the three sides in the same place without effecting the other objects "like disappearing them" ?
and the codes i need in the same left or right arrow symbol to make different actions with the same symbol when clicked depending on which part of the map is on.
Maybe you are looking for
-
OK, so this problem has been going on for quite a few months, and has persisted through several iOS updates: I deleted both Facebook messenger and Instagram from my iPhone 5s. they have been stored to my iCloud. Now, when I try to re-download just th
-
How do I download my ipod to my new computer?
My old computer crashed completely and I just got a new one...how do I download my ipod library to it? I am unable to turn on the old computer to try to transfer files.
-
Printing with HP all-in-one connected to Airport Extreme with USB
We have an HP Photosmart 2610 all-in-one, an AirPort Extreme base station, and a G-5 MacIntosh running OS 10.4.8. We can print when the all-in-one unit is connected directly to the Mac with USB cable, however, we are unable to print when the USB cabl
-
Google search results missing page index at bottom of results page
When doing a Google search, an index of search results pages normally shows up at the bottom of each results page. Beginning yesterday, the index only showed up at the bottom of the first results page or not at all. Works fine in Safari on same compu
-
Hi alltogether, since I updated my MacBook Pro to the new Mavericks, the format of the e-mail-receivers in the line "To" is wrong. I only wanted to see the name, not the name plus its mail adress. For example: Before the update there was "Firstname L