Hello, I’m hoping somebody here can shed some light on a problem I’m having with a custom component. Hopefully I can explain the problem clearly.
Let’s say I’ve built a custom component called “MyPopup” that extends the UIComponent class and is based off a “MyPopup.as” class file. Once I have all the code and supporting graphics set up, I basically finish it all off by right clicking the authored component symbol in the Library and choosing to “Convert to Compiled Clip”. I can then take that compiled clip and paste it into any other document and it works just fine and dandy.
My problem is this…
Say I’m working on this project that has 1 overall shell interface SWF which then loads in 15 different child SWFs as needed as the user navigates from screen to screen. All 15 child SWFs use my compiled clip and work fine. A year later, the project needs 10 more SWFs added, and since then I have updated my component along with its “MyPopup.as” class file to include some new functionality. The 10 new SWFs work fine on their own with the new compiled clip, but when I package the project together, I now have 10 SWFs with an updated component and 15 SWFs that use an older version of the component with the same name, “MyPopup”. What seems to be happening is the overall interface ends up caching (or at least I assume it’s caching) one version of the component and using that cached version for all instances in each of the 25 SWFs. This is causing weird and buggy behavior. The weird behavior goes away if I make sure all 25 SWFs use the exact same version of the compiled clip.
Is there a way around this? I’d obviously prefer that the project still function properly even if certain child SWFs use a different version of the component, as it’s a lot of work making sure that every file is using the same version. Sure I could just update the component in each of the older 15 SWF files, but it’s not so easy if you’re not 100% sure the new version is backwards compatible. Any help is much appreciated.