So the issue is that whenever I run the flash movie, the display in the browser (Chrome) ends up being like 30% larger than the browser is when fully maximized. In reality, it should be running in a 800x800px environment. I've tried messing with the stage size and doing things like setting it to FULL_SCREEN and NORMAL and that had no effect. However, attempting to compile the project through the command line with the mxmcl (although it gives different errors atm) show me that the window is properly sized at 800x800px, so it is obvious that the flash builder is the one that resizes it. Any ideas what this might be due to?
Asked
Active
Viewed 730 times
1
-
Is this by chance a mobile project, do you have a main-app.xml you can post / pastbin ? – Nate Jul 12 '11 at 21:43
-
Flash Builder only compiles. It doesn't 'resize' anything. I would look at the html that's embedding the swf since that's what really depicts the size of the swf. – J_A_X Jul 12 '11 at 21:47
-
Please post the HTML-code, which embeds the flash file. – SteAp Jul 12 '11 at 21:59
-
Sorry for the delay. Nate, it is not a mobile project, it's just a single .as file that I am building a project out of. J_A_X, would that really be the issue caused by html? Doesn't Flash Builder create the html file when I run the program and in turn overwrite anything that I might change in it? Stefan, which part of the html would you like to see? The page is too large to be pasted in its entirety here. – CodedMonkey Jul 12 '11 at 22:20
-
Use pastebin.com and post us some code, both the html and .as and we'll find the prob for ya. ;) – Nate Jul 12 '11 at 22:24
-
1HTML - http://pastebin.com/6nfwjpR5 AS3 - http://pastebin.com/8Cyb2ra5 Cool site, btw, Nate :) – CodedMonkey Jul 12 '11 at 22:28
-
btw, I should point out that changing some parameters in the html file from 100% to a smaller number does make the video smaller. However, this has no effect on the .swf file output and that is ultimately what I care about. – CodedMonkey Jul 12 '11 at 22:58
-
@ExitFailure, please attach HTML and AS3 to original question. Also, if you can provide a screenshot of your problem, it would be easier to understand. I did notice that your html is setting the width/height to 90%. Also, for future reference, this is *not* Flex, just a pure Actionscript project :) – J_A_X Jul 13 '11 at 12:14
-
@J_A_X, I've been messing with the html file as per your suggestion and changing percentages here and there, and that is the one that has the desired effect. If possible, I'd like to change this setting before the .swf is even compiled as that's where it really matters. Also, where could I host a quick image? – CodedMonkey Jul 13 '11 at 15:36
2 Answers
1
The default header for a flex app is:
<?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/halo" minWidth="955" minHeight="600">
Notice the minWidth="955"
. That could be your culprit.

Jacob Eggers
- 9,062
- 2
- 25
- 43
-
Where would I find this header? It's not located in my .as file, and that is the only file I have. – CodedMonkey Jul 12 '11 at 22:21
0
The generated HTML is normally based on your application tag. Try setting 100% for width/height
<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/halo" width="100%" height="100%">
If that doesn't work, you can modify the template directly under html-template directory (which is the way I prefer to do it) and leave the width/height out of the application tag.

J_A_X
- 12,857
- 1
- 25
- 31