Where to add to context View
Hi, I am a complete newbe with RL2 currently trying it with a pure AS3 Project and one thing I wonder about is where do I add the Views to the DisplayList? In RL1 you would extend the Context and simply call contextView.addChild but that option does not seem to be available. Any Best Practices here? By the way I am really struggling with the lack of updated examples. It's hard to be a RL2 newbe. :P
Thanks in advance
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Ondina D.F. on 12 Feb, 2014 09:42 AM
Hello,
Hmm, that's true, sadly. Hopefully, the discussions on this forum can compensate the lack of examples/tutorials.
If you create your context in your 'Main' Sprite like this:
you can use contextView.view to add children to your 'Main'
You could as well add SomeView to the contextView.view in a handler that runs after initialization:
But, I think it is better to let the View itself handle the adding and removing of children, if possible.
Hope that helps.
Ondina
2 Posted by dhagenbln on 12 Feb, 2014 09:49 AM
Wow thank you for the quick reply. That really helps and I guess I will excessively use this forum from now on.
When I have gained the basic Knowledge I will try to add some simple Hello World Examples somewhere to get the Word out.
Thank you.
Support Staff 3 Posted by Ondina D.F. on 12 Feb, 2014 10:16 AM
Glad it helped:)
Yes, that would be cool!!
I don't know whether you've seen these 2 examples, which work with the latest rl2, for sure:
https://github.com/probertson/robotlegs-examples-Simple
https://github.com/probertson/robotlegs-examples-Simple_NoFlex
As for the other examples listed here: http://knowledge.robotlegs.org/discussions/examples/20-links-to-rob...
If you want to help our community, of course, only if your time permits, you could fork some of them and make them work with the latest rl2 version.
Ondina D.F. closed this discussion on 11 Mar, 2014 08:47 AM.