Rainbow circles

This is really just a colourful demo for my own purposes, not only to ensure I can dynamically add symbols anywhere on the stage but also to test performance across various mobile devices. Nothing complicated – enjoy clicking anywhere!

Dynamic rainbow circles

Download source

4 thoughts on “Rainbow circles

  1. Great proof of concept Chis. I am just getting into Edge, and I’m finding your examples very helpful. I must be missing something simple, but how would you add a class to the dynamically created object? For example, I am loading and using jqueryui to make symbol objects draggable by assigning a class (say, “.draggable”) to elements that I want to allow user to drag. This works perfectly for objects that are on the stage and have the class assigned in the Edge interface properties pane. But, I cant find the syntax to make dynamically created objects inherent these attributes from an assigned class.

    1. With jQuery you can use the syntax:

      $(‘element’).addClass(‘classname’);

      With Greensock, to add a class name, you can do:

      TweenMax.set(element, {css:{className:’classname’}});

      Or append one to an existing name:

      TweenMax.set(element, {css:{className:’+=classname’}});

      HTH.

      1. Thanks for the quick response Chris. I was able to use your suggestion and get this to work — however, because I had my code at the action block for the element, I had to load jQuery there. So, now I am working through scope.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s