ActionScript 3.0 :: Mysteriously Changing Width Of Items?

Oct 4, 2009

I am working on this website and I decided to add some flash to the front page in the form  of a little image gallery with a nifty slide effect. The problem is this. For some reason its squishing my  images. When you look in the scripting you will see that I've set the image  width to the full width of the stage, but when you test the movie they are  getting squished to about 3/4th's the width of the stage (ive double checked the image size as well).

View 5 Replies


Similar Posts:


ActionScript 3.0 :: Changing An Items Depth On Screen?

Feb 10, 2009

There's a long story behind How I made it here and why I am messing with AS3 in the first place but I'll try to explain it in a shorter version. My boss seems to think that I am the equivalent of Einstein with computers and will tell me what he wants and just expect me to be able to figure it out. So he told me he wanted a website that looked like the Mercedes Benz website and left it at that.I am working with Flash CS3 Professional Version 9.0, trying my best to figure out all the ins and outs of the program, since I am a first time user. I have finished almost everything with the site. I have it all animated and working pretty well, but there's one main problem. I have 25 buttons, sorted out by 5 rows and 5 columns. These button all have pictures of golf carts on them and when you click on the golf cart it opens to show all the products that we sell for that particular cart. The first button works just fine, but all the buttons after that will not stay on top when they are selected.

I can't seem to figure out exactly what I need to do. I hvae struggled with ideas that I may need to put them in a container and then adjust their depths, but I am not sure if this is right or if there is any easier fix. Here's the code that I have so far on that particular page,Quote:

//Product1 Button
Product1.addEventListener(MouseEvent.MOUSE_OVER, mouseOverProd1);
Product1.addEventListener(MouseEvent.MOUSE_OUT, mouseOutProd1);

[code]......

View 2 Replies

AS3 :: IDE - Changing .swf Width And Height

Dec 13, 2009

Is there any possibility to change screen width and height not in Flash ( in Properties ), but in Code [ any AS3 line? ].

View 1 Replies

Professional :: Changing Color Without Modifying Existing Items

Jul 28, 2011

I'm reletively new to flash, and am trying to modify a template and am running into a problem and I don't seem to know why Flash is acting so strange. I am going into a movie clip to edit the color of an item, and when I do so with a tint, it overrides any additional effects such as light, and text. The color appears almost as if it were just slapped on top of everything. When I edit the color in advanced mode, it is really a hit-or-miss to get the correct color, and will only modify when changing the offset RGB.

And also when doing this, the text gradually changes color, for example: there are 4 items in total that I want to edit the color of. Each item is a different colored box with text on the front (for a main Navigation of the website). --- The first item, the text will stay white. Gradually through the second and third items it starts to change, and by the fourth / last item, the text is completely blue. Is it possible for a portion of text to be connected somehow to an object within the animation in a movieclip? If so, is it possible to go inside and edit this? -the shape, animation, and text? Is there an easier way to change the color of an item inside a movie clip? I can supply additional information if needed.. files etc.

View 1 Replies

ActionScript 3.0 :: X Value Changing When Width Changed

Aug 3, 2011

I'm working with a rectangle I used code to generate

hpBar.graphics.beginFill(0xFF0000);
hpBar.graphics.drawRect(40, 40, 90, 22);
hpBar.graphics.endFill();
addChild(hpBar);

The rectangle itself works fine without any problems, but when I try to change the width of the rectangle, it's x value decreases slightly, but I'm not sure why it does this. (90 is the original width, hpPerc is another value that will for my uses always be between 0 and 1).
hpBar.width = 90* hpPerc;
Unfortunately, as I stated, changing this shape's width seems to change the x value as well, which really doesn't work at all.

View 8 Replies

Actionscript 3 :: Modulus / Grid Layout With Items Of Changing Size

Mar 3, 2011

I'm trying to figure an elegant way to display a certain number of items in a grid. I have a feeling the answer lies partly with modulus, but it's a little more complicated than that. I know how to lay out items in a grid based on a set number of columns. Something like this:[code]but what I want to do is set things up such that if there is only one item (j=0), the image covers the entire available area (stage.Width and stage.Height or, for simplicity, 1000px, and 500px). If there are 2 items, there should be 2 columns, with the images taking up half the width of the stage and all of the height (500x500), 3 items - 3 columns (300x500), 4 items - 2 columns & 2 rows (500x250), and so on, keeping a balanced grid layout but decreasing the dimensions of the items and increasing the number of rows in some sort of logical and balanced manner.

