Показать сообщение отдельно
Старый 17.08.2010, 13:47
Seroy вне форума Посмотреть профиль Отправить личное сообщение для Seroy Найти все сообщения от Seroy
  № 2  
Ответить с цитированием
Seroy

Регистрация: Jun 2008
Адрес: пока еще здесь
Сообщений: 198
Цитата:
Сообщение от TIЕSTO Посмотреть сообщение
подскажите как оформить функцию ??


нужно из вне задать параметр count .
например 10 , и чтобы отсчет шел именно с 10 .

вот код...

Код AS3:
package
{
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
 
public class ZZZZ extends Sprite
{
    public var secMsg:TextField;
    public var timer:Timer;
 
    public var count = 0;
    public function ZZZZ(count=0)
    {
    	this.count = count;
 
        var timer:Timer = new Timer(1000,0);  
        timer.addEventListener(TimerEvent.TIMER, timerListener);
        timer.start();
 
        secMsg = new TextField();
        secMsg.autoSize = TextFieldAutoSize.LEFT;
        secMsg.text = count;
        secMsg.x = 140;
        addChild(secMsg);      
     }
 
    public function timerListener(e:TimerEvent):void
    {    
        if (count <= 60)
        {
            secMsg.text = count;
            count++;                  
        }
 
       }
      }
     }
Т.е. переменную из внешнего скрипта? может, URLLoader.load(), или BulkLoader:

http://flash-world.ru/flash_tutorial...nscript_3.html

http://www.flasher.ru/forum/archive/.../t-117544.html
__________________
флэшь проела плешь