for (var i : int = 0;i < navHolder.numChildren;i++) {
var mc : Object ;
mc = navHolder.getChildAt(i);
if (mc != itemClicked ) {
mc.mouseEnabled = false;
}
}
Also it is a good idea to share what the compile error is, that will help us
out to identify exactly what the issue is. :)
On Tue, Jul 29, 2008 at 6:25 PM, Glen Pike <[EMAIL PROTECTED]>wrote:
> Hi,
>
> You may need to cast your object as I think you get a DisplayObject back
> from getChildAt(i)
>
> so something like this?
>
> for (var i : int = 0;i < navHolder.numChildren;i++) {
> var tmp:InteractiveObject = navHolder.getChildAt(i) as InteractiveObject;
> if(tmp && !(tmp == itemClicked)) {
> Tweener.addTween(tmp, {alpha:0, time:.5});
> tmp.mouseEnabled = false; // not working - gives me an compile error
> }
> }
>
>
> Glen
>
>
> Patrick J. Jankun wrote:
>
>> Hi Everyone, once again
>>
>> I run into another [probably very easy to solve] issue with my code:
>>
>> Through an simple for loop, i fade out all items inside an holder,
>> leaving only one that was clicked, here you can see the loop doing it:
>>
>> for (var i : int = 0;i < navHolder.numChildren;i++) {
>> if(!(navHolder.getChildAt(i) == itemClicked)) {
>> Tweener.addTween(navHolder.getChildAt(i), {alpha:0, time:.5});
>> navHolder.getChildAt(i).mouseEnabled = false; // not working -
>> gives me an compile error
>> }
>> }
>>
>> this does what it's suppose to do, but i want to prevent items that are
>> fade away
>> from dispatching any mouse events, i thought, that adding this line would
>> solve it,
>> but now i got an compile error with an info that i try to access an
>> possibly not
>> existent property :|
>>
>> navHolder.getChildAt(i).mouseEnabled = false;
>>
>> I don't know if my approach is right here, but i thought, that accessing
>> children properties would be possible this way, obviously i'm wrong, has
>> anyone got
>> an tip or an solution for me?
>>
>> Thank you in advance!
>>
>> Patrick
>> _______________________________________________
>> Flashcoders mailing list
>> [email protected]
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>
>>
> --
>
> Glen Pike
> 01326 218440
> www.glenpike.co.uk <http://www.glenpike.co.uk>
>
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
--
...helmut
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders