ActionScript 3.0 :: How To Change Size Of MovieClip With Pixels

Feb 16, 2010

Is it possible to change the size of a moveClip on the stage by pixels instead of scaling it with scaleX and scaleY? In other words I would like to be able to in crease or decrease the width and height of a movieClip using pixels.

Let say I have this moveClip on the stage, how would you change its width and height using pixels
myBtn.addEventListener(MouseEvent.CLICK, resizeMe,false,0,true);
function resizeMe(event:MouseEvent):void{
// amount doesn't matter
//myMc.scaleX = 1;
//myMc.scaleY = 1;
}

View 2 Replies


Similar Posts:


IDE :: Change The Font Size In Flash CS5 To Show In Pixels Rather Than Points?

Jun 19, 2003

How can I change the font size in flash CS5 to show in pixels rather than points?

View 1 Replies

ActionScript 1/2 :: Change The Size Of A Movieclip?

Nov 7, 2010

Okay so I want to add:
 
if (_root.Gir_mc._x<=595) {
_root.Gir_mc._xscale=80;
_root.Gir_mc._yscale=80;

[Code].....

View 1 Replies

IDE :: How To Change Bounding Box Size On MovieClip

May 25, 2010

I'm making a simple platformer. I have an array holding what my level looks like and my main character is a horse.... okay it's a unicorn... anyways, Whenever I jump to a platform the hittest is saying that he has landed even though his head or his tail is just over the edge... I'm trying to make it so that only his feet will allow him to land.

View 1 Replies

ActionScript 2.0 :: Load Jpg Into Movieclip And Change Size?

Aug 28, 2009

I'm working on a UI for a set top box that has a linux os, which runs a java virtual machine, which loads a flash (swf) interface!

Im trying to load a jpg into a MovieClip using the loadMovie() command because the MovieClipLoader object was introduced in Flash 7, which the box cannot run. Im preloading the image using getBytesLoaded() and getBytesTotal() and after its loaded I want to stretch it to a certain size. Im having 2 problems:

1)The FIRST time I run the loadMovie command, it doesnt always load the jpg, and getBytesTotal is set to -1. After I load it a second time, the preloader works fine.

2)I cannot use mc_name._width = 1000 to scale the width of the jpg image to a certain width. Ive tried my code on a fresh flash file and it works on a computer using Flash 6, Actionscript 2, but not on the box. Whats weird is that if I use mc_name._xscale instead of mc_name._width, it works.

Here's the code:

Code:
ImgUrl = "http://img143.imageshack.us/img143/6639/1680x1050k.jpg";
_root._container_mc.removeMovieClip();
_root.createEmptyMovieClip("_container_mc",_root.getNextHighestDepth());

[Code].....

View 12 Replies

ActionScript 3.0 :: Change Dynamic Movieclip Size?

Jun 22, 2010

I have a container movieclip that it carries some children of a movieclip .its inner children are moving and therefore our container movieclip will resize to bigger and smaller width and height. but when i scatter then hoarding these children in container ,as trace of main container movieclip size , shows maximum value of dispersal of children and now i want to refresh the size of the container movieclip to resize its currently real size(as children dispersal) and set it as a picture of scroller.?

View 0 Replies

ActionScript 3.0 :: Dynamic Movieclip Change Size?

Mar 14, 2010

I have a rectangle shaped movieclip that is my contentPlaceHolder for my content. I added action script to dynamically load pictures. I addChild() the loaded pictures to my contenplaceholder movie clip. The problem is when i export and play the movie pictures are loaded but not in there actual size.

the code:
var xmlLoaders:URLLoader = new URLLoader();
var xmlDatas:XML = new XML();[code].....

Pictures are shown in the right order with my clip.y code but they are not their actual size.

View 4 Replies

Professional :: Change Size Of Sheet Inside Movieclip?

Jul 8, 2010

I'm making a vertical scroller with a mask. The content is inside a movieclip and the user scrolls around it.My problem is, I have lots and lots of content to put inside that movieclip, and I've reached the limit of the sheet. All inside the movieclip. How do I resize the sheet/canvas inside the movieclip so that I can put more info in it??I've googled it, but found nothing.Note: I just want to change the size of the sheet/canvas inside a movieclip and I don't want to change my document size. I'm using flash CS3, AS2.

