The following document details the use of the properties and methods of the flashTickerFX Component via ActionScript.
If you don’t want to use ActionScript, all of the following properties and methods can be set within Flash MX or Flash MX 2004 by dropping the flashTickerFX Component onto the scroll target, scaling the component to the desired size and setting the properties shown in the Parameters Panel.
myTicker.fileType = “text”; // specifies the data file to be a text file.
myTicker.fileType = “xml”; // specifies the data file to be an xml file.
trace(myTicker.fileType); // outputs the current value;
myTicker.effect = “none”; // No effect is applied between topic changes.
myTicker.effect = “fader”; // Current topic fades out completely before new topic fades in
myTicker.effect = “dissolve”; // Current topic fades out while new topic fades in
myTicker.effect = “typewriter”; // Text appears on the screen letter by letter
myTicker.effect = “wipeRandom”; // Topics wipe in random directions - left, right, up or down
myTicker.effect = “wipeLeft”; // Topics wipe in from the left
myTicker.effect = “wipeRight”; // Topics wipe in from the right
myTicker.effect = “wipeDown”; // Topics wipe down from the top
myTicker.effect = “wipeUp”; // Topics wipe up from the bottom
myTicker.effect = “wipePushRandom”; // New topics wipe in random directions - left, right, up or down,
as the current topic wipes out in the opposite direction
myTicker.effect = “wipePushLeft”; // New topics wipe in from the left, as the current topic wipes out to the right
myTicker.effect = “wipePushRight”; // New topics wipe in from the right, as the current topic wipes out to the left
myTicker.effect = “wipePushDown”; // New topics wipe down from the top, as the current topic wipes down
myTicker.effect = “wipePushUp”; // New topics wipe up from the bottom, as the current topic wipes up
myTicker.effect = “wipeFadeRandom”; // New topics wipe in random directions - left, right, up or down,
as the current topic fades out myTicker.effect = “wipeFadeLeft”; // scrolls left to right or right to left.
myTicker.effect = “wipeFadeRight”; // New topics wipe from the right, as the current topic fades out
myTicker.effect = “wipeFadeDown”; // New topics wipe from the top, as the current topic fades out
myTicker.effect = “wipeFadeUp”; // New topics wipe from the bottom, as the current topic fades out
trace(myTicker.effect); // traces the value of the effect property;
myTicker.scrollSpeed = 10; // sets the effect speed to 10.
trace(myTicker.effectSpeed); // Sets the speed of the transition effect;
myTicker.pauseTime = 30; // sets the pause time to 30.
trace(myTicker.pauseTime); // traces the value of the pauseTime property;
myTicker.pauseOver = true; // sets the topics to pause on mouseover.
trace(myTicker.pauseOver); // traces the value of the pauseOver property;
myTicker.handCursor = true; // sets the hand cursor to display on clickable topics on mouseover.
trace(myTicker.handCursor); // traces the value of the handCursor property;
myTicker.random = true; // sets the topic display order to be random.
trace(myTicker.random); // traces the value of the random property;
myTicker.border = true; // sets the border to display.
trace(myTicker.border); // traces the value of the border property;
myTicker.borderColor = 0xCCCCCC; // sets the border color to silver.
trace(myTicker.borderColor); // traces the value of the borderColor property;
myTicker.bufferLeft = 10; // sets the left buffer to 10 pixels;
trace(myTicker.bufferLeft); // traces the value of bufferLeft;
myTicker.bufferRight = 10; // sets the right buffer to 10 pixels;
trace(myTicker.bufferRight); // traces the value of bufferRight;
myTicker.bufferTop = 10; // sets the top buffer to 10 pixels;
trace(myTicker.bufferTop); // traces the value of bufferTop;
myTicker.textWidth = 200; // sets the text width to 20 pixels
trace(myTicker.textWidth); // traces the value of the textWidth property
myTicker.textAlign = “center”; // sets the text alignment to center
trace(myTicker.textAlign); // traces the value of the textAlign property
Options : “left”, “right”, “center”. Default = left.
myTicker.lineSpacing = 2; // sets the line spacing to 2
trace(myTicker.lineSpacing); // traces the value of the lineSpacing property
myTicker.imagePosition = “left”; // sets the image position to left.
myTicker.imagePosition = “right”; // sets the image position to right.
myTicker.imagePosition = “center”; // sets the image position to center.
trace(myTicker.imagePosition); // traces the value of the imagePosition property;
myTicker.imageVertical = “top”; // sets the vertical position to top.
myTicker.imageVertical = “bottom”; // sets the vertical image position to bottom.
trace(myTicker.imageVertical); // traces the value of the imageVertical property
myTicker.imageSpacer = 10; // sets the imageSpacer to 10 pixels;
trace(myTicker.imageSpacer); // traces the value of imageSpacer;
myTicker.visited = true; // changes the text color on mouse press
trace(myTicker.visited); // traces the value of the visited property;
myTicker.visitedColor = 0xFF00FF; // sets the visited color to magenta.
trace(myTicker.visitedColor); // traces the value of the visitedColor property;
myTicker.embedFonts = true; // sets the embedFonts value to true.
trace(myTicker.embedFonts); // traces the value of the embedFonts property;
myTicker.defaultFont = “FFF Business”; // sets the default font to FFF Business.
trace(myTicker.defaultFont); // traces the value of the defaultFont property;
myTicker.defaultFontSize = 8; // sets the size of the default font
trace(myTicker.defaultFontSize); // traces the value of the defaultFontSize property;
myTicker.defaultFontColor = 0x000000; // sets the scrollTrack color to black.
trace(myTicker.defaultFontColor); // traces the value of the defaultFontColor property;
myTicker.background = true; // sets the background to be visible
trace(myTicker.background); // traces the value of the background property;
myTicker.backgroundColor = 0x00CCFF; // sets the backgroundColor color to cyan.
trace(myTicker.backgroundColor); // traces the value of the backgroundColor property;
myTicker.rolloverFontChange = true; // sets the font color to change on mouseover.
trace(myTicker.rolloverFontChange); // traces the value of the rolloverFontChange property;
myTicker.rolloverFontColor = 0xFF0000; // sets the rollover font color color to red.
trace(myTicker.rolloverFontColor); // traces the value of the rolloverFontColor property;
myTicker.rolloverBackground = true; // sets the background to appear on mouseover
trace(myTicker.rolloverBackground); // traces the value of the rolloverBackground property;
myTicker.rolloverBackgroundColor= 0x00FF99; // sets the mouseover backgroundColor color to green.
trace(myTicker . rolloverBackgroundColor); // traces the value of the rolloverBackgroundColor property;
myTicker.reInit(); // reloads the data into the flashTickerFX
myTicker.isLoaded // returns a Boolean value representing current flashTicker loaded status
myTicker.loadTickerXML(xmlFileName:String)
Example :
myTicker.loadTickerXML(“ticker.xml”)
myTicker.loadTickerArrays(dataArray:Array, targetArray:Array, targetName:String, targetIsURL:Boolean);
Example :
dataArray = new Array(“This is topic one”, “This is topic two”, “This is topic three”);
targetArray = new Array(“http://www.flashloaded.com”, “http://www.fontsforflash.com”, “http://www.fonts4flash.com”);
myTicker.loadTickerArrays(dataArray, targetArray, “_blank”, true);
Note : null values can be entered for targetArray and targetName.
myTicker.startTicker();
myTicker.stopTicker();