Tweener-ing TextField & Loader Children

Is it possible? If so, where would you suggest I put the addTween? Do I need to rewrite some stuff to make it happen?

Your excellent advice is appreciated, as usual!


///////Import and initialize all stuff
 
import flash.display.*;
import flash.text.*;
import flash.net.URLRequest;
import fl.controls.ProgressBar;
import flash.events.MouseEvent;
import caurina.transitions.*;
import caurina.transitions.properties.ColorShortcuts;
import caurina.transitions.properties.FilterShortcuts;
 
FilterShortcuts.init();
ColorShortcuts.init();
 
///////Verbiage for TextFields
 
//Angio Text
var Angio_Measure:String = "Percentage of heart attack patients who receive angioplasty within 90 minutes of hospital arrival.";
var Angio_Why:String = "Time is Muscle - Opening the vessel as soon as possible restores blood flow to the heart muscle. Quickly restoring blood flow reduces the damage to the heart during a heart attack. WellStar treats the most patients emergently for heart attack of any hospital in metro Atlanta.";
 
//Beta Text
var Beta_Measure:String = "Percentage of heart attack patients who were given a beta blocker at discharge.";
var Beta_Why:String = "Beta blockers relax the heart muscle and slow the heart beat which lessens the work of the heart. This decreases the risk of complications and improves a heart attack patient’s chances of survival. Continuing to take a beta blocker after hospital discharge reduces the risk of another heart attack. WellStar has reached Center for Medicare and Medicaid Services (CMS) Top Performer status for this measure.";
 
//Aspirin Text
var Aspirin_Measure:String = "Percentage of heart attack patients who were given aspirin within the first 24 hours.";
var Aspirin_Why:String = "Aspirin taken at the first sign of a heart attack can reduce the severity of a heart attack by helping to keep blood clots from forming. Continuing to take an aspirin at home after a heart attack has been shown to decrease the chance of having another heart attack. WellStar has reached CMS Top Performer status for this measure.";
 
//Ace Text
var Ace_Measure:String = "Percentage of heart failure patients who were given an ACE Inhibitor or ARB medications to improve heart strength at hospital discharge.";
var Ace_Why:String = "ACE inhibitors and ARBs are medicines given to patients with certain heart conditions such as heart attacks to improve the way the heart works.";
 
//Smoking Text
var Smoking_Measure:String = "Percentage of heart attack patients who were counseled to stop smoking before leaving the hospital.";
var Smoking_Why:String = "Stopping smoking will greatly reduce the risk of future heart problems. WellStar has reached CMS Top Performer status for this measure.";
 
///////Set up TextFields, Graphic Loaders, and Progress Bar
 
//Set Up MeasuresTextField
var measuresTextField:TextField = new TextField();
addChild(measuresTextField);
measuresTextField.width = 420;
measuresTextField.x = 250;
measuresTextField.y = 248;
measuresTextField.wordWrap = true;
measuresTextField.selectable = true;
measuresTextField.autoSize = TextFieldAutoSize.LEFT;
measuresTextField.embedFonts = true;
 
//Text Styling for Measures
var measuresFormat:TextFormat = new TextFormat(); 
measuresFormat.color = 0x00000;
measuresFormat.size = 13;
measuresFormat.font = "Arial";
measuresTextField.defaultTextFormat= measuresFormat;
 
//Set Up WhyTextField
var whyTextField:TextField = new TextField();
addChild(whyTextField);
whyTextField.width = 420;
whyTextField.x = 250;
whyTextField.y = 310;
whyTextField.wordWrap = true;
whyTextField.selectable = true;
whyTextField.autoSize = TextFieldAutoSize.LEFT;
whyTextField.embedFonts = true;
 
//Text Styling for Why
var whyFormat:TextFormat = new TextFormat();
whyFormat.color = 0x00000;
whyFormat.size = 13;
whyFormat.font = "Arial";
whyTextField.defaultTextFormat = whyFormat;
 
//Graph Loader
var graphLoader:Loader = new Loader();
graphLoader.x = 40;
graphLoader.y = 110;
 
//Graph ProgressBar
var graphPB:ProgressBar = new ProgressBar();
graphPB.source = graphLoader.contentLoaderInfo;
graphPB.x = 275;
graphPB.y = 160;
 
//Graph Loading Function
graphLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoadingGraph);
function finishLoadingGraph(e:Event):void {
addChild(graphLoader);
removeChild(graphPB);
}
 
///////Set Up Arrays
 
//Button Array
var myBtnArray:Array = new Array(mc_Angio, mc_BetaBlocker, mc_Aspirin, mc_Ace, mc_Smoking);
 
//mouseEvent FOR Loop
for (var i:Number = 0; i < myBtnArray.length; i++) {
myBtnArray*.addEventListener(MouseEvent.MOUSE_OVER, overHandler);
myBtnArray*.addEventListener(MouseEvent.MOUSE_OUT, outHandler);
myBtnArray*.addEventListener(MouseEvent.MOUSE_DOWN, getStuff);
}
 
//Set Up eventHandlers
function overHandler(e:MouseEvent) {
Tweener.addTween(e.currentTarget, {x:253, _color:0xea0437, transition:"linear", time:.25});
}
function outHandler (e:MouseEvent) {
Tweener.addTween(e.currentTarget, {x:250, _color:0x00000, transition:"linear", time:.25});
}
function getStuff(e:MouseEvent):void {
if (e.currentTarget == mc_Angio) {
measuresTextField.text = Angio_Measure;
whyTextField.text = Angio_Why;
graphLoader.load(new URLRequest("./QS_Graphs/P06.jpg"));
addChild(graphPB);
}
if (e.currentTarget == mc_BetaBlocker) {
measuresTextField.text = Beta_Measure;
whyTextField.text = Beta_Why;
graphLoader.load(new URLRequest("./QS_Graphs/P05.jpg"));
addChild(graphPB);
}
if (e.currentTarget == mc_Aspirin) {
measuresTextField.text = Aspirin_Measure;
whyTextField.text = Aspirin_Why;
graphLoader.load(new URLRequest("./QS_Graphs/P01.jpg"));
addChild(graphPB);
}
if (e.currentTarget == mc_Ace) {
measuresTextField.text = Ace_Measure;
whyTextField.text = Ace_Why;
graphLoader.load(new URLRequest("./QS_Graphs/P03.jpg"));
addChild(graphPB);
}
if (e.currentTarget == mc_Smoking) {
measuresTextField.text = Smoking_Measure;
whyTextField.text = Smoking_Why;
graphLoader.load(new URLRequest("./QS_Graphs/P04.jpg"));
addChild(graphPB);
}
}