View 3 Replies

ActionScript 2.0 :: Dynamic Text Size Change Within MovieClip

Mar 30, 2010

I'm trying to change the text size in a dynamic text area within a (movie clip) button. For a couple of buttons I'd like to make certain text smaller, for example, to make the "vs" smaller in "A VS B". My buttons have dynamic text in them and the font is embedded and set at size 10 initially. The code I've got in my movie is as follows:

Code:
// define new text formatting
var minimenutext_txt:TextFormat = new TextFormat();
minimenutext_txt.size = 8;
avsb_txt = "A VS B";
avsb_txt.setTextFormat(3,4,minimenutext_txt);
// assign formatting to button dynamic text
btn1.btext.buttext.text = avsb_txt;

The text "A VS B" shows up in my button, but I can't seem to do anything to change the format. I've tried making it bold, italic, that kind of thing too - but no luck. Does the setTextFormat command only work with input dynamic text boxes? Is it being overruled somehow?

View 3 Replies

ActionScript 2.0 :: Change Size Of Sheet Inside Movieclip?

Jul 7, 2010

I'm making a vertical scroller with a mask. The content is inside a movieclip and the user scrolls around it.My problem is, I have lots and lots of content to put inside that movieclip, and I've reached the limit of the sheet. All inside the movieclip. How do I resize the movieclip so that I can put more info in it?? What's the max width of a movieclip?

Note: I just want to change the size of the sheet/canvas inside a movieclip and I don't want to change my document size. I'm using flash CS3, AS2.

View 5 Replies

Javascript :: Browser Viewport Size In Device Pixels?

Feb 17, 2011

Goal: I want flash to have accurate information about the width and height of the browser viewport in device pixels when intializing, resizing, or on browser zoom events.

Specifics: I need to embed flash into an html page that runs in chrome, safari, firefox, ie. The swf must fill the entire browser viewport.I don't want the flash to zoom.Inside of flash I can set StageScaleMode.NOSCALE so that flash renders to Device Pixels.I also set the state's alignment to StageAlign.TOP_LEFT.Now all I need is the number of device pixels in the browser!

Problem: when there is a browser zoom or I open the site while the browser is zoomed, I cannot easily get information on the browser's dimensions in device pixels.

Solution: acrobat.com's online document editor (formerly known as buzzword) handles this problem just fine (free to play with with an account).What are they doing?In webkit browsers, they are able to keep the document.width to report device pixels every time. I am not sure what they are doing in firefox and ie.

What doesn't work:Swffit does not support this.Just loading the swf into the browser is not a solution, as the swf needs to be embedded.This solution scales a swf to accomodate different browser zooms but does not get information on the browser window dimensions.

View 2 Replies

ActionScript 2.0 :: Change Size Of Loaded Swf File (image Or MovieClip).

Sep 17, 2011

I have successfully loaded an external swf file into my own one. now what i want is to change the size of the loaded file.

the loaded file is an image and its height:500 and width:500 but what i want is to resize it to 200x200

How can i do that.

here is my code to load external image
var peelawayimage = _root.createEmptyMovieClip("peelawayimage", 7);
var mcImage = new MovieClipLoader();
mcImage.loadClip(_root.video_image, peelawayimage);

View 9 Replies

ActionScript 3.0 :: Retrieve Information About Size (in Pixels) Of Loaded FLV File?

Feb 25, 2009

how to retrieve information about size (in pixels) of loaded FLV file? Video object returns 2 pairs of parameters (width,height) which are useless because returns always parameters passed in constructor of Video() object. Another pair is (videoWidth,videoHeight) which is always (0,0). I gave up...


I need this information to scale proportionally video clip to size of area designed to display this video.

View 3 Replies

Flash :: Load An Image Of Size 6000 × 8192 Pixels?

Sep 14, 2011

I am trying to load an image of size 6000 × 8192 pixels which cleary exceeds flash platform limitation for an image.

I am trying which doesn't seem to work.

I have had search around the internet and found few components like BitmapDataUnlimited, and BigAssCanvas but I amn't sure if I can use them for displaying a remote image as none of them seem to have a working implemented example and just the class itself.

View 1 Replies

Flash - Change MovieClip Width Along With Dynamic TextField Size Inside

Apr 21, 2009