View 1 Replies

ActionScript 3.0 :: Changing Size Of Mask In Slider To Display More Items

Jul 14, 2011

I found this tutorial: [URL]. It works great but I wanted to add a little more to it. Currently it works with only one item displayed at a time. If I want to display more than one item, let say 2, I make the mask the size of the 2 items. The back button works fine because the X position is still the the same. However the next button does not account for the size of the mask and works like it did before.

View 3 Replies

List Component: Changing Column Width?

May 27, 2011

How is it possible to change the width and height of the cells in a List Component in AS3? I've tried experimenting with the cells and different methods but none seem to work.For example, let's say I want to make each list button cell very narrow.

View 1 Replies

ActionScript 3.0 :: Resize A Line Without Changing Width?

Jan 15, 2010

I have created a line (on the stage) where the height is 10px and the width is 2px. To resize it, I have converted it into a symbol (MovieClip) and given it an instance (let's say li ).

However, when I enter...li.height = 200; or resize the MovieClip with the mouse, the line is 200px tall, but it has also grown considerably thicker! However, if I go into the MovieClip, click on the Drawing and resize it there, I the line stays nice and thin.

View 4 Replies

ActionScript 2.0 :: Dynamically Changing Height And Width

Aug 11, 2005

I want to change the height and width of an object (specifically doubling it) after an interval of 2 seconds until the height and width of the object reach over 100. I've made two different scripts to try to make this possible.

[Code]...

View 4 Replies

ActionScript 3.0 :: Changing The Height Of A 1px Line Changes The Width Too?

Apr 13, 2009

I have a movieclip that has a 1px wide line by 10px high. Im trying to resize that line with tweenlite, however when i change the height it makes it wider too... How can i do this and keep the line 1px?

View 2 Replies

ActionScript 3.0 :: Keep Stroke Weight While Changing Width?

Mar 16, 2010

I have a movieclip 'cursor' with in it two rectangles. One of them is dark and one is light, so the cursor is blinking. Now, when I want to change the width of this cursor to 150 (where it was 30 before), I do:

Code:
cursor.width = 150;

This not only changes the width of this movieclip, but also the weigth of the (whole) stroke of the two recangles. How can I prevent this strokechange from happening?

View 1 Replies

ActionScript 3.0 :: Changing Width Of Sprite Seems To Change Height Too?

Feb 5, 2009

Here is some code I have.

[code]
_buttonUnderline = new Sprite();
with(_buttonUnderline.graphics) {
[/code].....

When the Tween takes place though it not only changes the width, it changes the height as if it were scaling it up in both directions. Why does this behavior take place? And how can I get it so that only the width changes? I have also tried using scaleX as the property but it does the same thing.

View 1 Replies

ActionScript 1/2 :: Dynamically Changing The Height And Width Of Stage?

Jun 3, 2009

how can I change the height and width of stage dynamically. I tried it with the following code:
 
Stage.height = 250;
Stage.width = 250;
 
during the run time. Initially the Stage is at a height and width of 370 and 450 respectively. Also when I tried to trace the height and width of Stage after resizing the stage width and height, its showing the old value of width and height. That means the width and height not chnaging.

View 5 Replies

ActionScript 3.0 :: Programmatically Changing Symbol Width And Height

Oct 11, 2009

I am trying to change the width and height of instances of a symbol programmatically. Basically, the symbol contains a few colored rectangles, a bitmap, and some text. I want to change the height and width of each instance of the symbol based on how low the text string is that is in the instance's text field, but the bitmap's size should always stay the same, 24x24 pixels.[code]The problem is that using this code seems to scale everything up, including the bitmap. I have tried to programmatically add the 24x24 pixel bitmap to the symbol programmatically after I changed the height, but it still seems to be scaled..

View 1 Replies

Flex :: Changing Width / Height Can't Affect Contents

Jul 13, 2010

I thought I had a handle on AS3, DisplayObjectContainers, etc. but this basic thing is really confusing me: changing the width/height of a sprite does not affect it's visual contents - either graphics drawn within it or any children it may have.[code]...

View 2 Replies

ActionScript 3.0 :: Changing Width Of Sprite Also Seems To Change It's Height?

Feb 5, 2009

[code]When the Tween takes place though it not only changes the width, it changes the height as if it were scaling it up in both directions. Why does this behavior take place? And how can I get it so that only the width changes? I have also tried using scaleX as the property but it does the same thing.

View 1 Replies

ActionScript 3.0 :: MovieClip With Outline - Changing Width / Height

Aug 29, 2009

I develop some components where I use movie clips as skin. In the scene I have 2 movie clips with width 200px and height 100px, one of them I change the width to 200px and height to 100px, well, it should remain the size as nothing happens but it doesn't. The movie clip that I change the size through as3 it's actually getting smaller, and more strange, it only happens when the movie clip has an Outline. The file is attached. It's Flash CS4.

View 2 Replies

ActionScript 2.0 :: Drag CheckBox To Stage And Changing Width?

Oct 27, 2010

I can drag a checkbox to the stage and change the width in the property inspector and it works fine. If I target the width when attaching it dynamically, the whole box and label get skewed.

View 0 Replies

ActionScript 2.0 :: Changing The Width Of A Picture By Sliding A Button?

Feb 5, 2006

How can I create a button to control the width of a certain picture by just sliding the button on a scale in Flash 8? (I've found the actionscript for the button in a sample file in Flash MX. It looks like this:

onClipEvent (load) {
initx = _x;
left = _x-50;

[code].....

View 4 Replies

ActionScript 2.0 :: Changing Movie Clip Symbol Width?

Aug 13, 2010

I searched the forums, but couldn't really find anything that matched my specific needs. I have a movie clip symbol that is your character, I also have a movie clip symbol that is named fuel and it represents the fuel you have left. I tried this in your character:

if (Key.isDown(Key.UP)) {
yspeed -= ypower;
fuel._width -= 50;
}

as a little bit of code. fuel._width -= 50; is what I'm really interested in. yspeed-= ypower; is just my movement, which works. So why doesn't my fuel width change?

View 6 Replies

Flash Items Vanished - Directory Only Changing The Output .swf File And Used All Of The Same Html Files

Aug 11, 2009

I am new to flash and decided to start out using templates to gain a beter understanding. I grabbed a template - that when I went to save it said it was an MX version - once I began to make changes in it re-save and publish it I noticed that some of the elements were missing. I thought it was something I did so I copied the entire directory and just opened the .fla and saved it without making a change and then published it and the items were gone again. I saved it in the same directory only changing the output .swf file and used all of the same html files

View 5 Replies

ActionScript 3.0 :: Have A Movieclip (hairline Stroke) And After Changing Its Width Or Height It Disappears?

Jan 4, 2010

i have a movieclip (hairline stroke) and after changing its width or height it disappears...

View 1 Replies

ActionScript 2.0 :: Scrollbar Mysteriously Not Working?

Jul 9, 2004

the following code all works with one exception the scrollbar doesnt scroll the text

createTextField("resumeText",50 ,-220,-150,430,300);
with(resumeText){
html = true;

[Code].....

View 3 Replies

ActionScript 3.0 :: Draws A Couple Of Lines With Changing Alpha And Width Whenever The Mouse Is Moved?

Apr 23, 2009

I have wrtitten some code that draws a couple of lines with changing alpha and width whenever the mouse is moved. I need to convert this code to AS3 so that I can use it in conjunction with some video tracking.

Code:

var speed:Number = 100;
var myNumber:Number;
var myMax:Number = 50;[code]...

View 1 Replies

ActionScript 3.0 :: Flash CS5 - MovieClip Disappears When Dynamically Changing Width/height Property

Feb 21, 2012

a movie clip symbol is designed and subclassed in Flash, but get instanced and addChild-ed in AS3. It works well as long as I don't change it's width/height property (scaling works too), but if i do, it disappears

View 2 Replies

Mysteriously Slow Load Time Only In Some Browsers

Jul 7, 2011

We've been trying every trick to fix a problem with long lag time in video startup in some environments. In particular, there's a long time gap between the time the custom .swf skin appears and the video starts to play. Only some combinations of OS for the FMS server and client browser shows the problem, but for those combinations it is consistent and appears to be a constant of approximately 59 seconds, regardless of the length of .mp4 or number of times played in our custom .swf. (Our .swf accepts a supplied file location for the .mp4 to stream.)

On our main server (Win2008R2), we run a virtual machine that has Win2008R2 installed. If you click on the video URL from a Mac Safari browser on MacBookPro, the load is FAST (a few seconds). On the other hand if you click from IE on any Windows machine (VM or native, Win7 or WinX), the load is SLOW (one minute). If you try locally on the server virtual machine with the FMS and web server (IIS) installed, the load is also SLOW. The reference flash video (i.e. NOT through our .swf) loads FAST. [code]...

View 2 Replies

Flex :: Labels Mysteriously Disappearing From A ComboBox In It

Apr 16, 2010

Observe the Flex program below (I'm using Flex Builder 3 w/ 3.5 SDK). The second combobox is conditional on the first. If a 'first name' is chosen, then you are allowed to choose a 'last name'. If 'none' is chosen, then you are not allowed to choose a last name, but rather prompted to choose a first name.

To see the mysterious issue of the disappearing labels, run this program and choose a first name. Then choose a last name. All is well. Then choose 'none' in the first combobox. The prompt of the second combobox changes back, and the last names are removed. All is still well. Then try selecting a first and last name again. You will see that after choosing a first name, the last names do not appear, although the spaces for them do (and if you debug the program, the correct data appears in the dataprovider).[code]...

View 5 Replies

ActionScript 3.0 :: Flash Mysteriously And Partially Disappears?

Feb 10, 2012

I  am implementing a charting tool for my project, which is very similar to  Google's finance chart but much more tailored-made to meet different  requirements. The charting interface is made up of the following core components:
 
Time  selection panel: to change the time span of the chartMeasurement  points panel: to select different points of measurementChart  area: to display the measurement data of the selected measurement points over the selected time span
 
For example,  the Apartment's power administrator can view the total power consumption in Unit 101 of Building A, in the Pacific Apartment's  complex (a made-up name). Similarly, the  administrator can also "stack" up charts of multiple measurement  points, having an all-in-one view like below:
 
Only  the chart is implemented in Flash/AS3, the other panels are JSP, JavaScript and Dojo. When an  user clicks on a measurement point to add a chart to the chart area, the following things happen in order  (briefly):
 
User clicks on a  link (say,      Total Amps)Dojo event listener attached to the link picks up the mouse click eventThe Dojo event  listener calls an AS3 method (addChart) through the External Interface to add a chart to the Flash  chart:The Flash chart  picks up the method call, adds a chart to the stage and reposition all charts on the stage. Since the  stage height is fixed at 600 pixels, each chart added will be fitted into the  600 pixels. Eg, 1 chart on the stage = 600 px/chart, 2 charts = 300  px/chart, 3 charts = 200 px/chart...etc.This is what  the Flash chart looks like, when 3 charts have been added, before display the chart on the actually page  (see below) Once a chart  has been successfully added to the stage, Dojo will stretch the <div> tag that the chart resides so  that each chart still "looks" like 400 pixels tall. For example, 3 charts on  the stage means each chart is 200 pixels tall, but Dojo will stretch the  entire <div> to 1200 pixels, making each chart look like 400 pixelsThe above step  is the same concept as resizing the stage When  an user adds more than 7 charts, the 8th chart will start have  Flash contents disappeared. To be exact, I used firebug to increment the  <div> height, and found that when height exceed 2924 (a magic number) pixels,  Flash contents start to disappear. See below (the red-boxes indicate the  missing contents)The situation gets worse when continue to add charts, eventually half of the  bottom chart will disappear.
 
Some pre-work I have done:I have unit tested this component in standalone Flash movie, with 3 LCD monitors  totalling 4000 pixels in height. I produced 10 charts in a single flash movie, and  then resized the window from 600px to 4000px, no charts disappear.  This happens in all of IE7, IE8, FF3+, and Chrome. Although slightly  different manifestation, but they all have contents mysteriously disappeared. This also  happens to GOOGLE's finance chart, when you enlarge the chart's  <div> to over 10000 pxs (yet another magic number) The funny thing is, however, when a graph has been cut in half, the visible half  is still operatable. For example, if the zoom window as been cut in half, I can  still move it, zoom in and zoom out.  

View 1 Replies

ActionScript 2.0 :: Dynamic Text Mysteriously Stuck

Apr 29, 2011

I have a dynamic text box and 5 MCs that trigger eachother in turn. The end of MC1 would then trigger the start of MC2 so they go round in a loop. Each image fade tells a dynamic text box to say something different about that image.But one bit of text causes the text box to stay STUCK and display only that text from then on. It got so frustrating that I had to create a fresh dynamic text box for each corresponding MC... but then I realised that when we finally loop back from MC5 to MC1, it wants to again display the stuck text!Get file here.Stuck text is "Monitoring Migration Routes and Settlements" - notice it when the whole movie loops back to the start.I made a little green box appear just to prove that the offending MC had actually stopped and wasn't looping somehow.

View 5 Replies







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