Error Codes

Posted by xFLASHSTUDENTx 
Error Codes
August 23, 2009 01:27PM
I'm getting these errors every time I try to use Flasheff2:

1046: Type was not found or was not a compile-time constant: FlashEff2Code.
1180: Call to a possibly undefined method FlashEff2Code.

I got the flasheff2 component and both patterns in my library, yet I'm getting these errors. Here is the code I cut and pasted from the jumpeye documentation:


// Import the necessary classes.
import com.jumpeye.Events.FLASHEFFEvents;
import com.jumpeye.flashEff2.text.magneticWind.FETMagneticWind;
import com.jumpeye.flashEff2.text.xyscale.FETXYScale;
// Create the text format for the font.
var txtFormat:TextFormat = new TextFormat();
txtFormat.font = "Lucida Sans";
txtFormat.align = "center";
txtFormat.color = 0x0099FF;
txtFormat.size = 40;
// Create the text field, set it up and add it to the display list.
var myText:TextField = new TextField();
myText.type = "dynamic";
myText.embedFonts = true;
myText.antiAliasType = "advanced";
myText.multiline = true;
myText.wordWrap = true;
myText.autoSize = "center";
addChild(myText);
// Add the text into the text field (text should be as HTML).
myText.defaultTextFormat = txtFormat;
myText.htmlText = "The quick brown fox jumps over the lazy dog";
// Center the text field on the stage.
myText.width = 350;
myText.x = (stage.stageWidth - myText.width) / 2;
myText.y = (stage.stageHeight - myText.height) / 2;

// Create the FlashEff2Code instance and add it to the stage. The FlashEff2Code
// component must be in the display list in order for it to work.
var effect:FlashEff2Code = new FlashEff2Code();
effect.addEventListener(FLASHEFFEvents.TRANSITION_END, replay);
addChild(effect);
// Create the show pattern instance (FESBrightSquares) and set it
// so the effect looks as you like.
var showEffect:FETMagneticWind = new FETMagneticWind();
showEffect.randomX = 200;
showEffect.randomY = 50;
showEffect.groupDuration = 1.5;
showEffect.tweenDuration = 2;
// Create the hide pattern instance (FESEqualizer) and set it
// so the effect looks as you like.
var hideEffect:FETXYScale = new FETXYScale();
hideEffect.positionX = -15;
hideEffect.positionY = -50;
hideEffect.preset = 9; // char: random
hideEffect.groupDuration = 1.5;
hideEffect.tweenDuration = 2;
// Assign the show and hide transitions to the FlashEff2Code instance.
effect.showTransition = showEffect;
effect.hideTransition = hideEffect;
// There will be a 3 seconds pause between the show and hide transitions.
effect.hideDelay = 3;
// Set the target text field to the FlashEff2Code instance. Once you do this,
// the show effect will start immediately (except the case when the
// show effect has a delay too).
effect.target = myText;
// When the "hide" transition ends, start the show effect again.
function replay(evt:FLASHEFFEvents):void {
if (effect.currentTransitionType == "hide") {
effect.show();
}
}
Re: Error Codes
August 24, 2009 06:42AM
You need to have the FlashEff2Code imported in the library.
Sorry, you do not have permission to post/reply in this forum.