Okay, so I have an FLA with a series of embedded movieclips:
garden tree branch twig flower.
I want a static function -- in an as 2.0 class -- that, when given
flower, returns tree. In other words, you can give in an embedded
movieclip and it finds that clips ALMOST outermost parent.
You need a 'return' before the recursive call:
class com.research.StaticRecurse
{
public static function
getOuterMostParent(mc:MovieClip,mcRoot:MovieClip):MovieClip
{
if (mc._parent._name == garden)
{
trace(inside getOuterMostParent:
duh!
Thanks, Andy.
On 4/24/07, Andy Herrman [EMAIL PROTECTED] wrote:
You need a 'return' before the recursive call:
class com.research.StaticRecurse
{
public static function
getOuterMostParent(mc:MovieClip,mcRoot:MovieClip):MovieClip
{
if (mc._parent._name ==
3 matches
Mail list logo