ActionScript 2.0 :: Changing LineStyle On Rollover?
Jul 28, 2006I have a box lined out by AS.
How can I change its lineStyle when rollOver, making it draker for example?
I have a box lined out by AS.
How can I change its lineStyle when rollOver, making it draker for example?
i'm attempting to draw lines beside each other, but the last line from the first color group takes on the color from the second color group before the second color is assigned.
[Code]...
I have a drawing api with the simple code of a flash:
Code:
stop();
this.createEmptyMovieClip("dibujo", 1);
dibujo.lineStyle(4, 0x000FFF, 100);
attachMovie("lapiz", "lapiz", 11);
[Code] .....
But I need a more complex lineStyle, I mean, a brush that look like a paint brush, like water color.
I have Macromedia Flash 8 Pro with AS2 and I was wondering if there was a function that would change the depth of a movieclip on rollover of a button.
View 1 RepliesI am trying to change a text fields text when I am rolling over with my mouse over an object. I currently have this code:[code]Now the problem is, how do I switch back. When my mouse isnt over the 'roulette_deur' button?
View 1 Replieshow to increase the alpha of a movie clip when you rollover a button.
View 1 RepliesI followed the Changing Colors Using ActionScript and understand how it works, but I want to have the color stay changed until I click on another button. I also want to have one set of buttons for one shape and another set for a 2nd shape and a 3rd set for a 3rd shape. Do I just recopy the script substituting different shape names?
View 1 RepliesI have got one movieclip that is a square it is 20 x 20 the movieclip changes from black to white when you roll over it and remains white. The problem I have is that I need 3000 of them and putting them in a grid format so the user can create there own black and white mosaic. But when I do it only the newest square added to the stage changes colour i think i have gone down the wrong path and I've hit a dead end.
This is my code (Which im 90% is all wrong):
PHP Code:
stop();
var sqreArray:Array = new Array();
for (var i:int = numChildren - 0;
i >= 3000; i++) {
var child:DisplayObject = getChildAt(i);
[Code] .....
I have a movieclip that I want to rollover to begin animation. I don't want the "finger" pointer so people aren't inclined to click it. i want to keep the default cursor.
How can this be achieved?
another rollover question dealing with changing the opacity of the button. Anyways. after digging through the site I found this:
[Code]...
All i am looking for is to draw a line from point 1 x, y z, to point2 x y z Since this was CS 4 and z properties are enabled, i wonder how i could do this for a line.
View 3 RepliesWith linestyle, I can only specify a color unit value. How do I add a gradient to the line?
View 1 Repliesi am trying to make a brush tool in actionscript 3, where kids can paint colors inside a circle using the brush. i have achieved this using linestyle. Now i want the brush to snap the color when the kid is about to complete(say when they are 95% to complete the painting). How do i know how much the kid has painted on the circle?
View 2 RepliesDoes anyone know if its possible to draw a dotted line through script?
View 5 RepliesNormally when we draw a rectangle with linewidth 1 no problem.But if we apply a linewidth more than 10, the corners of rectangle seems rounded shape.[code]
View 2 RepliesIs 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 RepliesThe 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.
im drawing a line from 0,0 to 100,100 im using this to modify the linestyle:
draw_line.graphics.lineStyle(1, 0xFF0000);
That line is now of 1 thickness.Is there anyway i can change the thickness of the line to say 10, but without redrawing the line?
I'm attempting to make a very simple drawing programme. There will be maybe 4/5 buttons. Three of them when you click on the change the color of the line the user draws. the other two will change the line thickness. I've tried setting up a variable to set to how thick the line should be depending on the button the user has pressed.But it has no effect - i'm guessing that's because the variable only exists within the confines of the function that I have it in.[code]
View 1 RepliesHow do I add gradient fill on a line (linestyle) rather than a box?
View 1 RepliesI was told to learn OOP, and here is my first class. It is to draw a box where you can set width, height, x, y, target movie clip, depth and lineStyle. I test my fla but it returns error on getLineStyle function.
View 3 RepliesI am creating the line trough "lineStyle" method but I need that instead of color on the fill I want to use an image.something like the beginBitmapFill well I tried everything and could not fin a solution for that.even the " lineGradientStyle" does not supprt the bitmap fill...
View 2 Repliesi'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.
I draw a line using "graphics.lineTo" into a movieclip and I need to change my linestyle if the user ask for that throw a button in runtime. I can change the color, but I can't change the linestyle...Is there someway to change it?
View 1 RepliesI'm trying to draw a mask that's a pill shape but I can't seem to adjust the linestyle properly.
Code:
import flash.display.Sprite;
var pill:Sprite = new Sprite();
pill.graphics.beginFill(0xFF0000,1);
pill.graphics.lineStyle(1,0x000000,1,false,"normal","round","round");
pill.graphics.moveTo(0,6);
[Code] .....
The script for my timer worked for one button but as soon as I set up the other 2 buttons to do the same, I started having a problem where the rollover action would go after the set amount of time was up but then would repeat itself once after the set amount of time was up again. just to clarify, if it needs it, the reason I don't have a rollout attached to these buttons is because I want the menu to stay out until you leave the menu area
so I have an invisible button called menuin_btn which sits to the right of the menu and covers the rest of the stage where the content will be, so you have to rollover that area for the menu to roll back in. The "rollin" in my code brings the movie clip to frame 16 (the end) where I have a gotoAndStop(1); command to get it back to frame 1 so the rollover can be used again. I've attached a zip with my current flash file and swf and here is what my current script looks like on the main scene:
[Code]...
I am making a ball move from left to right and back. but when I rollover twice quickly, it also accepts the second rollover command. I would like it to accept that second rollover only when the first one is finished. I mean, I want the first to be finished before it accepts another rollover.I know it is simple to solve this with a tween using frames instead of as, but I was wondering if someone knows how to adapt the script.
on(rollOver){
ballTween = new mx.transitions.Tween(balMC, "_x", mx.transitions.easing.Regular.easeOut,balMC._x, 44, .5, true);
ballTween.onMotionFinished = function() {
ballTweenterug = new mx.transitions.Tween(balMC, "_x", mx.transitions.easing.Regular.easeOut, 44,11.9, .5, true);
I'm using actionscript 1.0 and 2.0 on flash Pro 8 and keep getting an error when I test the movie. Here is the error:
[Code]...
I've tried to create this rollover navigation...starting over 6 times already. Is there different language / coding for 1.0 and 2.0? I don't understand what I'm doing wrong.
i wnat to show the message "Hi how are u" as a rollover message or a tooltip when i rollover the hyperlink Know More
View 1 RepliesI'm trying to create a rollover for a movie clip. On rollover, a line underlines the text,and when it rolls out, the underline reverses. This works fine the first time. The next time you rollover, the animation doesn't work. Then when you move the mouse off the button, a line appears under the text and doesn't go away. Here's my code on the invisible button.
on(rollOver){
this.gotoAndPlay("animIn");
}
[code].....