![]() |
|
||||||||||
|
|||||
|
Регистрация: Aug 2011
Сообщений: 100
|
Кто работал с этой библиотекой подскажите пожалуйста
Есть, код. который делает эффект для текста. Если я хочу добавить 2 или болеетекстовых полей, к которым поочередно нужно применять этот эффект, как мне сделать? Пишу цикл, но что-то не работает, все время выхывается только первая строчка package { import com.jumpeye.Events.FLASHEFFEvents; import com.jumpeye.flashEff2.text.emerge.FETEmerge; import flash.text.TextFormat; import flash.text.TextField; import flash.display.MovieClip; public class EffectText extends MovieClip { private var count:Number = 0; public function EffectText() { var txtArray:Array = new Array(); var txtFrt:TextFormat = new TextFormat(); txtFrt.font = "Arial"; txtFrt.color = 0xFFFFFF; txtFrt.size = 17; txtFrt.letterSpacing = 1; var txtFld1:TextField = new TextField(); txtFld1.type = "dynamic"; txtFld1.width = 300; txtFld1.text = "Bad dicisions\ncatching up with you?"; txtFld1.x = 160; txtFld1.y = 27; txtFld1.alpha = 0; txtFld1.setTextFormat(txtFrt); txtArray.push(txtFld1); addChild(txtFld1); var txtFld2:TextField = new TextField(); txtFld2.type = "dynamic"; txtFld2.width = 300; txtFld2.text = "Improve your driving skills\nwith traffic school... Online!"; txtFld2.x = 160; txtFld2.y = 27; txtFld2.setTextFormat(txtFrt); txtFld2.alpha = 0; txtArray.push(txtFld2); addChild(txtFld2); // 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:FETEmerge = new FETEmerge(); showEffect.preset = 1; showEffect.groupDuration = 1.5; showEffect.tweenDuration = 1.5; // Create the hide pattern instance (FESEqualizer) and set it // so the effect looks as you like. var hideEffect:FETEmerge = new FETEmerge(); hideEffect.preset = 1; // char: random hideEffect.groupDuration = 1.5; hideEffect.tweenDuration = 3; // 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.showDelay = 3; effect.hideDelay = 1; // 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 = txtFld1; effect.target = txtArray[count]; // When the "hide" transition ends, start the show effect again. function replay(evt:FLASHEFFEvents):void { if (effect.currentTransitionType == "hide") { effect.show(); } } } } } ![]() Последний раз редактировалось Isaac; 29.08.2011 в 17:06. |
|
|||||
|
http://www.flasher.ru/forum/showthread.php?t=166043
Не плодите темы.
__________________
тут я |
|
|||||
|
Регистрация: Aug 2011
Сообщений: 100
|
Цитата:
|
|
|||||
|
Регистрация: Aug 2011
Сообщений: 100
|
Цитата:
А вы не можете мне помочь? |
|
|||||
|
Регистрация: Aug 2011
Сообщений: 100
|
Цитата:
Он работает, все ок, только я хочу, чтоб после первого эфекта с текстом, появлялся второй текст с этим же эффектом, а у меня все время первый текст появляется |
|
|||||
|
Регистрация: Aug 2011
Сообщений: 100
|
Ок, но дело в том, что мне не нужен следующий эффект, мне нужен тот же эффект, но только с другим текстовым полем
|
![]() |
![]() |
Часовой пояс GMT +4, время: 20:22. |
|
|
« Предыдущая тема | Следующая тема » |
| Теги |
| FlashEff2 |
|
|