ActionScript 3.0 :: Fill A Rectangle With 45 Degree Lines?
Oct 30, 2009I know that this could be solved a bunch of different ways, but I feel like I'm on the wrong track. [code]...
View 3 RepliesI know that this could be solved a bunch of different ways, but I feel like I'm on the wrong track. [code]...
View 3 RepliesI Would like to draw the texture that I've got stored in/as a bitmapdata. I hoped to be able to fill a rectangle with the texture. Is ther a easy way to do this?
View 1 RepliesAnyone knows if it's possible to fill a rectangle with a bitmap with action script?
View 12 RepliesI have a normal rectangle shape in flash. Id like to change the fill color of it using code, so I can use flashvars and be able to change the color of the shape with a few HTML adjustments.All I need to know is how to change the fill color of the shape. I've got the flashvars sorted.
View 1 Repliesim newbie here and in AS, and dont speak english very well :$ ..
i want create one box with 4 lines and without fill.... i have no idea to do this...
using line tool to do this, the lines rise when i apply the resize script..
How to make boundary fill in flash, like paint brush. If I click on any position bounded area will be filled with particular color. I have tried to make it
import flash.display.Bitmap;import flash.display.BitmapData;
var bmd1:BitmapData = new BitmapData(20, 20, false, 0x00000000);
var bm1:Bitmap = new Bitmap(bmd1);this.addChild(bm1);
function boundary_fill(x:Number, y:Number, fcolor, bcolor){
[Code] .....
I have rectangle now I want to fill it with red color but it show attach overflow error .
i want create one box with 4 lines and without fill. using line tool to do this, the lines rise when i apply the resize script..
View 8 RepliesI what to make a function that is drawing a square without the fill only the lines in refresh(sometime fast, sometime slow). And I don't have a clue about the starting point of this function.
View 1 RepliesCan i change the fill color of an existend rounded rectangle primitive?[code]
View 7 Replieshow to take a display shape, and have the lines & fill randomly change colors? I'm sure this can be done
View 1 RepliesFor 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?
I am new to flash, trying to do some animation character. I have 2 queries
1. What is lock fill; whenever I am trying to fill a color, it shows lock fill....
2. If I am creating a non regular figure like say with pencil, if I draw some part of it & do other part by later; these will be assumed different objects & I am not able to fill the whole figure with a selected color.
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 RepliesI have been working on a map viewer based blitting technique. As part of the map I need to draw approximately 50000 lines and performance is currently really poor.
Code: Select allvar movie:Shape = new Shape();
for( ... )
{
movie.graphics.clear();[code].....
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 RepliesI 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?
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 RepliesMy code is on the main timeline.I call a function loop to draw lines between them.The lines are drawing between the right x, y values BUT between those values on the main stage, not those values within the kite.For example, dot1_mc is at x100, y0 inside kite. the line that should go from its center, draws from stage x100, 0.How do I draw the lines inside kite so that they draw between the dots?Heres my code that draws the linesPHP Code:
function loop():void{ lineDrawing.graphics.clear(); var a:Point = new Point(kite_mc.dot1_mc.x, kite_mc.dot1_mc.y); var b:Point = new Point(kite_mc.dot2_mc.x, kite_mc.dot2_mc.y); var c:Point = new
[code].....
I have a scratch card. Basically I'm masking a movie clip with an empty shape. I can draw on that mask and thus my movieclip will become visible. I have also attached the fla.
Now what I would like to achieve is that when you fill a percentage of that mask, let's say 70%, I automatically fill the whole layer so that all of my movieclip becomes visible (as mask is fully filled).
I have a pointer that rotates with this code (on the MC):
Code:
onClipEvent (enterFrame) {
_rotation += 0.2;
}
This works fine but now I would like to have another pointer but with an starting angle of 60degrees. Is there an easy way to ad a starting degree or angle value on this code?
I have a client that wants a product to rotate around its axis for a full 360 degree view of the product. The final view needs to be draggable - so a user can use their mouse to turn it left or right. I took photos of the product in 10 degree increments and created a movie clip - but I can't figure out how to get it so a user can control the view: turning the product left or right.
View 3 Repliesi want to rotate one line 0-180 how to set that target.i used this code movieclipname._rotation +=2;It is rotated 360 degree and looping.I just want to rotate 0-180 degree only once.
View 1 Repliescreating a 360 degree rotation like the one seen here: [URL] I need to be able to load about 24-36 images and have a slider to allow the user to rotate the images.
View 3 Replies1. I selected the Rectangle tool, and made sure Object Drawing Mode was not selected.
2. I picked colors for stroke and fill, and drew a rectangle.
3. I clicked the Selection tool, then dragged around the rectangle to select all of it.
4. In the Property Inspector I clicked the fill color icon. I clicked the square with the slash, to designate no fill. The fill disappears.
Everything has worked so far. But now I decide I want a fill color after all. I select the shape again. But clicking the fill color icon in the Property Inspector and the Tool panel has no effect on bringing a fill color back to the shape. I can't figure out how to do that.
Actually, I could restore the original fill color using Undo, or the History Panel. But it seems there must be a way using the Property Inspector.
creating 360 degree views? know nothing but Flash and Flex. Is there any tutorial available for beginners? to create thease kind of view using Flash and AS3
I need something like this:[URL]
I'm trying to get the distance between two objects. Problem is that both objects are -45º rotated but one of them moves up and down with stage resize. So the distance gets a random degree. I've attached an image so that it could be simpler to understand my problem.
View 3 RepliesI've got a 3D model at hand, which I have imported as a movie and an image sequence of each frame depending on which is necessary. I basically would want to rotate it by 360 degree both on the x and y axis on a canvas as well as having that done manually, such as having to drag my mouse to control which direction the model rotates in. Can I do this in Flash?
View 5 RepliesOK I have worked out the code and it is good:
var xDist:Number;
var yDist:Number;
var xRatio:Number;
[code]....
how to rotate an object 360 degree in as3
View 2 RepliesI have written degree symbol (example: 15°C) in flash but when I export the move the symbol is absconding.Is there any way to retain the symbol when the movie is rendered?
View 1 Replies