ActionScript 3.0 :: Increasing Line Thickness Reduces Size Of Box

Sep 24, 2009

I made a small box that is filled with navy blue and has a red line around it, but when I increase the thickness to say 50, it reduces the size of my navy blue box.

PHP Code:
public class Box extends MovieClip {
public var color:uint = 0x000099; // class property of navy blue
public function Box() :void {
initialize();
construct();
this.graphics.lineStyle(50, 0xFF0000);
this.graphics.beginFill(color);
this.graphics.drawRect(0, 0, 100, 100);
this.graphics.endFill();
}

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Using A Slider To Change Line Thickness?

Jan 16, 2010

trying to make a slider that changes the line thickness in a drawing app that I would to share with my students. When moved from left to right a circle changes scale. This circle would act as a visual reference on the stage telling the viewer that the line thickness is changing. Right now I just want to figure out how to connect the slider so that the circle changes dynamically. Once I get that I feel I can figure out how to connect it to lineStyle(). The current code I am attaching has the circle change size at onle two points-the far left and far right. I keep trying to write something that uses mouseX properties but so far nothing is working.

View 5 Replies

Flex :: Underline Line Thickness Always One Pixel?

Jan 17, 2010

Its an mx:Text object. (The Text object is actually being used as a mask so don't know if that's the problem.) If underline is set with the <u> tag in Text.htmlText, or Text.textField.setTextFormat, the underline thickness is always just one pixel which is not acceptable. (There are other problems with <u> so I'm limited to using setTextFormat currently.)

Can the thickness of an underline be set through CSS? (textField.styleSheet, etc.)

I may have another problem as I already use setTextFormat extensively, and the documentation says you can't use textField.setTextFormat if you use textField.setStyleSheet.

I primarily need the underline to simulate correctly the look for an anchor tag.

View 2 Replies

ActionScript 2.0 :: Editing Line Thickness Inside A Movieclip?

Oct 28, 2009

(Im using CS4 and actionscript 2)

I have some movieclips with a graph (not generated, manually drawn). I want to change the thickness of the line inside the movie clip. How do I do that?

When I move the mouse over the line the graph must highligt (become thicker). I can do this with the line as a button, mouse-over graphics. But I also need to highligt the graph when the mouse is over some text (to link the graph with the text). If I have 2 - or several - buttons can I have them all show the mouse-over image at the same time, if the mouse is over just one of them?

Another ideer: I have made an actionscript the fades (using alpha 0 and 100) for 2 similar movieclips each with different thickness positioned over each other. But the initial value for both lines is a problem, only the thin line must be shown, the thick line must be alpha=0. If I set it at the start of the actionscript then it resets every time the flash starts over. Is there some way to set the inital value (alpha=0) just once? When the flash playes first time?

View 1 Replies

ActionScript 3.0 :: Control Line Thickness Via Mouse Speed

Feb 28, 2011

how can i control my line thickness with the speed of the cursor?Right now ive got this code, but how can i convert (speed) into something that can be translated into thickness?

ActionScript Code:
var prevPt:Point=new Point(mouseX,mouseY);
addEventListener(Event.ENTER_FRAME,mouseSpeed);
function mouseSpeed(e:Event){

[code]....

View 7 Replies

ActionScript 2.0 :: Paint Program - How To Change Thickness Of Line

May 23, 2005

Right now I create a paint program, which will consist of _xmouse, _ymouse, different colors to draw lines, different sizes. But I have a problem:
_root.line.lineStyle(size,0x00ff99,100);
The size is the thickness of the pen. But it don't seems to work inside of that script.

View 8 Replies

ActionScript 2.0 :: Changing The Thickness Of The Line Being Drawn At Runtime?

Apr 17, 2007

I am working on a interactivity wherien i draw lines using a pen/pencil just as in MsPaint application in Microsoft. Ia m done with the pencil/ pen tool and its working fine but I basically want to change the thickness of the line at runtime by using a slider functionality.

Code:

drawing_mc.lineStyle(1, 0x99CC00, 100);

View 1 Replies

Professional :: Deco Tool - Line Looses Thickness Along Rotation

Feb 10, 2010

When using a simple line shape graphic (that was created in Flash) to supply Deco Tool > Symmetry Brush > Rotate Around, the line looses it's thickness along the rotation. See attached image. I'm following chapter 2 in Flash CS4 Classroom In A Book, and the visuals from the book do not match what is happening on my computer.

View 1 Replies

IDE :: Make Flash Not Bother The Line Thickness When Changing Scale Or Some Sort Of Alternative?

Apr 11, 2012

I'm having an issue when it comes to line thickness on movie clips, when a movieclip is flipped the line thickness vanishes due to Flash thinking I'm squishing the MovieClip. Is there any way I can make Flash not bother the line thickness when changing scale or some sort of alternative? Or is my only choice to kill line thickness altogether.

View 1 Replies

Increasing The Size Of The Stage And Moving All Layers

Dec 18, 2009

I'm widening the stage of a existing FLA, is it possible to widen the stage and to reposition all the layers of the FLA so they move in relation to the widing of the stage. Or do I have to reposition all of the layers individually?

View 1 Replies

Professional :: Increasing Editing Stage Size?

May 30, 2011

I am creating a platform game that is 800 by 600 dimension where the camera scrolls with the player. The problem i am having is that if i want to draw a map that goes off screen the stage are that i can edit in can only go so far when i am creating the map however i drag an object further than the edge of the editing space i can see it when the camera scrolls over to it in game but when i do this i cannot easily edit the objects that are not in view in the editing window. I can slightly increase the size of the editing window by changing the dimensions of the game to 2880 by 600 editing and then changing back to 800 by 600 but still i can only enlarge it up to 2880 because that is the maximum. Is there any way i can edit very large objects like a map that are way bigger than the stage dimensions?

View 1 Replies

ActionScript 3.0 :: Increasing Size Of Icons (Width And Height)

Mar 23, 2009

I have a basic framework for my code, but I am not sure how to just get the icons I have to grow and shrink. Right now I can only get it to snap to +10 width and height.

var grow:Number = 10;
var shrink:Number = 10;
resiSplash_mc.addEventListener(MouseEvent.CLICK, resiClick)
resiSplash_mc.addEventListener(MouseEvent.ROLL_OVE R, resiGrow)
resiSplash_mc.addEventListener(MouseEvent.ROLL_OUT , resiShrink)
function resiClick(event:MouseEvent):void {
[Code] .....

View 1 Replies

Professional :: Reducing/increasing Stage Size Centrally?

Nov 19, 2010

I notice that Flash makes changes to a stage size to the right. Is there a way of making the change so it expands out from a central point, i suppose like photoshop and similar. This has caused me some problems in the past when a client has asked for the site to be increased or reduced in width for example, and it can take a considerable ammount of time to move everything accordinly

View 3 Replies

ActionScript 3.0 :: Smoothly Increasing Size Of Shape (Block)

Jan 10, 2010

I have a block which I want to increase in size but instead of increasing it in one block movement, I want to make it move up smoothly, (its supposed to be water rising). This is what I have at the moment

ActionScript Code:
Lock_Water.addEventListener(MouseEvent.CLICK, resizeLock_Water);
var Lock_Water_ori_pos = true;
var Narrow_Boat_inst_ori_pos = true;
function resizeLock_Water(event:MouseEvent):void {
if (Lock_Water_ori_pos == true){
[Code] .....

View 3 Replies

Flash :: Flex 4.6 Increasing Socket Receive Buffer Size?

Apr 5, 2012

I am having an issue with sockets where the data I'm sending is getting truncated on the client side (Flash/Flex). The data that is sent by my server is full and in tact, but flash does not wait the appropriate amount of time before firing an event saying to read the data. This results in the data not getting fully read and (as such) I can't parse the object out of it after that. We are exploring the possibility of stripping the object into smaller chunks, but the idea is for it to be as lightweight as possible so we would much rather get it to work the way it's supposed to than patch in a temporary solution.I'm not entirely sure if referring to it as the receive 'buffer' is correct, as some computers are able to receive all of the data and others are having it truncated (which means the buffer is adequate but flash isn't waiting the appropriate amount of time to dispatch the event for whatever the reason).

View 1 Replies

Media Server :: Increasing FMS Buffer Size To Display Video Smoothly

Feb 8, 2011

I need to increase my buffer size in FMS. My video is running from RTMP and I faces the problem to load. Video stalled between the running. So I need to increase buffer size for running video smoothly.

View 1 Replies

ActionScript 1/2 :: Conditional Statement - Whenever The Object Is Clicked It Reduces In Opacity By 10% Each Time

Dec 2, 2009

I'm trying to get it so whenever the object is clicked it reduces in opacity by 10% each time, and if it gets to 10% and it's clicked again it stays at 10% instead of going to 0 I got it to keep going down in opacity fine I just don't know the code to keep it from going lower. this is what I have so far

[Code]...

View 1 Replies

ActionScript 3.0 :: Use More Than One Font, Size Or Color On One Line Of Text?

Mar 26, 2009

I'm a noob, so please forgive me if i'm asking something really stupid! I'm doing a group project and i've just got the code from someone else, so i can add my part.

I am trying to add text in actionscript 3 (in a actions frame) simple enough. but.i want to have words next to each other, that have different fonts, font sizes and colors. I've been googling and experimenting for most of the day and haven't really got anywhere.

I will post what i have and what i would like to do, and if someone can help me, i would be most grateful.

Here the code that i'm working with:

[Code]...

When i first got the code, all that was there, was the info.text = "Animal...... line, i added the rest and also tried adding other line of code to make other words be in different fonts, but it didn't work.

So heres what i'm trying to do; I would like to have the headings, example; Animal name, Animal Type.. in one font, and the answers, example; Kangaroo, Mammal in another font.As it is at the moment, it look crap, because its all in the same font, color and size.

View 2 Replies

Flex :: 4 - Size Of .apk File Is More When Packaged From Command Line In Mobile App

May 23, 2011

I have a built a mobile application using flash builder burrito and when i export the app from the builder the size of the apk file is say 1180KB,but when i try packaging the same application from the command line the size increases dramatically(to 2679KB).In both the cases if we see the size of swf file it is 2679KB only.So the builder is using some compression techniques to reduce the file size.Is there any options available in command line to do the same compression technique??.I have used the following command to package the swf file..

[Code]....

View 1 Replies

ActionScript 3.0 :: Which Increase File Size Coding Or Time Line

Feb 11, 2012

which one will increase the file size?

1.coding(alot enter frame)

2.using time line


if i use alot coding will the flash be crash ,what cause crash ? well i have the right coding. but i am saying if too much coding will it crash too ? like if using too much enter frame.

View 1 Replies

Actionscript 3 :: Create A Single Line Text Of Size Close To A Given Height?

Jun 22, 2011

i am given a rectangle of some height and width, i want to fill this rectangle with some dummy single line text. the height and width of text should be close to that of given rectangle. basically, i want the text to full occupy a given rectangular area.

eg: if rectangle height and width is 100 and 300 respectively, then the single line text height and width should be close to 100 and 300 respectively,

View 1 Replies

Flash :: Fonts For Different Types Of Thickness?

Apr 21, 2011

This css can set style for all normal Arial, but I have Arial bold in project, how can I apply bold font for them?

@font-face {
src:url("fonts/ARIAL.TTF");
fontFamily: Arial;

[code].....

View 2 Replies

ActionScript 3.0 :: Graphics.lineStyle() And Stroke Thickness?

Feb 3, 2009

Is there a way to draw a line with graphics.lineTo() that is thinner than 1point? According to the documentation the thinnest lineStyle possible should be 0 but I cannot see any difference between a 0 stroke and a 1 stroke?

View 4 Replies

Actionscript :: Flash LineStyle Rounds Thickness?

Feb 24, 2010

The sprite which contains all element in my game world uses the real-world meter as distance unit, it doesn't know what pixels are. I then apply a scale to this sprite to make it appear correct on screen. Currently I use 1 meter = 100 pixels, so scale = 100.

If I try to draw a line inside this sprite it appears lineStyle(thinkness) rounds the thickness parameter. If I specify 0.5 (50 cm) it always gets drawn with 1 pixel (1 cm). If I specify 0.6, the line becomes 100 pixels, or 1 meter, thick. So basically I can only draw lines of 1, 100, 200 etc pixels thinkness.

Anything I can do about this? Otherwise I'll have to use a smaller unit like millimeters for my world.

View 1 Replies

Professional :: Changing The Thickness, Style And Colour For Each Of The Tools ?

Mar 14, 2012

Whenever i try to draw anthing (oval, box, pencil, brush) it just comes out as a thin green line. Ive tried the obvious by changing the thickness, style and colour for each of the tools but nothing seems to work.

View 3 Replies

Actionscript 3 :: Graphics - LineStyle Thickness To Fill A Circle?

May 19, 2010

i'm trying to build a circle using lines. each line starts in the centre of the circle and is as long as the circle's radius. using a loop along with sine and cosign waves, i can build the circle using the sine and cosign to mark the coordinates of the lineTo parameter.

my problem is with the line thickness parameter of lineStyle. i would like the ends of the lines to match up perfectly, no matter how big the circumference of the circle, but i can't figure out a proper method for the line thickness.

//this is what makes sense to me, but it still creates some gaps
lineThickness = 1 + (((nRadius * 2) * Math.PI) - 360) / 359;
for(var i:int = 0; i < 360; i++)

[code]....

to make the ends of the lines meet up at the circles circumference, without any gaps, i need to widen the lines to fill in the space that's remaining. what makes sense to me, but doesn't work, is to subtract the 360 from the circumference, then divide that number by the amount of empty slots between the lines (which is 359) and adding that number the the thickness of 1.

what's concerning me is that the lineStyle thickness parameter is a Number, but seems to take only values between 0 and 255, so i'm not sure if a floating point number like 1.354 is a valid thickness.

View 1 Replies

ActionScript 3.0 :: Increase/decrease The Stroke To A Specific Thickness In Pixels?

Oct 12, 2009

So, I have a movie clip which consists of a filled vector circle with a stroke. Is it possible to increase/decrease the stroke to a specific thickness in pixels with actionscript whilst the swf is playing?

View 5 Replies

ActionScript 3.0 :: Change Thickness And Color Of A Rectangle Sprite On Mouse Over

Feb 8, 2009

I am a new user. How do I can add more thickness and change color of a rectange Sprite object on mouse over and on mouse out I want to make it normal again.

View 2 Replies

ActionScript :: Flash - Change Lines Thickness/color For Sprite/MovieClip?

Jun 10, 2011

I want to be able to change lines thickness/color for sprites/movieclips created in Flash CS in ActionScript code. Is it possible to achieve this kind of functionality?

View 2 Replies

ActionScript 2.0 :: Code In Flash To Read It Line By Line But Its Only Showing The First Line Out Of 5 Lines?

Dec 17, 2009

i have an xml file and i want my code in flash to read it line by line but its only showing the first line out of 5 lines.Below is the code:

var NigeriaNumber:Number;
var stateName:String;
var year:String;

[code].....

View 0 Replies







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