ActionScript 3.0 :: Getting Rid Of Horizontal Artefacting With Code-drawn Gradient?

Oct 2, 2011

I'm building a video player for my own use and I'm drawing all graphics with AS3. I've attached a screen shot of this problem, and the code. I'm keeping this brief because I think the solution should be simple but I can't find it after a few days of tinkering. You will see from the attached screen shot, I hope, that the video shell base which is 1000 x 100 pixels is not perfectly smooth. And it would be nice and smooth if I drew the graphic in Flash and just built a simple movie clip. But with the graphic drawn with AS3, there's lots of horizontal artefacting. How do I get rid of all the horizontal artefacting lines in the code gradient? The only solution I can find is adding blur with Tween Lite. Which I've turned off, reducing X & Y blurr to zero. But shouldn't it be possible to get a perfectly smooth gradient WITHOUT dozens of horizontal artefacting lines and without having to use a blur from a Tweener engine? I've tinkered with the hexadecimal colour values and increasing and decreaing the Array to more and less colors. The aretfacting persists.

private function M1 ():void {
// Matrix and shape of video shell and gradient
var type:String = GradientType.LINEAR;

[Code].....

View 0 Replies


Similar Posts:


Flash :: Create A Vertical Color Gradient (or Any Other Angle Besides A Flat Horizontal Gradient)?

Mar 2, 2010

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]...

View 3 Replies

Flash :: Gradient Fill Disappears When Drawn Outside Bounds Of Parent?

Nov 19, 2010

I'm trying to draw a gradient in Flash using beginGradientFill and drawRect, but when the rect being drawn is partially outside the bounds of the parent, the gradient isn't drawn at all.

For example, consider the code below:
function testGradient():void {
var g:Graphics = container.graphics;
var width:Number = container.width;
var height:Number = container.height;
[Code] .....

When the rectangle being drawn lies within the bounds of container, everything works: However, if the rectangle lies outside of the bounds of the container, the gradient isn't drawn at all. For example, if the code is changed to:
...
var x:Number = 10;
var y:Number = 10;
...
Then the gradient disappears: Short of doing the math required to draw the box inside the bounds of the parent (and fixing up the gradient so it looks correct), is there any way to deal with this?

View 1 Replies

ActionScript 2.0 :: Removing Rectangles Drawn Using Code?

Aug 11, 2011

I have written code to draw a rectangle around each movieclip on the stage when the user clicks a "Show Hotspots" button in the movie. However, when the user (me in this instance) clicks the button a second time, I want those drawn rectangles to disappear. How do I clear a rectangle that is created through code?

View 4 Replies

ActionScript 3.0 :: Flash : Create Gradient Fill, Transparent Background And Radial Gradient?

Dec 26, 2011

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!

View 2 Replies

ActionScript 3.0 :: Draw 25 Horizontal Lines Using Code Automatically?

Aug 10, 2011

I drew a line, and named it multiLinesHorizontal_mc (It's not on the Stage, but in the Library and exported to ActionScript3). Now I would like to use that multiLinesHorizontal_mc and bring it on stage (25 Horizontal Lines) with space between each row the gap should be 5.

View 9 Replies

Flash :: Horizontal Scrolling Game/Large Horizontal Scene?

Apr 25, 2010

I'm currently learning Flash (CS4, AS3) and am creating a game. I have currently 1 flv file with 4 scenes, I then move from left to right and then to scene 2 and go from left to right. This is the game where items pop up that need to be clicked on and you get points.

Is there any way I can combine these onto 1 scene? Flash only allows you to have a maximum of 2880px wide.The reason for this is the transition between the scenes is RUBBISH and that my AS is not working correctly in between scenes (it loses values).

View 2 Replies

IDE :: Path Is Not Drawn?

Jul 19, 2009

i've attached my flash file. I don't get why the path is not drawn if the movieclip is set ask mask. I would like to slowly reveal the text.

View 2 Replies

Flash :: Why This Rectangle Is Not Drawn

Aug 13, 2010

public class Greeter extends MovieClip
{
public function Greeter()

[code].....

View 3 Replies

IDE :: Gradient Mask In CS5?

Nov 13, 2010

Is there a way to create a gradient mask in Flash Pro CS5? I am able to get it to work in FPCS4 but apparantly the process was changed or the functionality eliminated in CS5.

View 1 Replies

ActionScript 2.0 :: How To Get Dynamically Drawn Pie Preloader

Oct 23, 2005

I have been looking for a preloader such as the one at [URL]. The preloader there is just the effect I've been looking for for a long time. I know it's done with scripting, but I could never make it quite right. I even posted here a few times, and found a tutorial, but it used a drag bar to control it, not bytesLoaded. Any tutorials that you could lead me to that focus on making it a preloader

View 14 Replies

ActionScript 3.0 :: Add A Drawn Object To The Stage?

Mar 14, 2010

How do you add a drawn object to the stage using actionScript 3? Does the object need to have an instance name?

View 2 Replies

Break Apart An Already Drawn Character(shapes)?

Jan 22, 2010

How can i easily break the shape into two pieces so that I can change them into movie clips?I tried using the selection tool combined with shift key to create selections but the selection tool only does squares so it's very frustrating to select a portion of my drawing precisely using it, i've given up

View 1 Replies

Professional :: Fading Out Drawn Lines?

Jun 29, 2010

I'm trying to make a program that's meant for graphics tablets in AS3. So far I can allow the user to draw a line across the stage so that they know where their moving their pen around. However I want this line to only be temporary, and so the graphics.Clear() method is called to remove it.

I'd like this to look a lot better however, as the line just instantly disappears. Does anyone know how I could add code that makes the line fade out to 0 alpha first before I call the clear command?

[Code]...

View 6 Replies

ActionScript 1/2 :: Saving Dynamically Drawn As MC?

Dec 7, 2010

I seached everywhere and try fo find drawing board code that saves after drawing but it seems it's only applicable in AS3, perhaps anyone have any tutorial link or have

View 2 Replies

Flex :: How To Rotate Drawn Rectangle

May 18, 2010

I wrote the following code for drawing a rotate rectangle
var s:UIComponent = new UIComponent();
s.graphics.lineStyle(1, 0x0000FF);
s.graphics.drawRect(50, 50, 200, 200);
s.rotation = 30;
template.addChild(s);
Where template is a canvas. Its rotate nicely but the problem is the position is not in right place. i.e. it is not in (50,50) after rotate.

View 1 Replies

Flash - Using Vector-drawn Numbers?

Apr 9, 2011

I want to use numbers I've drawn myself to represent a number, but don't know how to implement this. How would I display the equivalent of an integer with these numbers? If it's necessary to have them in a tile pattern, which makes sense to me considering how older games worked, then what code would I use to switch between each? Or is there another, better way? Also, I need the number to be able to adjust to the number of digits in the number and read from left to right (so the 1 in 10 would be in the same place as the 1 in 1).

View 2 Replies

Actionscript 3 :: Flash - Drawn Objects Are Not The Same

Mar 17, 2012

I'm playing with Open Flash Chart. Take a look at this chart: [URL] As you can see, the rounded dot points look ugly. Some of them are more rounded, some of them less, they don't look the same, as they should. I don't know AS3 and have no idea what is the case. I checked the source code:

[Code]....

View 1 Replies

ActionScript 3.0 :: How To Add Text To A Button Drawn

Jan 10, 2009

I've drawn a button using actionscript as seen in the code below but i do not know how i add text to my button

import flash.events.MouseEvent;
import flash.display.*;
import flash.net.URLRequest;

[code]......

View 9 Replies

ActionScript 3.0 :: Know What Has Been Drawn In A 'graphics' Object

Jul 17, 2009

Lets say I have a customMovieClip. I sometimes draw an ellipse with customMovieClip.graphics and sometimes a rectangle. Now I want to know what was the shape ( ellipse/rect) that was created using a particular graphics object. Doing this would enable me to pinpoint what exactly to do with that customMovieClip() instance.

View 3 Replies

ActionScript 2.0 :: Get X Position Of A Drawn Movieclip

Jul 31, 2009

If i draw a movieclip on a frame (root) as such:[code]This will draw a simple square from position 20,20 on root. Now if i trace penName_mc._x i would expect it to give me the distance from the root origin i.e. 20 however it always produces 0. My questions are:

1- Why doesnt it consider x as 20?

2- Is there no way to determine the x of this newly created movieclip from the origin? (besides drawing from 0,0)

View 2 Replies

ActionScript 2.0 :: Resize Shapes Drawn In It?

Nov 1, 2010

How do you resize shapes drawn in actionscript?

I need to create a skewed rectangle and on rollover, have the right edge move outwards.. making the skewed rectangle wider.. while keeping the proportions.[code]...

View 1 Replies

ActionScript 3.0 :: Add Mclips Over Drawn Line?

Nov 2, 2010

On mouse move i have a line drawn using lineTo method. This works like in Paint or most drawing programs: the mouse drawing like a pencil. What i need now, and dont know how to accomplish, is to add a number of mclips over that line. And this mclips should be over the line but separated to each other (different x and y of the drawn line). So in the end when moving the mouse the user should get a line and, every certain distance, a number of mclips over it.

View 2 Replies

ActionScript 2.0 :: Create 2-3 Drawn Lines?

Apr 26, 2007

Is it possible to create 2-3 drawn lines in actionscript?Wanted to make a dynamic chart, but so far when I add coding for the second line, the first no longer works.

Trying to nest the lines in movie clips didn't work.Is this a restriction of the createEmptyMovieClip?I'm using....

_root.createEmptyMovieClip("lineFirst",0);
lineFirst.lineStyle(12,0x000000,100);
lineFirst.moveTo(0,0);

View 2 Replies

ActionScript 2.0 :: Deleting Xml Drawn Content From Mc

Dec 19, 2007

I have an XML file which consists of x/y coordinates...from this I draw shapes in a movieclip on stage when the user chooses(from list component) an xml to load...how do I clear the contents of the mc so that when the user chooses another xml file from the list component the new xml is drawn in the now emptied mc from before??...

View 1 Replies

ActionScript 3.0 :: Keep Lines Drawn Between Different Movieclips

Aug 27, 2009

im trying to work out how to keep lines drawn between different movieclips. It works, but wont clear the lines!!, so i have to leave it out.. to see something .. should I put them all inside an empty movieclip?

[Code]...

View 4 Replies

ActionScript 2.0 :: Height Being Drawn In A Triangle

May 16, 2005

I have this triangle drawn (see fla)(Got it from this forum). Now I want a height being drawn as well. I want a height from point A beeing drawn to BC The angle at BC must be 90 degrees of course and the height drawn must alter when I drag the points B and C. Is this possible to do in flash, I have seen it done in JAVA

View 3 Replies

ActionScript 2.0 :: Duplicate A Mask Drawn With API?

May 9, 2004

I altered a movie with the following AS:

[Code]...

How can I duplicate this "mask", and place it on a grid. I tried a couple of things, but my "code juggling" didn't work this time... *I left out the function "drawCircle".

View 9 Replies

Gradient Tool No Worky

Apr 20, 2006

When I create a gradient and fill with it, sometimes the gradient transform tool works perfectly. Other times, I click on the gradient fill with the gradient transform tool and the gradient is selected as if I clicked it with the "Selection Tool."I can't get the gradient transform tool to give me any handles to adjust the gradient once applied.

View 11 Replies

ActionScript 3.0 :: Draw Gradient Box?

Nov 7, 2009

i have drawn a gradient shape on the stage and i want to replicate it with code now.how the gradient looked on the stage.how do i spread it out more?, you can see on the picture that its wider than shape's height.and i am also guessing the angle...

Code:
var upColor:uint = 0x9999cc;
var downColor:uint = 0x000000;[code].....

View 0 Replies







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