Advertisement

05.22.2006 at 08:49AM PDT, ID: 21859314
[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!

Change Dynamic Text Color Using Actionscript

Tags: text, color, actionscript, change, dynamic
I am using Flash 8 and I am building a flash stock ticker. I want to change the color of the text based on change of the stock (positive or negative). I have created a text file using aspx and I am loading the variables from that file (here's the sample output):

sym_0=ABP&trade_0=4.24&sign_0=0&change_0=-0.16&percent_0=-3.64&name_0=ABRAXAS PETRO (N&sym_1=AGII&trade_1=31.81&sign_1=0&change_1=-0.12&percent_1=-0.38&name_1=ARGONAUT GROUP IN&sym_2=ALG&trade_2=21.27&sign_2=0&change_2=-0.06&percent_2=-0.28&name_2=ALAMO GP INC&sym_3=CFR&trade_3=56.00&sign_3=0&change_3=-0.10&percent_3=-0.18&name_3=CULLEN FROST BNKR

I created a variable (sign_*) that denotes the change (0 = negative change, 1 = positive change).

Here's the code I have on my actions line of the movie, frame 1:

myData = new LoadVars();
myData.onLoad = function(){
   quote__0 = this.sym_0 + ": $" + this.trade_0 + ", " + this.change_0 + ", " + this.percent_0 + "% ";
   quote__1 = this.sym_1 + ": $" + this.trade_1 + ", " + this.change_1 + ", " + this.percent_1 + "% ";
   quote__2 = this.sym_2 + ": $" + this.trade_2 + ", " + this.change_2 + ", " + this.percent_2 + "% ";
   quote__3 = this.sym_3 + ": $" + this.trade_3 + ", " + this.change_3 + ", " + this.percent_3 + "% ";
   
               format = new TextFormat();
            format.color = 0x00FF00;
            
         if (this.sign_0 == 1) {
            tQuote_0.setTextFormat(format);
            };
       if (this.sign_1 == 1) {
            tQuote_1.setTextFormat(format);
            };
            if (this.sign_2 == 1) {
            tQuote_2.setTextFormat(format);
            };
            if (Number(this.sign_3) == 1) {
            tQuote_3.setTextFormat(format);
            };

};

myData.load("../stocks.txt");


All of the dynamic text boxes individual graphics, instances are given for each text box).
Everything works except changing the color of the font.

HELP!
Start your free trial to view this solution
Question Stats
Zone: Software
Question Asked By: kenfx
Solution Provided By: Ramy_atef
Participating Experts: 3
Solution Grade: A
Views: 713
Translate:
Loading Advertisement...
05.22.2006 at 09:53AM PDT, ID: 16735867

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.22.2006 at 10:19AM PDT, ID: 16736063

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.22.2006 at 11:43AM PDT, ID: 16736782

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.22.2006 at 11:44AM PDT, ID: 16736788

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.23.2006 at 06:24AM PDT, ID: 16742136

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.23.2006 at 06:35AM PDT, ID: 16742229

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.23.2006 at 06:46AM PDT, ID: 16742351

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.23.2006 at 06:49AM PDT, ID: 16742378

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.24.2006 at 12:08AM PDT, ID: 16749003

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.24.2006 at 02:55PM PDT, ID: 16756220

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29