ActionScript 2.0 :: Decrease Dimension Of Flash File?
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?
I know there are performance loses if you don't specify variable types explicitly. Do ActionScript/Java developer in general prefer the use of the in classes or no?
public function hello():void { this.speaker.says("hello"); }
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
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 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: //variable list var swfList:XMLList; //hold all the zone list from the xml var totalZone:uint; //total of zone there is in the xml var myURLLoader:URLLoader = new URLLoader();
i want to ask how to make a placeHolder in flash actionscript 3..,what i do need to know is that how to sett a placeholder width and height:confused::confused::confused:
Code: import flash.display.*; var placeHolder:Sprite = new Sprite();
I'm making a flash game and I've come to a halt in my code. This is how the game works: Where ever the mouse is clicked, the player will run towards thats spot. It's on a field. The problem is, I want the player's size to decrease as he gets higher up on the field(as the y gets closer to 0), giving the illusion of depth. But for the life of me I cant get it working! Im quite new to AS3 so im not sure about all it's tricks, but here was my go at it.
[Code]...
When I run the code, my character's size stays the same when I go up and down, but goes all wobbly when i go at angles without any real order. Clearly it's not working.
I have a class (ImageLoader) that extends Sprite container and loads an external image to its instance. When i instantiate an object of this class from another (Main) class i want to have the dimensions (width, height) of the loaded image being known to this (Main) class. It seems that is difficult for me as the dimensions are known after the image compete loaded. But i don't know how to pass this information from completeHandler event handler to the Main class.
Is possible to change the browser dimension dynamically in flash? I have a ball that bounce up and down on the stage and I would like that everytime it bounces on the bottom the broswer window gets bigger ..
I've made this code: Code: var txt:TextField = new TextField(); var frmt:TextFormat = new TextFormat(); txt.autoSize = TextFieldAutoSize.LEFT; frmt.font = "Arial"; frmt.size = 800; frmt.color = 0xFF00FF; txt.defaultTextFormat = frmt; txt.text = "TRY WITH THIS"; I've seen around the web flash websites with text bigger than the max flash dimension of 72 pt. How can I make that? I've tried with the code above but it seems that flash set the text size to 72.
I am streaming flash video and the dimension of the video is 1280 by 720 (same size as the stage)
but just before the video streams, there is a quick flash of the video (about 320px by 240px) at the top corner of the stage, and then it plays the videos at the correct size (which is 1280 by 720) .... a quick flash is the best way I can explain it.
This is my code:
function clicked(event:MouseEvent):void { var video:Video = new Video(); addChild(video);
[Code]....
is there anyway I can stop that quick flash of the video .... so when I click on the button, it just plays the video, at the correct size?
there just havig a stupid problem where the health on my game increases on my game instead of decreases when the player is hit. here is the source codeHUD.as (Scoreboard)
Code: private var stageRef:Stage; public var s_score:Number = 0;
I've been developing a flash game with a friend, and have hit a minor snag with the timers. My entire game runs in one frame, spawning movieclips and handling all that game-related stuff. Thing is, I've got a timer that spawns one thing (a boulder, in case anyone is wondering), and I'd like to have that setInterval (milliseconds) decrease every second by a set amount.
The important snippet of my code looks like this: var timeb = 750; bfalltimer = function () { spawnboulders(); if (gaslevel<=0) { clearInterval(boulderspawntime); }}; boulderspawntime = setInterval(bfalltimer, timeb);
Every second, I'd like time to decrease. I've tried everything I can think of - did I miss anything? How would I properly do this?
on (release) { health -= 10; if (health>500) {[code].........
I was wondering if there is a code i can use to replace the 10 with a random number between say 1-10.(Ergo when the script triggers the health is decreased with something between 1-10 instead of the set nr 10)
The buttons increment the score when clicked. is there a way to start an individual timer per button so that the sooner it is clicked, the higher the points? [code]...
What I'd basically like to do is have a slider that controls the size of a Movie Clip. When you move the handle to the right, the MC becomes smaller, and when you move it to the left, it becomes bigger. I found an article at Sitepoint (www.sitepoint.com/print/actionscript-animation-flash), which did the opposite of what I want to do, but I couldn't seem to reverse the code.
How do I decrease or increase speed on the animations? for example I just want a text to move from right to left but as its get close to the left to start slowing down until it gets to wher I want it, I hope you know what I mean, If not this is a site that uses that when text goes up or down or the buttons
I have an mx:vbox and inside i have several mx:text elements.how do i decrease the gap between each line of text that is shown ?i tried doing the following:
I have a movieclip slider_mc that can be dragged across the screen. There are also lots of small movieclips on the stage that I would like to increase and decrease their size depending on how close the draggable movieclip is to them
I want to use two buttons, one for increase and the other for decrease, to change the numeric value of a variable. I will use this variable to call a line width in some lineStyle code that I have. Basically, the user will be able to use the buttons to change the width of the line they are drawing in real time. I have attached the fla with the beginnings of this section.