Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple Starling instances #50

Closed
PrimaryFeather opened this issue Nov 10, 2011 · 8 comments
Closed

Allow multiple Starling instances #50

PrimaryFeather opened this issue Nov 10, 2011 · 8 comments
Labels

Comments

@PrimaryFeather
Copy link
Contributor

Currently, there's a problem when you've got several Starling instances (either simultaneously or one after the other). More information can be found here:

http://forum.starling-framework.org/topic/multiple-starlings-error-another-program-with-this-name-is-already-registered

@ninjabonsai
Copy link

i've found not necessarily several instances. just disposing a single instance throws the error.

@PrimaryFeather
Copy link
Contributor Author

You're right, this is part of the same issue!

@Heliumhorror
Copy link

I have exactly the same problem and it's really an issue since I desperately try to switch between different kinds of particle effects for which I need a new instance starling but it keeps throwing errors :(

@PrimaryFeather
Copy link
Contributor Author

As a quick workaround, simply remove all event handlers that are added to mStage and mStage3D in the Starling constructor! That should completely dispose Starling.

@ninjabonsai
Copy link

awesome! that worked. thanks m8

On 12/11/11 20:56 PM, Daniel Sperl wrote:

As a quick workaround, simply remove all event handlers that are added to mStage and mStage3D in the Starling constructor! That should completely dispose Starling.


Reply to this email directly or view it on GitHub:
#50 (comment)

@PrimaryFeather
Copy link
Contributor Author

The dispose method now correctly releases all resources and event handlers.

Now, it even works to have 2 Starling instances simultaneously, side by side, in one Flash player. Just create each Starling instance with another Stage3D object and separate viewports.

@Heliumhorror
Copy link

Thanks a lot...I was already thinking about switching to another Framework because of this. Now I'm happy! :)

@PrimaryFeather
Copy link
Contributor Author

Then I'm really glad I finally found the time to fix it -- sorry for the delay!
:-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants