Jump to content


  • Posts

  • Joined

  • Last visited

petervee's Achievements



  1. Hi Carl, Thanks for the response, this points me in the right direction. Cheers
  2. Hi guys, I'm trying to build a 2 way tween (in 4 quadrants) using TweenLite with the colorTransform plugin. I'm doing this on a stage with a mouse move listener, so for example: stage.addEventListener(MouseEvent.MOUSE_MOVE, mve) function mve(evt:Event):void{ var percY = (stage.mouseY / stage.height).toFixed(2) TweenLite.to(mc, 1, {colorTransform:{tint:0xff0000, tintAmount:percY}}); } This works fine in 1 direction (top and bottom), but I want it to work 4 ways - have a look at screenshot which hopefully explains it better.. As you move towards each corner, top left, top right, bottom left, bottom right - the color should tween to that target (i.e. 100% or 0% of stage in both directions) I hope this question makes sense, any help would be appreciated, a little bit of an AS3 newb. Cheers
  3. Solving your own issues is always fun! Ok I worked it out, I had to first add the bitmap to a movieclip new_mc = new MovieClip; new_mc.addChild(; manager.addItem(new_mc); There probably is a better way to do it, but works for me Also - I thought that the addChild method uses DisplayObject and effectively turns bitmaps into movie clips? Maybe I'm missing something Cheers, gr8 library once more.
  4. Hi there I realised an older version of this question has been asked, however I believe mine is different. I'm using the new AS3 version to load an image (from an external domain I do not control) through a proxy PHP file (on my server)... I can't add it to the manager to be transformed. Code below private function loadImage(url:String):void { var image_url:URLRequest = new URLRequest("http://localhost:8888/proxy.php?http://OTHERDOMAIN.com/image.jpg"); imageLoader.load(image_url, new LoaderContext(true)); imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded); } And it's loaded, my callback fires... private function imageLoaded(event:Event) { var imageBMP:BitmapData = new BitmapData(400, 500); imageBMP.draw(imageLoader); var b:Bitmap = new Bitmap(imageBMP); container_mc.addChild( // WORKS TILL HERE manager.addItem(; // }
  5. Try this function, I've actually just written it today with TransformManager Firstly, download this bad boy - You will need it to export JPGS, very solid class! http://code.google.com/p/as3corelib/sou ... Encoder.as Then, reference these classes (Hope i'm not missing any) import flash.net.FileReference; import flash.net.FileFilter; import com.adobe.images.JPGEncoder; import com.greensock.transform.*; The function below is where it all happens, you can obviously tweak the dimensions of output (mine are 550x800) The most important part is that the Bitmap you are drawing in the method bd.draw(h) is your main movie clip, this is the one that you should put all your transform MCs in there! function bitmapCopy() { var bd:BitmapData = new BitmapData(550, 800); bd.draw(h); var jpgEncoder:JPGEncoder = new JPGEncoder(80); var imgByteData:ByteArray = jpgEncoder.encode(bd); file = new FileReference(); file.save(imgByteData, "FILE_NAME.jpg") }