There is another method we use. When you start your project create a movieclip and at it to the stage at 0,0. Open it up and add all your GUI to that as you would the stage. Then in your library assign your class to the movieclip.
Judah -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Manuel Saint-Victor Sent: Friday, February 17, 2006 11:13 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] coding the main stage as if it were a class Okay- actually I like that approach. I had seen you do part of that in a tutorial before but not with actually setting the class as the view from the timeline. It actually makes it a lot clearer now. I guess it's not as much not being comfortable with it as much as sometimes during a quick scripting I hesitate to create a class for a really small app. But as you know then a request here and there suddenly has the app doing a lot more and while I'm waiting for the downtime to put it in a class I regret every new line of code that I'm putting in _root and antiucipating trying to place in a class file. I know that if I code it correctly on root to begin with the transition is not that big a deal but it still makes me cringe. Thanks again- I'll probably use that as my crutch method at times when I'm not quite ready to drop something in a class file. M On 2/17/06, JesterXL <[EMAIL PROTECTED]> wrote: > > What aren't you comfortable with? Some don't like extending the timeline, > and do something like: > > class MyController > { > private var view:MovieClip; > > function MyController ( mc:MovieClip ) > { > view = mc; > } > } > > And then on _root; > > controller = new MyController(this); > > or: > > class MyController > { > > private var view:MovieClip; > > public static function init ( mc:MovieClip ) > { > view = mc; > } > } > > and then on _root: > > MyController.init(this); > > there are a few other variations. I like making _root a class, though! > ----- Original Message ----- > From: "Manuel Saint-Victor" <[EMAIL PROTECTED]> > To: "Flashcoders mailing list" <[email protected]> > Sent: Friday, February 17, 2006 9:19 AM > Subject: [Flashcoders] coding the main stage as if it were a class > > > I've seen this done in a few tutorial where the code placed in the main > time > line is written as if it were in a class file. By this I mean things like > writing addEventListener(this); and having the functions sitting in the > main > timeline that handles the event. I think this is a convenient approach- > and > I know the response by siome will be--"well just make the main timeline a > class- etc and sometimes I do that but others I'm not fully comfortable > doing that but have found this to be a good halfway point. Can anyone who > uses this approach tell me the their thoughts on this. I wish I could > think > of some more examples of this but am coming up blank right now. > > Thanks, > > Mani > _______________________________________________ > [email protected] > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > > _______________________________________________ > [email protected] > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

