ActionScript 3.0 :: Want To Make A Gradient Line
Aug 27, 2011I'm making a lens flare effect, and I want to make a gradient line. The matrix has the right angle, but it does some weird stuff when you try to draw a line.[code]
View 2 RepliesI'm making a lens flare effect, and I want to make a gradient line. The matrix has the right angle, but it does some weird stuff when you try to draw a line.[code]
View 2 RepliesHow to create the gradient line?
View 4 Repliesi'm drawing a line with a gradient style, but for some reason the line's x position appears to be about 4 or 5 instead of 0 when added to the display list. tracing the line's x postion returns 0, but it's clearly visible that the line is not positioned at that coordinate.if i remove the gradient box then it is positioned correctly, but that's not a solution since i would lose the gradient.i'm targeting FlashPlayer 11 / AIR 3 using Flash Builder.[code]
View 2 RepliesI am trying to construct a line dynamically, with a start and end gradient. I want to avoid using a GradientBox, as the lines are dynamic. All I want to do is have the line start red, end blue. This code does not work though :(
[Code]...
i have a straight, gradient line which extends from one end of the screen to the other.
what is the best (or only) approach for screen wrapping this line graphic, so that it appears to be moving?
my current "solution" is to draw the horizontal line at double the width of the screen and duplicate the gradient pattern for each half of the line. the line is center-registered and it's moved toward the right. once half of the line traverses the stage, the line is reset to it's starting point.
my first time trying to draw a multi-color gradient in actionscript 3. So I got this code from the help docs, but I can't seem to get a vertical gradient, whatever formula or number I use for rotate, it stays stuck on the default horizontal gradient :(
[Code]...
I'm trying to create spinning rays in actionscript to use in my website.Below is the rough idea of what i'm trying to create.Is it possible to create absolutely with 0 images.Following is the actionscript code in which i couldn't figure out how to add gradient, transperant background and little radial gradient to create glow effect.
Code:
function CreateRays():Shape {
var ray:Shape = new Shape();
ray.graphics.beginFill(0xFF9900,.5);
ray.graphics.lineStyle(1,0xFF9900,.5);
[code]....
If you paste above code in 1st frame of your scene with nothing on your scene, it will give you sweet rotating rays!
I am using Flex 4 and AS3 and I am trying to make it so that the user can draw a freehand line with the cursor - I have this part done.However, I also need the line to be a dashed line instead of one solid line like it is now. below is my code I am using. I have found some examples on how to do this, but they are all for straight lines, not for a freehand line.
Class File (DrawingArea):
package
{
import flash.display.BitmapData;
import flash.events.Event;
import flash.events.MouseEvent;
[code]....
Hi, I can't figure out how to make a smooth gradient background.I've been searching the forums, but can't figure it out.
View 5 RepliesI'm trying to achieve a roundedRectangle in gradient by using just code but i'm getting stuck.I was able to achieve the gradient part but adding the rounded piece its difficult, please see me code,
Code:
package com.callwave.web.fuze.view.skinLibrary
{
import mx.core.UIComponent;
import flash.filters.DropShadowFilter;
import mx.graphics.LinearGradient;
[code]....
make a 4 color gradient, a separate color on each corner?
View 2 Repliesi 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].....
I've been searching it everywhere, but couldn't find anything in the net. I want to make smooth line movement. I've tried to create motion, but line just moves, and I want it to move smoothly according to the path. What I want to achieve can be seen [URL].. that's what I did so far - made movement out of several broken lines
View 3 RepliesRecently i wanted to make a custom coordinate system which user gives his number and after calculating, a number between 0 to 27 will come out, the app shows us with growing line where exactlly that point located. I mean that I have a vertical line the highest point is 0 and the lowerst is 27 and i want to put a growing line which grows to the number we want. forexample if that number is 6, we will have a line growed from 0 to 6 and shows us where 6 located.
View 3 RepliesI've been searching it everywhere, but couldn't find anything in the net. I want to make smooth line movement. I've tried to create motion, but line just moves, and I want it to move smoothly according to the path. What I want to achieve can be seen here:
[URL]
But that's what I did so far - made movement out of several broken lines - how can I make more smooth movement?
for (var i = 0 ; i < 10000000; i++) ;stop();I've placed this code in frame 1 of a flash app. As you can see it does nothing but count to 10,000,000. This takes about 20 seconds to execute.
In C#.NET, this one line runs over 400 times faster. It can count to one billion in less time. Why? I could see it being faster in C#, but what could possibly be going on under the hood that could make it 400 times slower in AS, given that the one line should reduce to just a few machine instructions?
(If you're wondering, I've been tasked with porting some C# code to ActionScript. The code has some scientific calculations in it. But in AS they run so slow that it is unusable. This is the most basic example of the problem.)
what is the syntax for a line break in flash. I have an array with a large amount of text
and within the text i want to insert a break to make it go to the next line.
I am having a problem with making 1 animation. I want to make a slowly appearing line. The scene is a pencil drawing a line. So as the pen end moves a line is slowly appearing, I couldn't get the technique on doing this?
View 5 RepliesI have moving movie clip on stage and I want to draw a line so that it fallows my MC
ActionScript Code:
var sp:Sprite = new Sprite();
addChild(sp);
[Code].....
The problem is that on EnterFrame keeps drawing the line from coordinates 500, 200, but I want just one line so it follows constantly my movie clip.
I have my file set so that the mouse cursor leaves a trail behind it. However, it clutters up the screen. Is there any way to make it fade after a set amount of time? The only script is the following, which is set in the initial frame.[code]...
View 2 RepliesHow do I make a line dotted programatically? A line can be made dotted if drawn in the IDE, so it's got to be possible, but there doesn't seem to be anything in the Graphics (lineStyle) class to allow for this.
View 6 RepliesI'm trying to make multiple comparisons in the same line and it's not working. I'm trying to get the Try Again because of the comparison between the minutes and seconds at the end but it's not reading that part of the line.
Here is the code:
[Code]...
how to make a textbox that when a line of text is inputed, it doesnt overwrite whats already in the textbox, but instead goes to the next line.example:
hi
hi
hi
hi
It would look like that.
I'm trying to make straight lines grow out of a stationary dot, like veins. I've tried shape tween, but it only works for shapes, not lines. I'd just get a blank workspace when I hit play. I've also tried motion tween, but I can't get the line to grow continuously to a point.
View 11 RepliesI created a character that can move left or right according to keys pressed by the user. (simple enough)But the most I could do is make it move along a straight line, (change X value)or along inclined lines by defining them as linear functions. (not very effective i guess)My question is, is there a way for me to draw a line and have my character walk across it?Is there something that would allow me to get the Y value of a curved line I drew based on its X value?Obviously this wouldn't be a problem if I could just draw a line from a mathematical equation, but my searches proved that to be rather complicated.
View 2 RepliesHow do you make an MC travel in a single straight line (not two, not three, only one) according to mouse position and current position?
View 3 RepliesHow to make somethig that will check all var's on the objects in the _root time line? lets say "allObjects" means all the objects in the _root time line:
Code: Select allif(_root[allObjects]._loc1==1){
doSomething()
}
So lets say that I have 20 pieces of an "A" MC and one of a "B" MC, 10 of the "A" MC have the code "_loc1=1" and the rest have "_loc1=0" and if I roll over the 10 A MC that have _loc1=1 the B MC will gotoAndStop(2) but if I roll over the rest of the A MC's nothing happens.
(the A MC's have different names like: planetX; ship21; enemy61; ... )And a var in the _root time line will have the name of the MC that has the mouse over it (rolled over it)So something like: var MCname = "planetX"
Im trying to dynamically make a dotted line box around some thing. Making the box is simple but and I make it dotted or do I have to make a lot of little lines. Im going for a selection box like look
View 2 RepliesAttached is the .fla. I can't seem to figure out how to make the line drawn to be under the oval (right now it's drawing above it....)
View 2 RepliesI got some problems with my code, here is my code:
Code:
public function left_hand_sides(a:String):Array{
var res:Array = new Array();
var r:Array = new Array();[code]........
when I debug this piece of code, I find some weird things happened. It didn't run the way I think it should be. I googled some info about variable scope in AS 3 and find out some interesting info. So I changed it a little bit to make it run. Anyway, it still didn't run. When I debug line by line, until
Code:
if(r[1] == a)
res.push(r[0]);