Jump to content

Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

GregorII's Achievements


Newbie (1/14)



  1. I see.I was hoping that it somehow is suited for my problem : (. But can i ask for some help. Like a good suggestion to point me thru, if you had ever came across something like that or if you have a clue.
  2. Hello. I have a problem and im not sure how to solve it (with the BlitMask technic). Currently Im trying to create a mask (which I can more around the stage) that shows only a fragment (lets say 50x50) of the main movie clip.The main MC (lets name it Rainbow) has elements that are moving in it (like i black ball that goes from 1 corner to the other corner and then repeats that infinitely ). So what it is supposed to be happening is this: There is the main MC which stays at stage.x and stage.y and then there is my little new element (lets name it frac ( from fraction )), which i can move freely anywhere on the stage. This element (frac) shows that portion of the main MC every single frame, so when the ball in the main MC moves through that area ( the area that frac specified to watch ), frac shows that movement in itself. I currently have made it work with using flash.geom.Matrix; and bitmapData;. it is something like this: public class Main extends MovieClip { private var bmd:BitmapData; private var countainer:Sprite = new Sprite(); private var bm:Bitmap = new Bitmap(); private var myRainbow:Rainbow = new Rainbow();//the moving MC public function Main() { this.addChild( myRainbow ) myRainbow.x = stage.x; myRainbow.y = stage.y; bmd = new BitmapData( 50, 50 ); bm.x = 0; bm.y = 0 countainer.addChild( bm ); addChild( countainer ) countainer.x = 100 countainer.y = 100 addEventListener(Event.ENTER_FRAME, onFrame); addEventListener(MouseEvent.MOUSE_UP, drop); } private function onFrame( event:Event ) { bmd.draw( myRainbow, new Matrix( 1, 0, 0, 1, 0, 0 ), null, null, new Rectangle( 0, 0, 50, 50 ) ); // the last two numbers of the Matrix show the starting point of where the mask will show bm.bitmapData = bmd; } } But with this solution the performance is extremely poor. So I searched the net in a more performance friendly solution and found the BlitMask technic. So is there a way of doing this with the BlitMask??? to be more clear I`ve uploaded the fla- file that I`ve made with the code above so you can see what Im doing the link is : https://drive.google.com/file/d/0B5u6hrR2w7UEYmFHbHdlWnlWNjA/edit?usp=sharing
  3. Hello guys How do I make that the object that I click, start moving in circles ( 2-3 times ) around the stage before arriving at its end position.Something like in this picture. PS: it doesnt have to have an exact radius or exact steps, it just has to rotate 1-2 times and after that go to the certain point on the stage. the way I figured out it could be is something like this: private function onClick( ev:MouseEvent ):void { var currentObj:Sprite = ev.currentTarget as Sprite; TweenLite.to(currentObj, 1, {x:first_X, y:first_Y, onComplete:goToPosition2 }); function goToPosition2():void { TweenLite.to(currentObj, 1, {x:secontd_X, y:second_Y, onComplete:goToPosition3 }); } function goToPosition3():void { TweenLite.to(currentObj, 1, {x:third_X, y:third_Y, onComplete:goToPosition4 }); } .. .. . . . //and so on and so on } yet I somehow feel that this is very wrong way of doing it. thanks.