Advertisement

02.20.2008 at 05:03AM PST, ID: 23177387
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.9

Actionscript 3.0 Slider (simple)

Asked by steve_bloc78 in Macromedia Flash

Tags: ,

I am using the attached code to create a slider in AS3.

Is there a way to attach a graphic to the drag-handle of the slider so that when it's moved up and down it looks like the slider fills with a colour, or reduces with colour?  Like on a volume slider...

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
stop();
 
 
//import slider classes
import fl.controls.Slider;
import fl.events.SliderEvent;
//set initial text to 0
ALERTER.text = "0";
 
//instantiate slider 
var s:Slider = new Slider();
 
//position slider
s.move(50,100);
 
// control if slider updates instantly or after mouse is released
s.liveDragging = true;
 
//set size of slider
s.setSize(310,0);
 
//set maximum value
s.maximum = 110;
 
//set mininum value
s.minimum = -10;
 
//set tick position interval, you do not have to set this
s.tickInterval = 10;
 
// this is a listener that broadcasts evertime an event changes
s.addEventListener(SliderEvent.CHANGE, announceChange);
 
// this is a listener that broadcasts evertime an event changes
//s.addEventListener(SliderEvent.CHANGE, announceChange2);
 
//add slider to main movie
h_1_container.addChild(s);
 
 
//gets called and displayed in the ALERTER dynamic text field
function announceChange(e:SliderEvent):void {
    // output window and text field
	//trace("Slider value is now: " + e.target.value);
	ALERTER.text = e.target.value;
}
 
//gets called and displayed in the txtFld
//function announceChange2(e:SliderEvent):void {
    // output window and text field
	//trace("Slider value is now: " + e.target.value);
	//txtFld.text = e.target.value;
//}
 
 
// add a pretty text box with some trims
//var txtFld:TextField = new TextField();
// give it some properties
//txtFld.x = txtFld.y = 20;
//txtFld.width = 30;
//txtFld.border = true;
//txtFld.borderColor =0x000033;
//txtFld.background = true;
//txtFld.backgroundColor = 0xEEEEFF;
//txtFld.textColor =0x000099;
//txtFld.selectable = false;
//txtFld.multiline = true;
//txtFld.wordWrap = true;
//txtFld.autoSize = TextFieldAutoSize.LEFT;
 
// append data to the prefix and suffix of the value whilst in the textbox
//for (var i:Number = 0; i < 1; i++) {
   //txtFld.appendText(" " + i + " ");
//}
 
//and add a txtFld to main movie
//addChild(txtFld);
 
Loading Advertisement...
 
[+][-]02.22.2008 at 10:28AM PST, ID: 20959969

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Macromedia Flash
Tags: Actinscript 3.0, NA
Sign Up Now!
Solution Provided By: Vulturous
Participating Experts: 1
Solution Grade: B
 
 
[+][-]06.11.2008 at 02:11PM PDT, ID: 21764166

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628