Jump to content

Search the Community

Showing results for tags 'oop'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 2 results

  1. Hello! Is it possible to load objects outside the "complete" events ( LoaderEvent )? Right now, it's like this: function initLoader():void { xmlLoader = new XMLLoader( "PathToXml/xml.xml", { onComplete:loadData } ); xmlLoader.load(); } function loadData( e:LoaderEvent ):void { loaderMax = LoaderMax.getLoader( "loaderID" ); loaderMax.addEventListener( LoaderEvent.COMPLETE, completeLoader ); loaderMax.load(); } function completeLoader( e:LoaderMax ):void { texture1 = TextureFromBitmapData( LoaderMax.getLoader( "image1" ).rawContent.bitmapData ); texture2 = TextureFromBitmapData( LoaderMax.getLoader( "image2" ).rawContent.bitmapData ); texture3 = TextureFromBitmapData( LoaderMax.getLoader( "image3" ).rawContent.bitmapData ); (...) } And it works, but I have to write this in every class of my app, not handy if I have to change something... That's why I wanted to create a "LoaderScreen" class, that I call where I need, with some methods to help me to handle all the assets / loaders. More or less like this: class LoaderScreen public function LoaderScreen( loaderId:String ) { xmlLoader = new XMLLoader( "xml", { onComplete:loadData } ); xmlLoader.load(); } private function loadData( e:LoaderEvent ):void { loaderMax = LoaderMax.getLoader( loaderID ); loaderMax.addEventListener( LoaderEvent.COMPLETE, completeLoader ); loaderMax.load(); } private function completeLoader( e:LoaderEvent ):void { // nothing here } // HELPERS -- public function loadBitmapdata( id:String ):BitmapData { return mainLoader.getLoader( "texParticleMenuHome" ).rawContent.bitmapData; } And now I want to create a LoaderScreen object, and try to load stuff: class Anywhere public class Anywhere() { var loaderScreen:LoaderScreen = new LoaderScreen( "myID" ); addChild( loaderScreen ); texture1 = TextureFromBitmapData( loaderScreen.loadImage( "image1" ) ); texture2 = TextureFromBitmapData( loaderScreen.loadImage( "image2" ) ); texture3 = TextureFromBitmapData( loaderScreen.loadImage( "image3" ) ); } But it returns "null" when I'm not in the "complete" event handler ( LoaderEvent ). trace( mainLoader.getLoader( "xxx" ) ) in the complete event return something trace( mainLoader.getLoader( "xxx" ) ) outside, return null It's a kind of "AssetsManager" I guess ( based on my framework ) but I only need to know how I can load stuff outside the LoaderEvent. If anyone can help me, or have a suggestion...! Thanks!
  2. Greetings, I'm currently in the process of choosing a transform tool and I've narrowed it down to three: GreenSock, Sencoluar, or Boceto. Some questions I have about the GreenSock tool: 1) How easy is it to make modifications, for example "skin" the controls appearance? I'd like to use a vector image for my resize/rotate handles rather than the generic blocks and I'd like to get rid of the rectangular box. I like that Senocular's controls are easy to derive a class from an individual control and just override the draw method. Is that easy to do with Greensock too? Are the methods that draw the controls exposed for overriding? I'd like to make transitions to future versions of the base code as easy as possible, but I foresee fairly heavy modification so I'm looking for something where I can use OOP principles to isolate the base functionality from my derived code. 2) Are their any integrations between the Transform tools and the Tweening/Timeline tools? I'd love to, for example, be able to "record" various transform states and save tweens between those positions to a timeline. Functions in the tweening tools that would let me add a transformitem derived control to a timeline and create a tween to it's current position (from the last recorded position) would be extremely useful, for example. If not currently available, is this a possibility for the future? 3) I notice that SVN access is mentioned for the tweeningtools but not the transform tools. Some form of version control would really make handling updates easier for me (especially if I end up having to modify the base classes). Is source control access available for easy upgrades? 4) Any other comparison or comments on features that differentiate these tools are appreciated. One pro for the Greensock tool that comes to mind is multiselect (and it appears to be very well supported 5) Are there public Roadmaps for the TransformTool anywhere? Thanks! --scotru