On Tue, Jul 29, 2008 at 4:00 PM, Patrick J. Jankun <[EMAIL PROTECTED]> wrote:

> Hi Helmut,
>
> It seems, that objects loaded through an .swf from an different domain,
> does not dispatch any events :| so that's why my code is wrong.


I assume you have checked all the cross domain policies and you are able to
communicate between your SWFs from different domains

>
>
> What i meant, was: the function i posted, generates an simple navigation
> using an class loaded from an .swf (different domain) through the
> Bulkloader
> (which essentially does the same what the Loader class does, with some nice
> extras)


> var nav_item : MovieClip = new navItem as MovieClip;
>

I am familiar with BulkLoader and you can cast the elements loaded to
something different than a Movieclip if you need to.


>
>
> This casts the class loaded from that .swf as MovieClip, and it seems to be
> the problem,
> what i don't understand is, i actually don't add the event listener to this
> objects, but to the
> holder containing it, hence it still should fire the event, but it does not
> :|
>
> navItem = assets.loaderInfo.applicationDomain.getDefinition("navItem") as
> Class;
> picThumb = assets.loaderInfo.applicationDomain.getDefinition("picThumb") as
> Class;


Have you checked your NavItem to make sure it works properly by itself
before loading it between SWFs?


>
>
> here i initialize the loaded .swf's symbols from the library as Class,
> maybe my
> approach is simply wrong,


> Any tips on that?


Sometimes it is hard to see the whole picture by getting code from here and
there and since I haven't run into this specific error not sure what else
could it be. The logic behind it seems to me like it should work but maybe
you are not instantiating the NavItem class when it is loaded or something
else.

I hope you can get more ideas from the list....

>
>
> On Jul 29, 2008, at 10:32 PM, Helmut Granda wrote:
>
>  could you elaborate on your question?
>> "Here is the whole function i use to, adding the same listeners to another
>> object fires those without any prblems :| can someone explain to me what
>> is
>> wrong?"
>>
>> I personally dont understand correctly what you are trying to achieve...
>>
>> On Tue, Jul 29, 2008 at 2:07 PM, Patrick J. Jankun <[EMAIL PROTECTED]> wrote:
>>
>>  Here is the whole function i use to, adding the same listeners to another
>>> object fires those without any prblems :| can someone explain to me what
>>> is
>>> wrong?
>>>
>>> private function initNav() : void {
>>>      navHolder = new Sprite;
>>>      navHolder.addEventListener(MouseEvent.MOUSE_OVER, navOnMouseOver);
>>>      navHolder.addEventListener(MouseEvent.MOUSE_OUT, navOnMouseOut);
>>>      navHolder.addEventListener(MouseEvent.CLICK, navOnMouseClick);
>>>      navHolder.addEventListener(Event.MOUSE_LEAVE, navOnMouseOut);
>>>
>>>      for (var i : int = 0;i < navItemsTxt.length;i++) {
>>>              var nav_item : MovieClip = new navItem as MovieClip;
>>>
>>>              nav_item.tf.text = navItemsTxt[i];
>>>              nav_item.tf.selectable = false;
>>>
>>>              nav_item.bg.alpha = .2;
>>>
>>>              nav_item.y += (nav_item.height + vertGap) * i;
>>>
>>>              navHolder.addChild(nav_item);
>>>      }
>>>
>>>      navHolder.x = 20;
>>>      navHolder.y = stage.stageHeight - navHolder.height - 20;
>>>
>>>      stage.addEventListener(Event.RESIZE, stageResized);
>>>      addChild(navHolder);
>>> }
>>> _______________________________________________
>>> 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
>>
>
> _______________________________________________
> 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

Reply via email to