flashTickerFX ActionScript Reference

 

Introduction

Properties

fileType

effect

effectSpeed

pauseTime

pauseOver

handCursor

random

bufferLeft

bufferRight

bufferTop

textWidth

textAlign

lineSpacing

imagePosition

imageVertical

imageSpacer

visited

visitedColor

embedFonts

defaultFont

defaultFontSize

defaultFontColor

background

backgroundColor

rolloverFontChange

rolloverFontColor

rolloverBackground

rolloverBackgroundColor

 

Methods

reInit

isLoaded

loadTickerXML

loadTickerArrays

startTicker

stopTicker

 

 


Introduction

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.

All examples are based on the flashTickerFX component having an instance name of ‘myTicker’. In your own movie, you will replace this with whatever you name the instance of the flashTickerFX Component.

 

Properties

 

fileType

Sets the type of files to load to xml or text.

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;

 

TOP

effect

Sets the transition effect.

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;

 

TOP

effectSpeed

Sets the speed of the transition effect.

myTicker.scrollSpeed = 10; // sets the effect speed to 10.

trace(myTicker.effectSpeed); // Sets the speed of the transition effect;

 

TOP

pauseTime

Sets the amount of time to pause before each topic disappears.

myTicker.pauseTime = 30; // sets the pause time to 30.

trace(myTicker.pauseTime); // traces the value of the pauseTime property;

 

TOP

pauseOver

Sets whether to pause topic change on mouseover.

myTicker.pauseOver = true; // sets the topics to pause on mouseover.

trace(myTicker.pauseOver); // traces the value of the pauseOver property;

 

TOP

handCursor

Sets whether display a hand cursor on clickable topics.

myTicker.handCursor = true; // sets the hand cursor to display on clickable topics on mouseover.

trace(myTicker.handCursor); // traces the value of the handCursor property;

 

TOP

random

Sets the topics to appear in a random order.

myTicker.random = true; // sets the topic display order to be random.

trace(myTicker.random); // traces the value of the random property;

 

TOP

border

Defines whether to display a border or not.

myTicker.border = true; // sets the border to display.

trace(myTicker.border); // traces the value of the border property;

 

TOP

borderColor

Sets the color of the border.

myTicker.borderColor = 0xCCCCCC; // sets the border color to silver.

trace(myTicker.borderColor); // traces the value of the borderColor property;

TOP

bufferLeft

Sets the amount of space (in pixels) between the border and the left of the text.

myTicker.bufferLeft = 10; // sets the left buffer to 10 pixels;

trace(myTicker.bufferLeft); // traces the value of bufferLeft;

 

TOP

bufferRight

Sets the amount of space (in pixels) between the border and the right of the text.

myTicker.bufferRight = 10; // sets the right buffer to 10 pixels;

trace(myTicker.bufferRight); // traces the value of bufferRight;

 

TOP

bufferTop

Sets the amount of space (in pixels) between the border and the top of the text.

myTicker.bufferTop = 10; // sets the top buffer to 10 pixels;

trace(myTicker.bufferTop); // traces the value of bufferTop;

 

TOP

textWidth

Sets the width (in pixels) of the topic text.

myTicker.textWidth = 200; // sets the text width to 20 pixels

trace(myTicker.textWidth); // traces the value of the textWidth property

 

TOP

textAlign

Sets the alignment of the text.

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.

 

TOP

lineSpacing

Sets the linespacing.

myTicker.lineSpacing = 2; // sets the line spacing to 2

trace(myTicker.lineSpacing); // traces the value of the lineSpacing property

 

TOP

imagePosition

Defines the image position relative to the text placement.

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;

 

TOP

imageVertical

Sets the vertical image position to top or bottom.

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

 

TOP

imageSpacer

Sets the amount of space (in pixels) between the image and the text.

myTicker.imageSpacer = 10; // sets the imageSpacer to 10 pixels;

trace(myTicker.imageSpacer); // traces the value of imageSpacer;

 

TOP

visited

Defines whether to change the text color after topic has been clicked or not.

myTicker.visited = true; // changes the text color on mouse press

trace(myTicker.visited); // traces the value of the visited property;

 

TOP

visitedColor

Sets the visited color of the text.

myTicker.visitedColor = 0xFF00FF; // sets the visited color to magenta.

trace(myTicker.visitedColor); // traces the value of the visitedColor property;

 

TOP

embedFonts

Defines whether to used embed fonts or not.

myTicker.embedFonts = true; // sets the embedFonts value to true.

trace(myTicker.embedFonts); // traces the value of the embedFonts property;

 

TOP

defaultFont

Sets the default font.

myTicker.defaultFont = “FFF Business”; // sets the default font to FFF Business.

trace(myTicker.defaultFont); // traces the value of the defaultFont property;

 

TOP

defaultFontSize

Sets the default font size.

myTicker.defaultFontSize = 8; // sets the size of the default font

trace(myTicker.defaultFontSize); // traces the value of the defaultFontSize property;

 

TOP

defaultFontColor

Sets the default font color.

myTicker.defaultFontColor = 0x000000; // sets the scrollTrack color to black.

trace(myTicker.defaultFontColor); // traces the value of the defaultFontColor property;

 

TOP

background

Defines whether topic has a background color or not.

myTicker.background = true; // sets the background to be visible

trace(myTicker.background); // traces the value of the background property;

 

TOP

backgroundColor

Sets the background color.

myTicker.backgroundColor = 0x00CCFF; // sets the backgroundColor color to cyan.

trace(myTicker.backgroundColor); // traces the value of the backgroundColor property;

 

TOP

rolloverFontChange

Defines whether the font should change color on rollover or not.

myTicker.rolloverFontChange = true; // sets the font color to change on mouseover.

trace(myTicker.rolloverFontChange); // traces the value of the rolloverFontChange property;

TOP

 

rolloverFontColor

Sets the font color for mouseover.

myTicker.rolloverFontColor = 0xFF0000; // sets the rollover font color color to red.

trace(myTicker.rolloverFontColor); // traces the value of the rolloverFontColor property;

 

TOP

rolloverBackground

Defines whether topic has a background color on mouseover or not.

myTicker.rolloverBackground = true; // sets the background to appear on mouseover

trace(myTicker.rolloverBackground); // traces the value of the rolloverBackground property;

 

TOP

rolloverBackgroundColor

Defines whether topic has a background color on mouseover or not.

myTicker.rolloverBackgroundColor= 0x00FF99; // sets the mouseover backgroundColor color to green.

trace(myTicker . rolloverBackgroundColor); // traces the value of the rolloverBackgroundColor property;

 

Methods

 

reInit

Reinitializes the flashTicker with new data

myTicker.reInit(); // reloads the data into the flashTickerFX

TOP

isLoaded

Returns boolean value on flashTicker loaded status

myTicker.isLoaded // returns a Boolean value representing current flashTicker loaded status

TOP

 

loadTickerXML

Loads XML file into the flashTicker

myTicker.loadTickerXML(xmlFileName:String)

Example :

myTicker.loadTickerXML(“ticker.xml”)

 

TOP

loadTickerArrays

Initializes and starts the flashTicker with arrays

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.

 

TOP

startTicker

Starts the ticker.

myTicker.startTicker();

TOP


stopTicker

Stops the ticker.

myTicker.stopTicker();

TOP