I want to assign one of three text formats to an array entry. Currently I am able to change the text in the text box, but not the color.
import flash.events.Event;
>
> stop();
> nav_mc.next_btn.addEventListener(MouseEvent.CLICK, onNext);
> function onNext(e: MouseEvent): void {
> nextFrame();
>
>
> }
>
>
> var g: TextFormat = new TextFormat();
> g.font = "Arial";
> g.size = 20;
> g.color = 0x00FF00;
> g.bold = true;
>
>
> var b: TextFormat = new TextFormat();
> b.font = "Arial";
> b.size = 20;
> b.color = 0x24BCFD;
> b.bold = true;
>
>
>
> var r: TextFormat = new TextFormat();
> r.font = "Arial";
> r.size = 20;
> r.color = 0xFF0000;
> r.bold = true;
>
>
>
>
> var ClassTitles: Array = new Array(totalFrames); // An array that will hold the Class titles
>
>
> this.addEventListener(Event.ENTER_FRAME, initializeSlide);
>
>
> function initializeSlide(e: Event): void {
> banner_mc.txtTop.text = ClassTitles[currentFrame];
> banner_mc.txtBottom.text = ClassTitles[currentFrame];
> //banner_mc.txtBottom.setTextFormat(r);
> nav_mc.slideTotal.text = totalFrames;
> nav_mc.slideLocation.text = this.currentFrame;
> }
>
> // my array
> ClassTitles[1] = 'OFFICIAL';
> ClassTitles[2] = 'PROPRIETARY';
> ClassTitles[3] = 'RELEASABLE';
> ClassTitles[4] = 'OFFICIAL';
> ClassTitles[5] = 'OFFICIAL';
> ClassTitles[6] = RELEASABLE';
> ClassTitles[7] = 'RELEASABLE';
> ClassTitles[8] = 'OFFICIAL';
>
>
> ////What I would like to do to assign color to array or something similar
> ClassTitles[1] = 'OFFICIAL', b;
> ClassTitles[2] = 'PROPRIETARY' r;
> ClassTitles[3] = 'RELEASABLE',g;
> ClassTitles[4] = 'OFFICIAL', b;
> ClassTitles[5] = 'OFFICIAL', b;
> ClassTitles[6] = 'RELEASABLE',g;
> ClassTitles[7] = 'RELEASABLE',g;
> ClassTitles[8] = 'OFFICIAL', b;