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
Similar Posts:
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
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
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
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
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
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
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
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
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
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
Feb 16, 2012
I am looking for Custom Slider control the time line animation i am doing a demo presentation. The file i have uploaded is flash cs4 version need help on AS3.
View 6 Replies
Aug 3, 2011
I am trying to set up a file with a sliderMC that would change frames in another mc when the user drags it left or right. So far I have:
var pos:MovieClip;
pos.onPress = function ():Void{
this.startDrag(true, -10, 0, 600, 0);
[code].....
but I am stumped as to how to code AS3 so that when the instance of
pos is between 0-150 to go to mc frame 1
when x equals 150-300 to go to mc frame 2
when x equals 300-450 to go to mc frame 3
when x equals 450-600 to go to mc frame 4
when x is greater than 600 to go to mc frame 5
View 8 Replies
Mar 10, 2011
Im making a Drawing App and i want a slider to change brushsize i have a varible set up to change the brush size.
The Varrible is:
var ColourSize = "";
ColourSize = 10;
And that works with changing the size but i need a slider to change it..
View 2 Replies
May 5, 2005
I'm new to actionscript, but here's what I would like to do.I want to have a single animation and two sliders. slider1 will advance and rewind the movieclip,we'll call it "scrubbing", while slider2 will change the highest frame of the mc acheivable by the "scrub" slider1. Therefore if slider2 is at one end slider1 will not advance the mc at all, while if slider2 is maxed out then slider1 will "scrub" the whole movie.
View 1 Replies
May 6, 2010
Is there anyway to change the height of the slider in AS3? (CS3), I've tried changing the actual graphic (of the bar) in the library and no matter how big I make it it's always locked to 13 pixels high.
View 3 Replies
Sep 19, 2011
I am trying to use the slider component (aSlider) to control the volume of mySound which is a class called PlaySound. Created an addEventListener for aSlider with a SlideEvent.CHANGE executing a function called changeVolume. Everything else works but I can't seem to get the slider to control the volume of mySound.
import flash.events.Event;import fl.controls.Slider;import fl.events.SliderEvent;import fl.controls.Label;
var mySound:PlaySound = new PlaySound ;
[Code].....
View 5 Replies
Jan 23, 2012
how to change the size of text in a text box, once the user has typed something in using the slider component?
View 6 Replies
May 18, 2011
I am trying to build a interactive slider,in which when user drag the slider up the height of silhouette increases by some fix amount n when user drag the slider down the height of silhouette decreases by some fix amount.the problem i am facing is that when i drag the slider slowly than everything works fine but when i drag the slider faster than the height dont increase or decrease properly.i mean the increment or decrement in the height of silhouette is depending on speed of slider,which i dnt want.
here is the code-
Code:
var bounds:Rectangle = new Rectangle(499.65,260,0,240);
slider.addEventListener(MouseEvent.MOUSE_DOWN, moveSlider);
stage.addEventListener(MouseEvent.MOUSE_UP, stopSlider);
[code]....
View 1 Replies
Nov 26, 2011
I am making a house with actionscript, and the roof is made by a triangle. I am supposed to change the triangle height (y-axis) using a slider.[code]...
View 9 Replies
Apr 30, 2009
I have created a slider bar using AS2, when I say slider bar I mean similar to what you would find on a mixing desk in a music studio, i.e. you 'slide' the button up and down, changing the value associated with it. My slider bar changes a value that is written on the screen, i.e. it goes from 0 to 100 as you slide the button up. Now I want to change this so that when you slide the button the value starts to slowly change, and eventually reaches the value you've pushed the button to but after you've finished moving the button. Not sure that makes sense! To put it another way: if it takes you half a second to move the slide button from the bottom to the top, it will take 10 seconds for the value associated with it to reach 100.
Below are the relevant bits of code:
This starts the slider action when the button is pressed:
Code:
function onPress() {
this.startDrag(false, sliderMin, 515, sliderMax, 515);
}
This determines the displayed value from the slider bar position. Obviously right now the value changes instantly when you move the slider button
Code:
function onMouseMove() {
_root.powerGraph.totalPower = Math.round((_root.startMenu.coal1Slider._x - sliderMin) / (sliderMax - sliderMin) * 100);
}
This is used to display the value:
Code:
function onEnterFrame() {
this.createTextField("outputPower", _root.startMenu.getNextHighestDepth(), 130, -20, 190, 101); .....
This stops the button movement:
Code:
function onRelease() {
this.stopDrag();
}
View 1 Replies
Aug 11, 2011
I need to create an interactive piece. It's much more involved than this but fundamentally I need to create a slider on the left side of a window that is the color spectrum. I'll put a small triangular pointer beside it that can be moved up and down beside the spectrum. I want whatever color the slider is next to to show up in a symbol on the right. I've attached a simple image that illustrates it. So to restate it again, I'd slide the triangular symbol up and down beside the spectrum gradient on the left and whatever color it is pointing to would just show up in the symbol on the right, real time.
View 2 Replies
Nov 3, 2009
I have a dynamically created slider with AS3:
I can reference the thumb by s.getChildAt(1) ~ that took me quite a while to figure out!
But how would I assign a new graphic to it?
View 1 Replies
Jul 18, 2006
I am using code from the site, [URL] and I would like to make my slider smaller or bigger depending on the link. I'm guessing it can be done with action script, but have no idea how to do it. To view my file it's at: [URL] the FLA is at:[URL] Sadly, I need to squeeze one more link on the top menu and I am running out of room.
View 5 Replies
Mar 9, 2012
how one goes about changing the colour on the volume bar for playing videos like youtube does as the volume slider is moving. I don't think I need to go into depth using the graphics classes. What I'm looking for are ideas when a user changes the volume while playing a video, say in youtube, while dragging the volume control, the colour of the background bar changes. I've seen lots of help about creating volume bars for videos, but I don't see how to change the volume bar colour as the volume slider is moving.
View 1 Replies
Jun 4, 2010
I am having a set of slider for each bar in the graph. I have bindded all the sliders with their corresponding bars. When i change the value of slider the value in the ArrayCollection changes and i have also used
[Code]...
View 1 Replies
Feb 28, 2011
My JSON Data file ise data.txt
[
{
"sayim":"1",
"x":"400",
[code]...
and my aim ise to create a Slider which can change starting and ending of the graphic, it is like what is showing in figure 6 in this website and here the MXML codes;
.
..
...
jsonDataArray = JSON.decode(urlLoader.data);
[code]...
The problem is "dataProvider" definition in LineChart, I wrote this code but it is still not working,
dataProvider="{dgg(sayim>=daySlider.values[0] && sayim<=daySlider.values[1])}"
what is the right code to control the LineChart with the Slider.
View 1 Replies
May 2, 2011
I have two movieclips in the centre of my stage. One is on top of the other and fade's between them using left/right buttons.I want to change this so that they slide in like a jQuery slider does. I don't want to change the initial position of the movieclips (on top of each other) just change the fade effect to a slide in.
View 1 Replies
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
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