And aprt form that textFiel motion i have another prblem

I was vreating a short movie with as3, nothing on the stage

No, i want to add something on the stage on Frame 1000 and when i press
spacebar, go there.
How can i do this?
gotoandplay?
Always when i try i get an error.


On Tue, Mar 18, 2008 at 3:04 PM, Pedro Kostelec <[EMAIL PROTECTED]> wrote:

> Yep you are right.
> myTextField.x++ should work, but when i put it on a timer i get an error :
> access of undefined property myTextField
>
> Here's the code
>
>     import flash.text.TextField;
>     import flash.text.TextFormat;
>
> var myTextField:TextField = new TextField();
>             addChild(myTextField);
>             myTextField.text = "Križev pot";
>             myTextField.width = 800;
>             myTextField.height = 200;
>             myTextField.x = stage.stageWidth/2-200;
>             myTextField.y = stage.stageHeight/2+50;
>             myTextField.border = false;
>
>             var myFormat:TextFormat = new TextFormat();
>             myFormat.color = 0xAA0000;
>             myFormat.size = 92;
>             myFormat.italic = false;
>             myFormat.bold = true;
>             myTextField.setTextFormat(myFormat);
>
>             timer2= new Timer(50);
>             timer2.addEventListener(TimerEvent.TIMER, onTimer2);
>             timer2.start;
>
> private function onTimer2(timer2:TimerEvent):void {
>             myTextField.y++;
>         }
>
> Allan thanks for the alpha. Actually the alpha was only a workaround if
> motion wouldn't work. It is just to take this of stage and then removing it.
>
> On Tue, Mar 18, 2008 at 2:36 PM, Adrian Park <[EMAIL PROTECTED]> wrote:
>
> > Hi Pedro.
> > You can't set alpha on TextFields which use device fonts - you'll have
> > to
> > embed the font if you want to be able to set alpha.
> >
> > I think myTextField.x++; probably works but since you only do it once it
> > isn't apparent. You'll have to set up a timer or frame event to do this
> > repeatedly in order to see the motion.
> >
> > HTH.
> >
> > Adrian Park
> >
> >
> > On Tue, Mar 18, 2008 at 2:17 PM, Pedro Kostelec <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Hi
> > >
> > > Is there a way to apply to som text added with as3 some motion or
> > alpha?
> > >
> > > I've got this working well:
> > >
> > >    import flash.text.TextField;
> > >    import flash.text.TextFormat;
> > >
> > > var myTextField:TextField = new TextField();
> > >            addChild(myTextField);
> > >            myTextField.text = "Križev pot";
> > >            myTextField.width = 800;
> > >            myTextField.height = 200;
> > >            myTextField.x = stage.stageWidth/2-200;
> > >            myTextField.y = stage.stageHeight/2+50;
> > >    *    myTextField.alpha=0.5;//doean't work, how to do it? Or should
> > i
> > > import something else???
> > >       myTextField.x++;//doean't work, how to do it?*
> > >            myTextField.border = false;
> > >            var myFormat:TextFormat = new TextFormat();
> > >            myFormat.color = 0xAA0000;
> > >            myFormat.size = 92;
> > >            myFormat.italic = false;
> > >            myFormat.bold = true;
> > >            myTextField.setTextFormat(myFormat);
> > >
> > > --
> > > Pedro D.K.
> > >
> > > _______________________________________________
> > > Flashcoders mailing list
> > > [email protected]
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > >
> > _______________________________________________
> > Flashcoders mailing list
> > [email protected]
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
>
>
> --
> Pedro D.K.




-- 
Pedro D.K.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to