|
I don't know if this helps but following is an example of passing
properties to the XMLConnector component using attachMovie. The idea is
the same for any Class. Setting the Classes
properties in o:Object and then passing it thru attachMovie will
set the properties within the new Class instance. Hope this
helps:
var o:Object = new Object();
o.direction = "send/receive"; o.params = new XML(str); o.URL = "";
var new_object = this.attachMovie("XMLConnector","xml_object",next_depth,o); next_depth++; Bill Lane >>> [EMAIL PROTECTED] 05/23/05 10:42 am >>> Depth was another
problem I had, Bjorn
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of If Menu class doesn't extend
MovieClip then I would have thought it wouldn't have access to attachMovie
which is a method of MovieClip. But you say it worked for a single
instance. If you don't have access to attachMovie I wouldn't have expected
it to work at all. How come you increment _depth twice
when you have only used one depth? It shouldn't affect the outcome but I'm
just curious.
I’m having
some trouble applying these new (to me) best practices I watched the other
night. I am
trying to build a dynamic menu; I have a
Main.as class that extends movieClip that calls a menu
class new
HorizontalTabMenu(model.getMenuArray(), this, 200, 20,
20); The menu
class doesn’t extend movieClip and its purpose is to manage the menu and attach
the buttons. The button
movieClip has a class attached; “TabButton” is the mc, with “TabButton.as”
attached So I’m
trying to attach the clips from the menu class but it isn’t
working (BTW I had
it working on a single instances, it’s this example where I’m creating multiple
instances is where I’m making a mistake) Menu class
~ for (var i:Number =
0; i<mData.length; i++) {
tab = target_mc.attachMovie("TabButton", "tab"+i+"_mc",
_depth);
_depth++;
tab.setProps(this, mData[i].LABEL, mData[i].ID,
_depth);
_depth++;
tab._x = _x;
tab._y = _y;
_x += tab.returnNextX();
tabs_array.push(tab) } ^ here im trying to
attach the mc from the library into the tab var so that I can add it to the
array ^ without doing that I
wasn’t sure how I could reference the movieclip without placing it in the
mc_variable I have a trace running
on the TabButton class constructor and it doesn’t
instantiate. --- --- You are currently subscribed to fugli as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/ --- You are currently subscribed to fugli as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/ |
- [fugli] Re: extend mc Bill Lane
- [fugli] Re: extend mc Bjorn Schultheiss
- [fugli] Re: extend mc Bill Lane
- [fugli] Re: extend mc Bjorn Schultheiss
- [fugli] Re: extend mc john Ryan
- [fugli] Re: extend mc Bill Lane
