ActionScript 2.0 :: Rectangle Moving While _width Is Scaled

Jan 25, 2010

I'm trying to draw a rectangle with as2 the to strech it's wirdth. It seems to work but something strange is happening while the rectangle is streched it is slwloy lmoving across the scene .

[Code]...

View 3 Replies


Similar Posts:


ActionScript 2.0 :: Moving MovieClip In Relation To Border Of Scaled Object

Oct 20, 2009

I have a frame_mc that get scaled 400 % onPress with a fusekit tween. Now I'll like to anchor a title_mc to the the top edge of the frame_mc without scaling it. How to do that? onEnterframe in the onPress function?

View 0 Replies

ActionScript 3.0 :: Collisions Between Moving Circle And Rectangle Object

Oct 9, 2010

In AS3 is there an easy way for collisions to take place between a moving circle and a rectangle object. A moving circle has a direction and you need to know how it collides with an object rather than knowing it just hits. In .net you use a points test where you test several points around a circle to see what hits an object and then you can work out what direction it will bounce off.

View 2 Replies

Actionscript 3 :: Scrollbar With Sprite And Rectangle Won't Move Text, Just The Rectangle It's Painted On?

Mar 8, 2010

For those of you still with me, I am tasked with making some scrollable content in Flash. Load in a TextFile using LoadURL(), then display it. To get the text, we've written our own class TextFieldExtended, which is basically just there to give the textfile location to the constructor and then have the class do the various steps of getting it and loading it for you.So I needed to get a Scrollbar, which I got hereThe thing is, it works with Sprites.After trying to get it to accept TextFieldExtended, I bumped into a block, since the scrollbar relied heavily on a Sprite property that TextFieldExtended didn't have or could have.

So I tried adding the TextFieldExtended instance to a Sprite instance using addchild.A problem occurs here that I do not know how to handle. It seems that a Rectangle is drawn and the Text is drawn on that. I say this because the scrollbar moves the Rectangle up and down a bit, but the text doesn't scroll, just the Rectangle it is positioned in and the text then moves along with it.My question: can this be fixed, or is does this implementation of scrollbars need a lot of adaptations before this is possible?

View 1 Replies

Draw Rectangle Should See Little Bold Circle To Indicate A Perfect Rectangle

May 20, 2009

I draw a rectangle i should see a little bold circle to indicate a perfect rectangle, I seemed to lost mine, can somebody please tell me how to get it back!

View 2 Replies

ActionScript 3.0 :: Convert Rectangle To Curved Rectangle?

Aug 2, 2011

I am trying to convert a rectangle(actually multiple rectangles) to a curved rectangle. I think it should be pretty easy but I guess i am stupid. Basically I would have a start position and stop position (many of these), and they would be converted to curved rectangles and follow in a cicrle around.

View 0 Replies

ActionScript 3.0 :: Creating A Rectangle Inside Of A Rectangle?

Jun 26, 2010

I would like to create a rectangle inside of a rectangle, starting approximately 15% inward from the right side of the other rectangle.

I know how to create rectangles with:

Code:
var newHotRect:MovieClip = new MovieClip();
newHotRect.graphics.beginFill(0x00FF00);
newHotRect.graphics.drawRect(0, 0, 100, 100);
addChild(newHotRect);

But how would I make another rectangle on top of that (the black one pictured) that is approximately 15% from the right?

I toyed around with .right, and .bottomright with no success. Can anyone lead me in the right direction? or even finding the x and y of the upper right or bottom right side of a rectangle?

View 10 Replies

ActionScript 3.0 :: Rectangle To Rectangle Collision Response?

May 20, 2011

how to respond when a rectangle hits another rectangle? I already know how to detect the collision, I just don't know how to respond to it. I'm just trying making a simple side-scrolling platform game where I have platforms I can walk on and bump against on all sides. I have searched everywhere and just can't find the tutorials I'm looking for.

View 6 Replies

ActionScript 2.0 :: Box._width & LoadMove(.jpg)?

Apr 2, 2004

I'm making some sort of a slideshow, if I load a jpg into a "box", with createEmptyMovieClip, the width of this box is 0. How do I get the width of this box (= width of the picture) and how to resize it with box._width & height.

View 2 Replies

ActionScript 2.0 :: [FMX] DuplicateMovie And _width Property?

May 15, 2003

I am trying to load some thumbnails and I have a few items that seem logical to me, but they do not work. The lines that are commented out do not work for some reason. The width of each thumb is needed so that I can space them out evenly with like 20 pixels between each.Initially photoArray has the path to each jpg, then it is overwritten with the movie clip when they load. If anyone knows why these lines dont work or knows a more efficient manner to load thumbnail jpgs that would be cool.I 've also tried getProperty() with no avail. PEACE - I'M OUT

Code:
createEmptyMovieClip("thumbMC", -100);
for(i=0;i<10;i++)

[code].....

View 1 Replies

ActionScript 2.0 :: Why Does _width Show 0 After Loading A Jpg Into The Mc

Apr 19, 2007

i loadMovie()'ed a jpeg file into an empty movie clip. after that i traced the width of the cilp and its showing zero.. how is that possible?? i need to get the value of the width of that jpeg picture to adjust its positioning. how do i get it?

View 8 Replies

ActionScript 2.0 :: Setting The _width Of A Movie?

Jul 3, 2003

I am pulling the variable this1length from a text file via loadVariablesNum ("getmy.txt", 0); know that this1length works is a valid variable as I can spit it out elsewhere, but for some reason the statement below is not pulling in the variable to set the width of the MC.P.S. this1length has a value of 10 in my text file.

[AS]
onClipEvent (load) {
setProperty (_root.this1clip, _width, "_root.this1length");

[code].....

View 2 Replies

ActionScript 2.0 :: _width Not Changing During Tween?

Aug 29, 2004

I was disappointed to find that I could not use the _width property of a tweened movieclip instance to know how large the mc is at a given time.

Am I just not getting something??

A breakpoint in the onEnterFrame() function shows that _width is always the LARGEST width the movieclip ever has -- not its CURRENT width. In my case the mc is being made larger and larger, using a tween made in the authoring environment. The clip starts out tiny and ends up 400 pixels wide, but the _width property is 400 the entire time!

View 5 Replies

ActionScript 2.0 :: Movie Clip Disappears After Set _width To It

Aug 8, 2009

Check it out. I am creating an XML gallery. I am able to load in the gallery info from the XML just fine. The preloader works just fine. And I can set my _x and my _y just fine. BUT.... when I attempt to set my movie clip (that acts as the pic holder) to a width or height, the MC never shows up!

[Code]..

View 1 Replies

ActionScript 2.0 :: Adjusting Line _width With Changes _height Too?

Nov 19, 2009

I have a horizontal line that is in a movie clip. To adjust the width of the line when I click a button I use

Code:
btn.onPress = function(){
line._width += 20;
}

This does change the width, but the line gets thicker (height is increasing) as the width increases. Why is this happening, and how can I keep it from happening? I want only the length of the line to change, not its thickness.

View 1 Replies

ActionScript 2.0 :: Movie Clip Disappears After I Set _width To It?

Aug 8, 2009

I am creating an XML gallery. I am able to load in the gallery info from the XML just fine. The preloader works just fine. And I can set my _x and my _y just fine.

BUT.... when I attempt to set my movie clip (that acts as the pic holder) to a width or height, the MC never shows up!

ActionScript Code:
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;

[Code].....

View 9 Replies

ActionScript 2.0 :: Check The _width And _height Of A .FLV With The Metadatainfo?

Jan 4, 2005

i know it's possible to check the _width and _height of a .FLV with the metadatainfo. BUT not every movie got this kind of info, how do i check this without the info or can i place a .FLV in his original size in the screen?

View 1 Replies

ActionScript 2.0 :: Movie Clip Dissapears After I Set _width To It?

Aug 8, 2009

Check it out. I am creating an XML gallery. I am able to load in the gallery info from the XML just fine. The preloader works just fine. And I can set my _x and my _y just fine.BUT.... when I attempt to set my movie clip (that acts as the pic holder) to a width or height, the MC never shows up!

Code:
function firstImage() {
if (loaded == filesize) {

[code].....

View 9 Replies

ActionScript 2.0 :: Getting / Using _width / _height Of A Loaded Jpeg

Jul 7, 2004

I'm having trouble getting the _width & _height of a jpeg loaded using loadMovie. I'm trying to reposition it (pseudo-registration point) for rotation in a container movie clip. If I use hard-coded numbers, it works fine. However, if I try to position it based on its _width and _height properties, it's no go... in fact, it doesn't even show up on stage.

View 7 Replies

ActionScript 2.0 :: Movie Clip Visible But No _height Or _width?

Jun 24, 2009

Basically I've got a movie clip on the stage called loader_mc, I am loading a picture from the server into it with:loader_mc.loadMovie('http:[url]....');I am then trying to to take a snapshot of the image using:

dummyBMP = new flash.display.BitmapData(loader_mc._width, loader_mc._height);
dummyBMP.draw(loader_mc);
dummyBMP seems to be empty after this though, and I notice that loader_mc._width and loader_mc._height have a value of zero. The picture is visible on the stage despite this though.Anyone know where I'm going wrong?

View 1 Replies

ActionScript 2.0 :: Set _height And _width Property The It Is Not Displaying Image?

Nov 25, 2004

I am new for Flash Action Script 2.0 .I have made one script to dynamically load the images depends on the data came from database.This images can be of any size in the directory.I want this images on perticular height and width.so i wrote like UserImage._xscale=35 and UserImage._yscale=47.but i do not get the image of that size.I tried to set _height and _width property the it is not displaying image.so what should i do to get the image of my size?

View 2 Replies

ActionScript 2.0 :: Make A Iterative Function That Just Does A _width++ Every Second/24fps

May 23, 2005

I'm creating a small docu where you have some control functions like you have in Windows Media Player or Winamp or...

So my problem is that I don't know how I can make the statusbar (a bar where you can see how far the movie is).

I just have a bar that begins with a width of 0 and I want to make a itterative function that just does a _width++ every second/24fps

The question: Is there a function, like the Thread.sleep() method in Java, that let's you wait for a certain amount of milliseconds? Or do I have to put on every frame a call for my ++ function.

View 2 Replies

ActionScript 2.0 :: Detecting _width / _height Of Loaded Image?

Jul 20, 2006

Is there a way to detect the _height and _width of a incoming image?

I'm going through a loop, duplicating movie clips with mask, loading an image, and squeezing it down to 100 x 100 for thumbnails. The client wants the thumbnails to be actual proportions but I used so many tweens and setup functions based on the 100 pixel width it's going to be a nightmare.

View 2 Replies

ActionScript 2.0 :: HitTest Only The Content Of Movieclip And Not From 0,0 To _width, _height?

Nov 7, 2006

This is probably just a brainfart but when I publish the code below, my hitTest is triggered by the entire movieclip from 0,0 to _width, _height and not by it�s content. The �fwa� movieclip contains some txt that I broke apart, and I only want the hitTest to run when the �mc� hits the txt within the �fwa� movieclip!

[AS]
var i:Number = 0;
var count:Number = 0;
var colorArr = ["0x99cc33", "0xff0066", "0xffcc00", "0x33ccff"];

[code]....

View 2 Replies

ActionScript 2.0 :: Build New Array From _width Values In Loop?

Sep 9, 2007

I have a bunch of thumb mc instances on my stage, using the same mc symbol. They're all sized differently so the widths(which are same as heights) vary.I want to be able to access their width value from an array independent of all the scaling I'm doing with rollovers. That is, I need to have each mc instance's original width accessible from anywhere in my code.The simplest way to do this is to hard code an array, like:

var Twidth:Array = new Array();
Twidth[0] = "33";
Twidth[1] = "45";[code]....

But since I have 22 thumbs and several portfolios, and want the option of changing their original sizes on the stage, I want to create the array above on the fly using information in a loop. For instance, I already have a loop in a function called generateThumbs(). Here's what I've tried:

for (var i = 0; i<total; i++) {
Twidth = new Array();
Twidth[i] = this["thumb_mc"+i]._width;[code]....

for trace on the first method, replacing 'i' with the key I want (Twidth[2]):

undefined
undefined
45
undefined
undefined

As you can see, this gives me non-indexed non-delimited value for the whole loop (the actual in my real movie is 22). There's no length or array because its actually just one value. Entering a number in the key will display a bunch of undefined with one defined. I have no way of extracting that one key without getting all the other undefined values.my question is: How do I put 'this["thumb_mc"+i]._width' values into a loop with each value indexed for the rest of my functions to access?

View 2 Replies

ActionScript 1/2 :: Setting _height And _width Prevents Keyframe Movement?

Sep 3, 2009

I have a movie clip that jumps around over the course of my movie using standard keyframe animation. At every keyframe, it calls a function that moves a dynamic text box on top of it, autosizes the text box, then alters the movie clip's _width and _height to fit that of the text box.
 
The problem is, while the resizing code works fine and the text always fits, the act of altering the _width and _height seems to cancel out the keyframed positioning. The movie clip changes size, but it's forever locked to the position of the first keyframe.

[Code].....

View 1 Replies

ActionScript 2.0 :: Loader Component _width And Height Not Working On Fullsceen?

Oct 12, 2010

i am trying to load array of pictures dynamically in to a loader component,the picture after loading in to loader component i am resizing it to required size.
115 is the width and height of loader component.

.complete = function (eventObject)
{
loader.redraw();
x_txt1= loader.width;
y_txt1= loader.height;

[Code]....

but if i select next picture while fullscreen then loader.width and .height shows as 0 and picture is not displaying.

View 1 Replies

ActionScript 2.0 :: Create An Array Storing All This Values, _width, And MC To Load?

Mar 2, 2004

I'm making a portfolio, it has a large amount of images, one by work, (maybe there are 25) and they are put in a horizontal band, the images all have the same height, but not he same width, and they load an external MC of each work.So I want to create an array storing all this values, _width, and MC to load.

Secondly I have a frame like a stroke of the picture, the frame is in the center of the band of images, and there are two arrows, one to move on the band to the left, and other to the right. The thing is that when I push the arrow the band must move 15 px on left or right, and te frame must adapt (with easing) to the _width of the image.And one more thing, there will be many many images in a future, so I would like that a user if it's holding the left or the right arrow for a medium/long time it could make the band of images to go faster from one to another. I think it's so simple of changing the speed of the movement, what I don`t kwow is how to know if the button is pressed for a long-meidum time.

View 1 Replies

Flex :: Know If An Image Needs To Be Scaled Down Or Not?

Jul 15, 2010

I'm trying to create in Flex a Tile view that shows some images that a user has. The images don't have the same size, some are small and some are big.

What I'm trying to do is to use a List and create an ItemRenderer that has an Image property which displays the user images (the images are passed to the source property of the Image Object), I want the big images to scale down to the size of the tile so I set the 'scaleContnet' property of the Image Object to true, but this causes the small images to scale up to the size of the tile, this is not the behavior I want.

all the images are Embeded into Class objects and are passed as arguments to the ItemRenderer, how can I know in the ItemRenderer if I need to set the 'scaleContnet' property of the Image Object to true (for big images) or false (for small images)?

View 2 Replies

ActionScript 3.0 :: Loading FLV Gets Scaled Down?

Aug 31, 2009

Loading in an FLV. Partly works but the video shows up around half the size of the original. I've poked around endlessly with the Adobe Media Encoder and I've checked and double-checked the size of the orginal video before I encode. why its being scaled down like this?

[Code]....

View 2 Replies







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