ActionScript 3.0 :: Disappoint Tracing Stage Dimension?
Oct 21, 2011
I want to know for what reason if i write
ActionScript Code:
addEventListener(Event.ENTER_FRAME, function()
{trace (stage.stageHeight)})
resizing the window dimesnion the trace value remain the same of the original stage dimensions setted into FLA (in my case 800px)
while writing
ActionScript Code:
stage.addEventListener(Event.RERSIZE, function()
{trace (stage.stageHeight)})
it return the REAL actual stage dimension when i resize the window.Why the first code desn't work?
View 9 Replies
Similar Posts:
Dec 14, 2005
Say that, I have a basic image galery using xml file as image sources. After a time I replace images in xml file by a different image group with higher dimensions. At this point I want my swf file to adopt new height and width values. How can this be done ?I tried but failed In Flash help files, it says as read-only properties for Stage.height and Stage.width, but because I'm not an AS guru I thought that there should be a way t
View 1 Replies
Dec 16, 2010
The issue I'm having is that I have a main "wrapper" 100x100 (but it could be any size) - it's just there to hold and display whatever content, swf, gif, etc we may want to throw into it. As long as the loaded content doesn't have 3D animation like rotationY going on, it displays fine. But when it does, the 3D "anchor" properties (like projectionCenter) of the loaded swf inherit those of the main timeline (i.e. 100x100 (main) vs 728x90 (loaded)). If I change the dimension of the main "wrapper" in Flash IDE to match what's coming in - the 3D behaves fine, but I won't know what the dimensions of the content will be until it comes, so I need a way (if there is one) to dynamically alter the main "wrapper" or root display object through AS. Stuff like "this.width = loader.width" or "stage.width = loader.width" or "root.width = loader.width" etc doesn't work. Flex has the hBox and vBox
View 1 Replies
May 5, 2009
Sometimes I got
[object MovieClip]
Sometimes I got
[object SomeName]
I don't know why! I never click the "export for actionscript" and the symbol names in my library are given "Onename" "SomeName", rather than "MovieClip" ...
View 1 Replies
Sep 29, 2010
My swf file opens automatically in my web browser when I double click it. It takes up the entire browser window space. Is there any way I can make it play at the proper dimensions without using html? I want to send this file to other people and I don't want them to have to view it in a web page but when it scales up it doesn't look so good. What can I do?
View 4 Replies
Jun 23, 2009
I am having some kind of issue with the display list? I have a function that goes through various frames of my timeline and then traces all the symbols on the stage..
ActionScript Code:
for (var pm = 0; pm < this.numChildren; pm++) {
var child = this.getChildAt(pm);
trace(child.name)
}
What I am noticing is that it will return everything until it runs into a symbol that does not exist on every frame.. as soon as it does encounter a symbol that does not exist on all frames of the main time line it spits out -
TypeError: Error #1009: Cannot access a property or method of a null object reference. at 3_Migration_Standard_Nav_v2_fla::MainTimeline/pMovie()
View 9 Replies
Jan 4, 2012
Opened CS5.5 > Chose "Air For Android" which gave me a stage dimension of 480x800 default. I then created my app.
I am using a Droid Bionic and testing my app on it. It will not go to full screen, regardless of how I am holding the Droid. When publishing, I clicked "Full Screen" and Portrait, Landscape, Auto Orientation, etc. I tried all of the publishing options, yet still there is white screen on the eastern and southern side of the screen.
I have a picture on the main screen, and it fits perfectly within the 480x800 dimmensions when playing in Flash. After publishing to an APK file and testing it on Droid, I have that white space as mentioned, as if the stage size grew larger than the picture / app. I also shrank the stage(480x800) dimensions to to (340x600) , but still the same amount of white space. When I move the picture to the right a bit, and publish, it shows the white space on the left hand side of the stage. This can only mean that when I publish, the stage size grows but everything on the stage stays the same.
View 1 Replies
Jun 8, 2010
if i create and swf let say for desktop application and it is full action script without any object in the stage ( movie clip and etcetera is created and placed by action script 3) not even in the library panel ( i mean no manual object that i added to library oanel and linking it to my code by using the linkage ) what would become the width and height of this application?? let just say for example i make a slideshow swf which load it's image by reading a xml file (the url of the image file is in the xml file).i ask this because when i test my swf (stage.width) it return 0.and when i loaded it into another swf i cannot set the loaded swf dimension (i did use event.complete).
View 7 Replies
Oct 26, 2009
Im doing a project of a site in flash/as3.... now im trying to put it on web to see some results...
But when i go to publish... i dont know what options are the best... Like... i put percent 100% in width and height.... and it works fine in height but in width it shows me more then my stage width :/
what should i do...? i can show u what i mean ....[URL] this is the url where im doing some tests....
View 2 Replies
Feb 27, 2012
What ist the best dimension for photography portfolio in Flash?I would like to make my portfolio website with my photographs.
View 3 Replies
Oct 7, 2010
What is the right dimension when creating flash website?
View 1 Replies
Nov 2, 2011
I'm trying to get the dimensions of the videosource in a VideoDisplay:
private function loadMovie () : void {
vid = new VideoDisplay();
vid.source = _item.itemLg;
[Code]....
View 3 Replies
May 16, 2010
i'm now working on a project using action script 3 now what i'm trying to make is a Main SWF that load whatever other swf into it the tricky thing is that i used 1 xml document read the external swf source nad it's setting(such as it's x,y position and it's width and height) and i'm having problem setting it's width and height (i mean the loaded swf width and height)[code]
View 2 Replies
Nov 1, 2010
I have problems with the load of an image from a ByteArray, I can't get the image size, witch I need to position the image. Strange thing is that the image is showed to me correctly.
My code is something like this:
ActionScript Code:
var data:ByteArray; //Here are saved the raw image data (JPG, PNG, etc)
...
var img:Loader = new Loader();
img.loadBytes(data);
[Code].....
View 9 Replies
Oct 30, 2006
Code:
this.createEmptyMovieClip("mc", 10);
mc.loadMovie("http://www.winbakfarm.com/images/winbak_header_halloween.jpg");
trace(mc._width+newline+mc._height);
why doesn't load width and height of the picture?
View 4 Replies
Jun 30, 2007
I have some 2D arrays. I would like to add a 3rd dimension. How do I add this 3rd dimension?
I don't know if I'm stating this correctly but what I would like to do is have an array that holds a bunch of [thumb.jpg, number, bigpic.jpg]. This way all the values entries are related. So if I wanted to get any of these values I could use the same key value.
I don't know if this makes sense. Plus, do I get the values of the 3rd dimension by using [i][2] in a for-loop? I know that [i][0] gets the 1st dimension and [i][1] gets the 2nd dimension.
View 14 Replies
Jul 15, 2009
So far I've created a canvas size of 1920x1440 (in flash) and before publishing, set my html dimension width and height to 100%.After publishing my project and uploading to a server, it looks something like this:Although it appears fine, the images are being cropped. If you try re-scaling the browser window, the swf doesn't scale.Out of curiosity I tried setting my html scale setting to exact fitas you can see, the swf scales to the size of the browser and re-scales if you resize the browser widow, but its all out of proportion.
View 11 Replies
Sep 9, 2009
I've run into a problem where a significantly large image will not load.I put a ProgressEvent listener on the loader and it shows that the file load completes, but the COMPLETE event never fires.This particular image is a png at 6940 x 4568. At first I assumed it was the file size but I tried a 5k with the same dimensions and this had the same problem.I also read that 2880 is the magic number I should try to stay below, but I tried 2881 x 2881 and it loaded just fine.
View 2 Replies
May 3, 2010
I'm sorry, but I wanna change the dimension of the built-in flash player that we get from installing the FMS.. can i do that?I need it to fit my web in the center, and on the left & right side there's bar for ads..anyway, I embed my web with the videoPlayer.swf I got from this folder:"C:Program FilesAdobeFlash Media Server 3.5samplesvideoPlayerswfs"then I checked the source folder and i realized that it's builed with Flex, and I'm not proficient in Flex.After that I tried to decompile the .swf file using sothink swf decompiler and recompile it again, but it gives me error message in Adobe Flash CS3 Professional.
View 2 Replies
May 20, 2010
i'll be straight to point,well i'm now working on a project using action script 3 now what i'm trying to make is a Main SWF that load whatever other swf into it the tricky thing is that i used 1 xml document read the external swf source and it's setting(such as it's x,y position and it's width and height) and i'm having problem setting the loaded swf width and height btw it's an desktop application and not a website application.,
[Code]...
View 11 Replies
Apr 11, 2011
I'm trying to set a fixed dimension for the skin of a FlvPlayback that is loaded dynamically irregardless what size the container is.
View 3 Replies
Nov 17, 2009
I used Loader to load an external swf file, and try to display it in a fixed area, like a fixed dimention sprite object. And I don't know the exact size of the swf file, I just want it to fit the fixed area.
code:
var loader:Loader = new Loader();
loader.load(new URLRequest("some path"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
[Code].....
View 2 Replies
Aug 11, 2010
I just built a flex applcation with AS3 only.. the generated swf will expand as much as browser's window..I wish to reduce the dimension of swf file.
View 1 Replies
Oct 27, 2009
I recently decided I was going to feel my way through Flash and learn it on my own, so here I am. But I need some assistance. I am modifying this tutorial for my needs, but unfortunately the dimensions of the pictures I am using aren't the same as the ones here. I thought the code would still function the same way, but alas.. no. Anyway, is there any way to 'universalize' the code or could someone explain which attributes I would have to alter to fit different image dimensions?
View 0 Replies
Nov 11, 2009
Recently i made flash animation in 500x300px, now i need to re-create the same animation in 100x65px, plz tel me how can i decrease the dimension of same animation widout re-creating it in new dimension. is there any codes or tools or plugins?
View 3 Replies
May 4, 2010
Whenever I move things along the Z dimension, it gets blurry, like it "should". Any way to disable that, and keep infinite focus?
View 3 Replies
Oct 25, 2010
I've been hurting my brain for 2 days now trying to figure out the following:I have an array called Objects.This array contains 2 fields: dbid (database ID) and children.The children field contains an array with more objects (and so on and so on).
ActionScript Code:
Simple example of Object:Array
[0]
[code].......
View 4 Replies
Oct 30, 2006
Trying to create and populate a bi dimension array.
[Code]...
View 3 Replies
Aug 4, 2007
I have a row of images and need to resize the height of the image to a specific value and then scale the width of the image to maintain the dimensions - so I end up with a row of images all the same height but different widths. I've only ever scaled an image by a scale factor.
View 1 Replies
May 19, 2010
The following code showing error
var objectArray:Array=new Array();
for (var i:uint=0; i < 2; i++) {
for (var j:uint=0; j<2; j++) {
[Code]....
View 1 Replies