Hey there,
I have a question regarding the access of functions in a Movieclip. Its probably a noob question, since I am still new to AS2 but here we go:
I am adding a new ui element to my stage like this:
ActionScript Code: var new_item:MovieClip=this.createEmptyMovieClip(item_name,this.getNextHighestDepth());new_item.attachMovie("InventorySlot",item,this.getNextHighestDepth());
The class I am using is "InventorySlot". This works well and I get the the new clip on the stage and can use it. However I have no idea what the syntax woudl be to access functions from the class the clip is using.
The function I would like to call is defined in the InventorySlot.as:
ActionScript Code: public function updateContent() { trace("Test");}
I was trying to call it with "new_item.updateContent();" but that doesn't seem to work.
Any help on this would be appreciated.
Accessing function in MovieClip
Saturday, May 26, 2012
[Action Script] Accessing function in MovieClip May,2012
Posted by Bimo Hery Prabowo at 11:14 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment