$package('ejs.effects',
    $class('ScrollEffect').$implements(ejs.events.IEventDispatcher).$define(
        $public({
            target:null,
            duration:200,   //ms
            step:1,
            direction:'left',
            width:200,
            height:100,
            marquee:null,
            construct:function(param){
                if(param){
                    this.target = param.target;
                    this.duration = param.duration>0?param.duration:50;
                    this.direction = /^(left)|(right)|(up)|(down)|(bottom)$/.test(param.direction)?param.direction:'left';//edit by syd
                    this.step = param.step>0?param.step:1;
                    this.width = Number(param.width);
                    this.height = Number(param.height);
                }
            },
            create:function(){
                this.marquee = new Marquee(this.target);
                this.marquee.Direction = this.direction;
                this.marquee.Step = this.step;
                this.marquee.Width = this.width;
                this.marquee.Height = this.height;
                this.marquee.Timer = this.duration;
                this.marquee.DelayTime = 0;
                this.marquee.WaitTime = 0;
//                _marquee.ScrollStep = 
                this.marquee.Start();              
            }
        })
    )        
);