I am a newbie in Flash CS3. How to resize the width of of a movie clip according to the size the size of dynamic text inside it. I did it by creating a text field 'myText' and then converted it to a MovieClip symbol and named the MovieClip as myClip. The text in myText is assigned at run-time and its width changes according to the text.

I did it as follows:-
myClip.myText.selectable = false;
myClip.mouseChildren = false;
myClip.useHandCursor = true;
myClip.buttonMode = true;
myClip.myText.width = myClip.myText.textWidth + 5;

On doing this I find the clickable area changes according to the size of the text field but the text field doesn't appear at all.

View 1 Replies

Actionscript 3 :: Change Pixels In An Image?

Feb 15, 2010

I actually try to do the following: I have loaded an external image in a bitmapdata object and create a bitmap from it which i attach it to a sprite/MovieClip in order to have mouse events on it. Now under the previous logic i loaded two images (let's say circles) of the same size one that has a particular color and is covered by its black foreground circle. When i press left mouse button and hold it down i want while the mouse is moved to erase the foreground circle's pixels and so the background image starting to appear.[code]...

View 1 Replies

Flash 10 :: Change Height Of A Textfield To 60 Pixels?

Feb 2, 2012

I want to change the height of a textfield to 60 pixels, without changing the size of the text, and still keeping it centered. When I want to change the size of the texfield, I can change the length, but the height is unfortunately locked. Any ideas? (Unfortunately I can't provide a link or an image, since I haven't made 50 posts)

View 1 Replies

ActionScript 1/2 :: .size ._droptarget - Change The Font Size Of TfNum_mc_.tf?

Sep 28, 2011

var tfNum_mc:MovieClip = tl.attachMovie("tfID","tfNum_mc_",tl.getNextHighestDepth());

If I'm to assign the above code to a dragDrop action. Is there a way to change the font size of tfNum_mc_.tf? I've tried;

tfNum_mc_.tf.size = 12;//did not work

var format1:TextFormat( = new TextFormat();

format1_fmt.size = 12;

tfNum_mc_.tf.setNewTextFormat(format1);//did not work

View 9 Replies

Flex :: Change Radiobutton Size And Label Size In Actionscript?

Aug 10, 2010

I am trying to change my radiobutton size and label size in pure as3...

searchRB = new RadioButton();
searchRB.name = "search";
searchRB.group = rbg;

[Code]....

View 1 Replies

ActionScript 2.0 :: Keep Size Of Button Same When Canvas Size Change On Run Time?

Nov 3, 2009

I want to reduce the size of Swf using the size mentioned in the object tag of html. Same swf file size can be different for different request.

The problem is this if we reduce the size all control in swf reduced according to the change in swf size. But we want the buttons and one more graphics remain same size for any change in size of swf file. How can we make it ..

View 1 Replies

ActionScript 3.0 :: Transition Manager PixelDissolve - Instead Of The Pixels Being Dissolved The Pixels Being Added?

Mar 24, 2012

so instead of the pixels being dissolved, the pixels being added? :

ActionScript Code:
var Anim:TransitionManager = new TransitionManager(blackbox);
Anim.startTransition({type:PixelDissolve, direction:Transition.OUT, duration:1, easing:None.easeOut, xSections:35, ySections:35});

basically what i would like is the end point to be the start point and the start point the end point.

View 2 Replies

ActionScript 2.0 :: Slider Bars And Scaling - Code Keeps Shrinking Initial Object Down To 10 Pixels By 10 Pixels?

Jun 17, 2009

I have a swf file that loads into my main movie, and within that swf there is a masked image that i would like to scale using zoom in and out buttons and also by using a slider bar.However i cant find any tutorials that will allow me to combine the two.I have used the following code for the buttons. Which seems to work ok but i would like it to be a little smoother. (using speed or some sort of easing??)

ActionScript Code:
zoomPlus.onRelease = function(zoomIn) {
if (test_shirt.shirt._xscale == 400 && test_shirt.shirt._yscale == 400) {[code]....

but for this code it keeps shrinking my initial object down to 10 pixels by 10 pixels..

View 0 Replies

Actionscript 2.0 :: _y Movement By Pixels - Move The Movie Clip In Incremental Moves Consisting Of 30 Pixels?

Nov 18, 2009

I have a movie clip called column1_mc. when I click a button I need to move the movie clip in incremental moves consisting of 30 pixels.

column1_mc._y = 30;

Does not work because that is giving a _y coordinate.For example.I need to make the movie clip jump to _y 300 but make 10x30 pixel incremental jumps. Moving 10 times 30 pixel jumps.

View 1 Replies

IDE :: Telling MovieClip How Many Pixels To Move In X Direction

Apr 29, 2009

I'm moving a movie clip using actionscript (as2) instead of a motion tween (because I want to save file size) and I have this code on the first frame of the main timeline ("stone" is the movieclip instance name) and it tells the movie clip how many pixels to move in the x direction:
Code:
xTargetstone = 600;

I have this code on the movie clip itself ("stone" is the mc instance name) to handle the actual moving of the movie clip:
Code:
onClipEvent (enterFrame) {
xstone = getProperty(_root.stone, _x);
movestone = _root.xTargetstone - xstone;
setProperty(_root.stone, _x, xstone + (movestone/5));
}

The movement works fine, but the issue is that it starts out fast and then slows down over time (even though that amount of time is small). The result is that the movie clip seems to wiggle and vibrate before it stops. Is there a way for me to change the code so that it doesn't wiggle and vibrate? perhaps something with the math I'm just not totally understanding? I would like a nice consistent motion from start to finish, while being able to set the time it takes to move etc.

View 4 Replies

ActionScript 3.0 :: Orbiting MovieClip If Mouse Within 50 Pixels

Jun 3, 2009

I'm trying to do an animation, where a movieclip will orbit around the mouse if the mouse is within 50 pixels of the movieclip. Basically, the mouse will get near an object and the object will orbit the mouse, even if the mouse moves. The idea is that here will be a number of these objects on the stage, and as the mouse 'collects' these objects, each one will orbit around the last one 'collected'.

Here's what i have so far-
Code:
package{
import flash.display.MovieClip;
import flash.events.*;
public class soundObject extends MovieClip{
[Code] .....

It kind of orbits, but it's not working very well. Also, my conditional statement doesn't work.

View 2 Replies

ActionScript 2.0 :: Main Contents Change Size And The Menu Position According To The Size Of Main Contents?

Nov 10, 2003

i want to know how did the creator of otradesign accomplish the effect in his site like the menu and the main contents change size and the menu position according to the size of main contents.

View 5 Replies

ActionScript 2.0 :: HitTest And Positioning - Create An Invisible Movieclip That Has The Exact Size And Shape Of The Animated Movieclip

Aug 23, 2005

This is the third thread I've written for my current project (1st was answered perfectly, 2nd failed [but I still figured it out anyways]) but I'm not sure if there is a solution to this problem. I can't really explain my problem, so once again I've included a helpful animation to show you what I mean. Bear in mind that the pale-blue box represents the movie clip's borders, and those borders are usually changed to include the animation (instead of the borders moving with the animation, the borders get bigger).

For the animation problem, I've already got a solution: create an invisible movie clip that has the exact size and shape of the animated movie clip and make it follow the movie clip as it animates, and make the hitTest check the invisible movie clip instead of the animated one. As for the rotation problem, well, I don't know how to fix it. Is there a way to change that?

View 1 Replies

IDE :: Change Size Of SWF/FLA?

Apr 21, 2009

I'm wondering whether it's possible to change the size of a flash application at runtime?

I know I can scale the SWF with HTML/JavaScript, but I'm not talking about scaling here. I want to change the actual size, not just enlarge it visually. Let's say my SWF is 400x300 pixels. At runtime, I want to change it to 500x400. All the elements inside the SWF (buttons or whatever) should remain the same size. It's the Stage itself that should change.

View 1 Replies

Change Frames Instead Of Size?

Apr 24, 2009

I want to change frames instead of Size. How can I revise this?

s1.addEventListener(MouseEvent.CLICK,changeSize);
s2.addEventListener(MouseEvent.CLICK,changeSize);
s3.addEventListener(MouseEvent.CLICK, changeSize);
s4.addEventListener(MouseEvent.CLICK, changeSize);

[code]....

View 1 Replies

IDE :: Do Not Want To Change The Swf Window Size?

Feb 4, 2009

i mean..i dont want my user to maximize or minimize the file..like u ppl must have seen the softwares setups..their window file size cannot be changed.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved