Jump to content
Search Community

Asteroids last won the day on June 30 2013

Asteroids had the most liked content!

Asteroids

Members
  • Posts

    48
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Asteroids

  1. import com.greensock.*; import com.greensock.easing.*; import com.greensock.plugins.*; import com.greensock.layout.*; import flash.events.MouseEvent; TweenPlugin.activate([LiquidPositionPlugin]); var ls:LiquidStage = new LiquidStage(this.stage, 550, 400, 550, 400); var area:LiquidArea = new LiquidArea(this, mc.x, mc.y, mc.width, mc.height, 0x313f19); area.pinCorners(ls.TOP_LEFT, ls.BOTTOM_RIGHT, false, 1, {ease:Circ.easeOut}); area.preview = true; stage.addEventListener(MouseEvent.CLICK, ExpandWithTween); function ExpandWithTween(e:MouseEvent):void { // need some tween when attach area.attach(mc, {scaleMode:ScaleMode.STRETCH}); } this is my code Can i put some tween when area.attact?
  2. I Need to make some zoom gallery and need to use TransformAroundPointPlugin when i click thumb images on stage thumb image zoom point fill it to stage. please help thank you and sorry for my bad english
  3. okey i try and upload on mediafire http://www.mediafire.com/?8n16n3qy3eybavy i can't attach .rar file on this forum
  4. Can I Tween Scale Image when area.attach stretch? i need motion when image scale resize or when click every where image on stage image scale up fit to stage like this example please help ScaleUp.zip
  5. i can use "AutoFitArea" for stretch image to area and use Tweenlite to tween when scale up? please help me for example thank you and sorry for my bad english
  6. okey i got it!! Thank You Very Much Carl You are my hero again !!
  7. can i get currentTime of Tween?
  8. How to get "Current Velocity","Current Duration" and update "Velocity","Duration"
  9. I Need To very vary thank you carl schooff you are my hero this example i need to use on my project thank you very much again!!
  10. i need to stop moveclip content at point same this example when content stop stopping at a target position this example is y-axis but i need convert to x-axis please help and sry for my bad english thank you fixed.zip
  11. I found example on this link http://forums.greensock.com/topic/5276-throwprops-and-stopping-at-a-target-position/?p=17932 and need to use on x-axis please help
  12. ok i got it thank you for help carl schooff u r good man
  13. i need create rectangle and bound object stay within the bounds of the stage please help me for example
  14. import com.greensock.*; import com.greensock.plugins.*; import com.greensock.easing.*; import flash.display.*; import flash.geom.*; import flash.events.*; import flash.utils.*; TweenPlugin.activate([ThrowPropsPlugin]); var t1:uint,t2:uint,y1:Number,y2:Number,x1:Number,x2:Number,xOffset:Number,yOffset:Number; mc_square.addEventListener(MouseEvent.MOUSE_DOWN, start_drag); function mouseMoveHandler(event:MouseEvent):void { mc_square.y = this.mouseY - yOffset; mc_square.x = this.mouseX - xOffset; var t:uint = getTimer(); if (t - t2 > 50) { x2 = x1; x1 = mc_square.x; y2 = y1; t2 = t1; y1 = mc_square.y; t1 = t; } event.updateAfterEvent(); } function start_drag(e:MouseEvent):void { TweenLite.killTweensOf(mc_square); x1 = x2 = mc_square.x; xOffset = this.mouseX - mc_square.x; y1 = y2 = mc_square.y; yOffset = this.mouseY - mc_square.y; t1 = t2 = getTimer(); mc_square.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); mc_square.stage.addEventListener(MouseEvent.MOUSE_UP, stop_drag); } function stop_drag(e:MouseEvent):void { mc_square.stage.removeEventListener(MouseEvent.MOUSE_UP, stop_drag); mc_square.stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); var time:Number = (getTimer() - t2) / 1000; var xVelocity:Number = (mc_square.x - x2) / time; var yVelocity:Number = (mc_square.y - y2) / time; ThrowPropsPlugin.to(mc_square, {throwProps:{y:{velocity:yVelocity, resistance:600},x:{velocity:xVelocity, resistance:600}}, ease:Strong.easeOut}, 1, 0.3, 1); } this is my code i need to bound object on stage thanks you for help and sorry for my bad english
  15. I Have a problem on Videoloader when i'll run on Ios [iPAD] I got blank screen no more video loader please help me!!
  16. LoaderMax /** * VERSION: 1.882 * DATE: 2011-08-19 * AS3 * UPDATES AND DOCS AT: http://www.greensock.com/loadermax/ **/ okey got it i need to download greensock new version now
  17. this is simple my class Intro when i use this class on Air 3.5 for iOS import com.Intro; var intro:Intro = new Intro("videos/IntroIPAD.mp4",stage,stage.stageWidth,stage.stageHeight); get some error Intro.as.zip
  18. I got an error when compiler on AIR 3.5 for iOS video loader have a problem please help me it's say TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.greensock.loading::VideoLoader/_closeStream()[D:\_Flash\_AS3\src\com\greensock\loading\VideoLoader.as:991] at com.greensock.loading::VideoLoader/_auditHandler()[D:\_Flash\_AS3\src\com\greensock\loading\VideoLoader.as:978] at flash.net::NetStream/invokeWithArgsArray() at flash.net::NetStream/call() at flash.net::NetStream/pause() thanks you and sorry for my bad english
  19. thank you Jack i got it. thanks you for help. throw prop it's awesome plugin
  20. My Code need some momentum when mouse up. I can put some Throwprop on it? This is my code drag rotate frame sequence. var rotater:MovieClip = MyRotationClip; var offsetFrame:int = rotater.currentFrame; //Whatever frame the clip is already on var offsetX:Number = 0; //Stores where the mouse started var percent:Number = 0; //Used to calculate frame to go to rotater.addEventListener(MouseEvent.MOUSE_DOWN,startDragging); rotater.addEventListener(MouseEvent.MOUSE_UP,stopDragging); //These should be pretty self-explanatory function startDragging(e:MouseEvent):void { rotater.addEventListener(MouseEvent.MOUSE_MOVE,drag); offsetX = e.mouseX; //Record how far the mouse was from left edge } function stopDragging(e:MouseEvent):void { rotater.removeEventListener(MouseEvent.MOUSE_MOVE,drag); offsetFrame = rotater.currentFrame; //Re-save the frame offset for next time. } function drag(e:MouseEvent):void { //Here's where the math takes place. //First, we figure out the percentage of screen the mouse has gone percent = (e.mouseX - offsetX)/rotater.width; //Next, we figure out what frame that corresponds to var frame:int = Math.round(percent*rotater.totalFrames) + offsetFrame +1; //The extra 1 is because there is no frame 0, that starts at 1 //Since this might be MORE than the maximum frames, we fix that. //We also adjust for negatives/less than 0 while(frame>rotater.totalFrames) {frame -= rotater.totalFrames;} while(frame<=0) {frame += rotater.totalFrames;} rotater.gotoAndStop(frame); } thanks you for help and sorry for my bad english.
×
×
  • Create New...