cor, jason.
that did the trick thanks.... and led to a new problem.
declaring as a class document makes the contructor rum automatically when
the movie loads correct?
can I pass some parameters to the document class constructor?
----- Original Message -----
From: "Cor" <[email protected]>
To: "'Rodrigo Augusto Guerra'" <[email protected]>; "'Flash Coders
List'" <[email protected]>
Sent: Thursday, September 09, 2010 1:25 PM
Subject: RE: [Flashcoders] access a mc in stage from a class
Did you set this one Class as Document Class in the properties panel?
Groeten,
Cor van Dooren
------------------------------------------------------------------
"There are only 10 types of people in the world:
Those who understand binary and those who don't."
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Rodrigo
Augusto Guerra
Sent: donderdag 9 september 2010 18:18
To: Flash Coders List
Subject: [Flashcoders] access a mc in stage from a class
hi,
i'm trying to migrate from as2... and I need to access a mc named mc1 that
is on stage. no class associated with this mc, only 1 class for the entire
movie.
I have the following class:
package
{
import flash.display.*;
import flash.events.*;
public class foo
{
//constructor
public function foo():void
{
trace("hi")
mc1.x+=30; <- don't work.
}
}
how can I inform the class that I have a mc (mc1) in the stage in order to
access i´'s properties and methods? tried with addChild too but had no luck.
thanks,
rodrigo.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 9.0.851 / Virusdatabase: 271.1.1/3123 - datum van uitgifte: 09/08/10
19:41:00
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders