PureMVC Architects Lounge

Announcements and General Discussion => General Discussion => Topic started by: lagos.tout on November 03, 2008, 04:23:18



Title: Loading a PureMVC swf into a non-PureMVC swf using SWFLoader
Post by: lagos.tout on November 03, 2008, 04:23:18
Hi, all.

When a non-PureMVC A.swf is loaded with SWFLoader into a parent non-PureMVC B.swf, in order to dispatch events from A.swf to B.swf, I use Application.application.dispatchEvent(myEvent) in A.swf.

I tried to use this same method loading a PureMVC C.swf into non-PureMVC B.swf.  It failed.  After much hair-pulling I discovered that in a A.swf Application.application refers to A.swf's application property.  However, in C.swf Application.application does not reference C.swf's application property, but rather B.swf's application property (!!!).

My problem now is that B.swf needs to be able to handle loading both PureMVC and non-PureMVC swfs.  Is this possible?  In C.swf how do I reference it's application not it's parent's (B.swf)?

Thanks much.

LT


Title: Re: Loading a PureMVC swf into a non-PureMVC swf using SWFLoader
Post by: puremvc on November 04, 2008, 03:41:35
The PureMVC swfs will need to be MultiCore-based in order to avoid Singleton collision between loaded PureMVC swfs.

-=Cliff>


Title: Re: Loading a PureMVC swf into a non-PureMVC swf using SWFLoader
Post by: lagos.tout on November 04, 2008, 05:02:46
Thanks for your response, Cliff.
Does that apply to a scenario of one non-pureMVC swf loading only one pureMVC swf?
Thanks.