Adobe's Tweens vs TweenLite
I just found out today that Adobe's Tween Class is very inefficient compared to Jack Doyle's TweenLite of GreenSock.com. Is Adobe revising their tween classes for CS5 or is it not worth to look into?
i can't see any harm in "looking into it". let us know what you find. (but i would be surprised if there were any change to the as1/as2 classes.)
Similar Messages
-
Hi, I'm new to Flash and Actionscript. I'm working on writing
a game in Actionscript 3 for the Nokia N800 Internet Tablet. I'm
having trouble getting a Tween to appear smoothly. I have a line
like this in my code:
overallTween = new Tween(overallContainer, "x",
None.easeNone, 0, -833, 10, false);
The variable overallContainer is a Movie Clip that I added
using the GUI. overallContainer has four other movie clips as
children, and each of those four movie clips has five to ten
children, which are bitmaps and textFields. When the above line
executes on the N800, everything slides very slowly to the left, at
about 2 fps. Also, it looks jerky and intermittent instead of
smooth. When it executes on a desktop, it runs smoothly, at about
30 fps. 30 fps is the value I set in the fla file. Also, when I try
executing the same Tween on a container with just one child, it
displays smoothly on the N800. When the container has many
children, I think the reason it's not smooth is because the CPU is
being used a lot during the Tween. (The N800's CPU runs at 400
MHz.) Does anyone know of another way to do this same tween, or a
similar effect, using fewer CPU cycles? Or is there another way to
make it smoother? Thanks.I’ve been looking into various ActionScript 3.0 (AS3)
Tween Class Libraries for Flash. Here’s what I’ve found
so far:
Tweener (
http://code.google.com/p/tweener/)
* robust and fast
* adds about 11K of file size
* can easily tween “currentFrame” to control an
animation forward or backwards along a timeline in a MovieClip
TweenerLite (
http://blog.greensock.com/tweenliteas3/)
* Nice, small and fast.
* adds about 3K of file size
* But I’ve seen buggy behavior when trying to change a
Tween on a property without cancelling Tweens on other properties
of the same MovieClip.
* Should be fine for simple Tweens.
Adobe built-in fl.transitions.Tween Class
* Official Tween class from Adobe
* adds about 2K of file size
* Much slower than Tweener and TweenLite
* Tween to multiple properties require multiple Tween
objects
If you are using Adobe's built-in fl.transitions.Tween Class
then I'd suggest trying either Tweener or TweenLite.
Good luck and let us know how it works out. I'm curious how
the Flash performance on the N800 will be.
-Norm -
Keeping Animation States on Item renderers when scrolling TileList
Hey all,
so I have a simple custom item renderer (CustomRenderer.as) which has a FlexShape that gets tweened by TweenLite depending on the percent value in the data value object (CustomRendererData.as). So in the example below I have 8 items
| DATA ITEM 1 | DATA ITEM 2 | DATA ITEM 3 | DATA ITEM 4 |
| DATA ITEM 5 | DATA ITEM 6 | DATA ITEM 7 | DATA ITEM 8 |
The issue I run into is when i scroll (vertically) the FlexShape starts to Tween from the previous data values.
For example DATA ITEM 1 is has tweened upto 80% and DATA ITEM 2 has tweened up to 20% . DATAITEM 2 appears to be at 80% first and then Tweens to 20% . You can try the sample below. Once you clicck on the Load Data button the animations will begin. When you use the scroll bar you can see the animation states being swapped to the previous data renderer items and then resuming their orignal values
package
[Bindable]
public class CustomRendererData
public var percent:int=0;
public var title:String;
public var color:uint;
public var time:int;
public var isUploading:Boolean = false;
public function CustomRendererData(){}
package
import flash.geom.ColorTransform;
import gs.TweenLite;
import mx.controls.Label;
import mx.controls.listClasses.IListItemRenderer;
import mx.core.FlexShape;
import mx.core.IDataRenderer;
import mx.core.UIComponent;
public class CustomRenderer extends UIComponent implements IListItemRenderer, IDataRenderer
protected var _progressBar:FlexShape;
protected var _data:CustomRendererData;
protected var _percentValue:int;
protected var _percentChanged:Boolean;
protected var _progressBarTween:TweenLite;
protected var _title:Label;
protected var _titleValue:String;
protected var _titleChanged:Boolean;
protected var _colorValue:uint;
protected var _colorChanged:Boolean;
protected var _uploadingChanged:Boolean;
protected var _isUploading:Boolean;
public function CustomRenderer()
super();
override protected function createChildren():void
super.createChildren();
if (!_progressBar)
_progressBar=new FlexShape();
_progressBar.x=_progressBar.y=4;
__drawProgressBar();
addChild(_progressBar);
if (!_title)
_title=new Label();
_title.setActualSize(100,22);
_title.x=4;
_title.y=120;
_title.text ="data";
_title.setStyle("color" , 0xffffff);
addChild(_title);
this.graphics.beginFill(0x333333, 1);
this.graphics.drawRect(0, 0, 124, 148);
this.graphics.endFill();
_percentChanged = false;
_titleChanged = false;
_uploadingChanged = false;
_isUploading = false;
_colorChanged = false;
_percentValue = 0;
private function __drawProgressBar():void
_progressBar.graphics.beginFill(0xffffff, 1);
_progressBar.graphics.drawRect(0, 0, 1, 87);
_progressBar.graphics.endFill();
//_progressBar.width=0;
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
super.updateDisplayList(unscaledWidth, unscaledHeight);
override protected function commitProperties():void
super.commitProperties();
if (_data)
//if(_uploadingChanged)
//_uploadingChanged = false;
if(_isUploading)
if(_percentChanged)
_percentChanged = false;
if(_progressBarTween)
TweenLite.removeTween(_progressBarTween);
const newWidth:int = Math.round((_data.percent * 116) / 100);
//_progressBar.width = newWidth;
_progressBarTween=TweenLite.to(_progressBar, _data.time, {width:newWidth});
else
if(_titleChanged)
_titleChanged = false;
_title.text = _titleValue;
if(_colorChanged)
_colorChanged = false;
var colorTransform:ColorTransform;
colorTransform=_progressBar.transform.colorTransform;
colorTransform.color = _data.color;
_progressBar.transform.colorTransform=colorTransform;
public function set data(obj:Object):void
_data=obj as CustomRendererData;
if(_data)
if(_data.percent != _percentValue)
_percentValue = _data.percent;
_percentChanged = true;
if(_titleValue != _data.title)
_titleValue = _data.title;
_titleChanged = true;
if(_colorValue != _data.color)
_colorValue = _data.color;
_colorChanged = true;
if(_isUploading != _data.isUploading)
_isUploading = _data.isUploading;
_uploadingChanged = true;
invalidateProperties();
invalidateDisplayList();
public function get data():Object
return _data;
override protected function measure():void
super.measure();
measuredWidth=124;
measuredHeight=148;
measuredMinWidth=124;
measuredMinHeight=148;
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
xmlns:local="*" applicationComplete="init();" height="375">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
public var data1:CustomRendererData = new CustomRendererData();
public var data2:CustomRendererData = new CustomRendererData();
public var data3:CustomRendererData = new CustomRendererData();
public var data4:CustomRendererData = new CustomRendererData();
public var data5:CustomRendererData = new CustomRendererData();
public var data6:CustomRendererData = new CustomRendererData();
public var data7:CustomRendererData = new CustomRendererData();
public var data8:CustomRendererData = new CustomRendererData();
[Bindable]
public var coll:ArrayCollection=new ArrayCollection([data1, data2, data3, data4, data5, data6, data7, data8]);
private var _changePercentTimer:Timer;
private function init():void
data1.title ="data1";
data1.color = 0xff0000;
data1.time = 8;
data1.isUploading = true;
data2.title ="data2";
data2.color = 0x00ff00;
data2.time = 11;
data2.isUploading = true;
data3.title ="data3";
data3.color = 0x0000ff;
data3.time = 9;
data3.isUploading = true;
data4.title ="data4";
data4.color = 0x00ffff;
data4.time = 13;
data4.isUploading = true;
data5.title ="data5";
data5.color = 0xffff00;
data5.time = 12;
data5.isUploading = true;
data6.title ="data6";
data6.color = 0xff00ff;
data6.time = 18;
data6.isUploading = true;
data7.title ="data7";
data7.color = 0xfff0ff;
data7.time = 15;
data7.isUploading = true;
data8.title ="data8";
data8.color = 0xaff9ff;
data8.time = 15;
data8.isUploading = true;
_changePercentTimer = new Timer(1000,5);
_changePercentTimer.addEventListener(TimerEvent.TIMER , onChangePercentHandler , false ,0 , true);
public function onChangePercentHandler(event:TimerEvent):void
data1.percent+=3;
data3.percent+=10;
data2.percent+=20;
data4.percent+=11;
data5.percent+=5;
data6.percent+=13;
data7.percent+=18;
data8.percent+=8;
trace (data1.percent , data2.percent ,data3.percent , data4.percent);
public function itemClick():void
_changePercentTimer.start();
]]>
</mx:Script>
<mx:TileList id="list"
itemRenderer="CustomRenderer"
width="640"
height="150"
useRollOver="false"
dataProvider="{coll}"
columnWidth="150"
itemClick="itemClick();"
dropEnabled="true"
dragEnabled="true"
dragMoveEnabled="true"
paddingLeft="10">
</mx:TileList>
<mx:Button label="LoadData" click="itemClick();"/>
</mx:Application>The problem with renderers is that they're recycled, so probably that's why your List keep losing the animation states.
-
Hi, im making a gallery for a photography website, but im
having a problem when moving the pictures around using tweener or
tweenlite. Whenever i use a tween on the image group (all the
thumbnails are contained in a movieclip) or on a certain quantity
of images, some gaps appear between images *sometimes*, check out
this image :
http://www.episode17.com/larok/flashprob.jpg
I tried rounding out positions without luck... or maybe im
not rounding the right thing
Any idea?
thanks!distordimage allows you to control the 4 corners of any rectangular movieclip which allows you to mimic a 2d object moving in 3d space:
http://www.flashsandy.org/blog/distordimage-the-way-to-distord-bitmaps-by-code.html
p.s. please mark helpful/correct responses. -
Hello i am still trying to create tile based movement. What i mean by that is the character can move smoothly but will always end up in the middle of a tile (just like the pokemon games). I have managed to make it work if the player uses only one key, however in combination with other keys it does not work. I was hoping someone could give me advise how to fix the code or perhaps some better/easier way to do it.
Here is my code so far (this is only for left and right key) my character movieclip has the instance name char
import flash.ui.Keyboard;
import flash.events.KeyboardEvent;
import flash.events.Event;
import fl.transitions.easing.*;
import com.greensock.*;
var pixelsMoved:Number = 0;
var pixelsLeft:Number = 0;
var tweening:Boolean = false;
var rightKeyDown:Boolean = false;
var leftKeyDown:Boolean = false;
addEventListener(Event.ENTER_FRAME,Loop);
stage.addEventListener(KeyboardEvent.KEY_DOWN,KeyPress);
stage.addEventListener(KeyboardEvent.KEY_UP,KeyRelease);
function Loop(event:Event):void
if (tweening == false)
if (rightKeyDown == true)
char.x += 1;
pixelsMoved += 1;
else if (leftKeyDown == true)
char.x -= 1;
pixelsMoved += 1;
if (pixelsMoved >= 25)
pixelsMoved = 0;
pixelsLeft = 25;
function KeyPress(event:KeyboardEvent):void
if (event.keyCode == Keyboard.RIGHT)
rightKeyDown = true;
if (event.keyCode == Keyboard.LEFT)
leftKeyDown = true;
function KeyRelease(event:KeyboardEvent):void
pixelsLeft = 25 - pixelsMoved;
if (event.keyCode == Keyboard.RIGHT)
if (tweening == false)
var moveRight:TweenLite = new TweenLite(char,pixelsLeft,{x:char.x + pixelsLeft,ease:None.easeNone,useFrames: true,onComplete: resetVars});
rightKeyDown = false;
tweening = true;
if (event.keyCode == Keyboard.LEFT)
if (tweening == false)
var moveLeft:TweenLite = new TweenLite(char,pixelsLeft,{x:char.x - pixelsLeft,ease:None.easeNone,useFrames: true,onComplete: resetVars});
leftKeyDown = false;
tweening = true;
function resetVars():void
tweening = false;
pixelsLeft = 0;
pixelsMoved = 0;
Any help is much apreciated!I am not sure I understand all the requirements. Also I guess you refer to pacman game - not pokemon.
In any case, here is something that works pretty smooth at 60fps. Note there are no ENTER_FRAME handlers - all animations are handled by TweenLite.
Just dump the code on a timeline in a new FLA - it is not meant to be injected into your existing code. So, this is just an independent fully functional concept. All objects are created dynamically by the script - you don't have to do anything to view/test this example.
Read comments.
import com.greensock.easing.Ease;
import com.greensock.easing.Linear;
import com.greensock.easing.Sine;
import com.greensock.TweenLite;
import flash.display.Graphics;
import flash.display.Shape;
import flash.display.Sprite;
import flash.events.KeyboardEvent;
import flash.geom.Point;
import flash.ui.Keyboard;
var board:Sprite;
var tileSide:Number = 40;
var numRows:int = 10;
var numCols:int = 14;
var char:Shape;
var _currentKey:uint = 0;
var tween:TweenLite;
init();
function init():void
drawBoard();
configStage();
function configStage():void
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPress);
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyRelease);
function onKeyRelease(e:KeyboardEvent):void
// if the latest processed key was not release - we block the latest pressed key
if (e.keyCode == _currentKey)
_currentKey = 0;
function onKeyPress(e:KeyboardEvent):void
currentKey = e.keyCode;
function get tile():Shape
var shape:Shape = new Shape();
shape.cacheAsBitmap = true;
var color:uint = 0x808080;
var g:Graphics = shape.graphics;
g.lineStyle(1, color);
g.beginFill(0xEBEBEB);
g.drawRect(-tileSide / 2, -tileSide / 2, tileSide, tileSide);
return shape;
function moveChar(targetX:int = 0, targetY:int = 0):void
tween = TweenLite.to(char, 0.45, {x: targetX, y: targetY, ease: Linear.easeNone, onComplete: onTweenComplete});
function onTweenComplete():void
* need to do that
* a. if key is kept pressed
* c. to override situations when another key is pressed simulataneously
currentKey = _currentKey;
function set currentKey(value:uint):void
var targetPosition:Number = 0;
* key value is proccessed if
* a. key is allowed - via switch
* b. there is no key pressed before or ptreviously pressed key _currentKey is the same as new value
* c. tween in not active
if ((!_currentKey || _currentKey == value) && !tween._active)
switch (value)
case Keyboard.RIGHT:
targetPosition = char.x + tileSide;
if (targetPosition < tileSide * numCols)
moveChar(targetPosition, char.y);
charRotation = 0;
_currentKey = value;
break;
case Keyboard.LEFT:
targetPosition = char.x - tileSide;
if (targetPosition >= 0)
moveChar(targetPosition, char.y);
charRotation = 180;
_currentKey = value;
break;
case Keyboard.UP:
targetPosition = char.y - tileSide;
if (targetPosition >= 0)
moveChar(char.x, targetPosition);
charRotation = -90;
_currentKey = value;
break;
case Keyboard.DOWN:
targetPosition = char.y + tileSide;
if (targetPosition < tileSide * numRows)
moveChar(char.x, targetPosition);
charRotation = 90;
_currentKey = value;
break;
function set charRotation(value:Number):void
if (char.rotation == -180)
char.rotation = 180;
if (char.rotation == 180 && value == -90)
char.rotation = -180;
else if (char.rotation == -90 && value == 180)
value = -180;
TweenLite.to(char, 0.2 * (Math.abs((char.rotation - value) / 90) || 1), {rotation: value});
function drawBoard():void
board = new Sprite();
var numTiles:int = numRows * numCols;
for (var i:int = 0; i < numTiles; i++)
var t:Shape = tile;
t.x = tileSide * (i % numCols);
t.y = tileSide * int(i / numCols);
board.addChild(t);
board.addChild(addChar);
addChild(board);
board.x = board.y = 20 + tileSide / 2;
function get addChar():Shape
var radius:Number = tileSide / 2 - 4;
char = new Shape();
var g:Graphics = char.graphics;
g.lineStyle(1);
g.beginFill(0xff0000);
g.drawCircle(0, 0, radius);
g.endFill();
g.lineStyle(2);
g.moveTo(0, 0);
g.lineTo(radius, 0);
g.beginFill(0x000000);
g.moveTo(radius, 0);
g.lineTo(radius - 10, 4);
g.lineTo(radius - 10, -4);
g.endFill();
tween = new TweenLite(char, 1, null);
char.cacheAsBitmap = true;
return char; -
Rotation won't work; embedded in .pdf
hi all
I've embedded a few .swf's in a .pdf presentation--they all work great except for one, where a rotation tween (using tweenlite) won't work. It works fine playing it in flash player however... I've tried both reader and acrobat, with the same results
any ideas?
thanks!
LMLMy iPad 2 is having the same orientation issues since the upgrade. I have reset my iPad about once a day since the upgrade to resolve the orientation getting stuck in either portrait or landscape. Most of the day it works correctly but at some point it just stops. I have tried switching the mute/lock setting back and forth but that doesn't help. Only a hard reset resolves the issue...until it happens again a few hours later.
Wondering if my only option is a re-install, which I would rather avoid. -
HELP!!! Flash Intro Page Like Sony Ericsson's!
I have been trying to get my head around how the phone intro page for sony ericsson was created.
http://www.sonyericsson.com/cws/cws/home?cc=us&lc=en
Has anyone gotten any idea?
Thank you.Hi,
That's a very nice effect. I guess you could do that kind of thing using a 3d library like Papervision3D or Alternativa with a tweening library like Tweener. TweenLite or gTween.
Cheers,
Rui -
Simple TweenEvent works strange?
Hi there,
I have a simple example of some tweening action.
There are some strange things that happen that would not
happen before in AS 2.0
If you press the button some times (fast) then suddenly the
squares will freeze at a certain moment.
It could be a bug, but maybe i am doing something wrong?
Also i tried to make an eventListener, so when tween is
finished, then fire a function. That works, but only
for one movie!
Isn't there a way to make a multiple tween Listener like
this?
this["myTweenAlpha"+i].addEventListener(TweenEvent.MOTION_FINISH,
removeSquares);
This way the movieclips will remove or change not at once,
but one by one.
To test this example you have to place a button on your stage
and call the instance name: button_btn
And create a small square and convert it to a movieclip. Then
delete it from the stage And go to your
Library and call it's linkageId =" square"
See, the attached Code.
I hope someone has a solution, because i already spend more
then 4 hours to figure it out.Thanks for that tip, i tried to implement this, but with an
aditional timer funciton it still
works strange. When you press the button, the squares will
now build after 50 miliseconds.
It all works fine. But when you press multiple times on the
button (very fast) ..it still freezes the squares
at a certain moment.
I also tried to make the timer event unique, using a counter.
At some forum in our country i read about
that the classes Adobe released (tweens) are very buggy. And
that they recommend to use another
class (like
caurina).
But perhaps there is a fix for these strange behaviour when
using the Adobe tween class?
i updated the attached script (14:32). I discoverd the
eventListener from the timer must be reset, that's why
i used a boolean. It's more stable now, but still if you
press long enough and fast it will freeze at some moment. -
Serious problem with the speed of full screen textField animation
I can't find any proper way to make a long textField move
fluently horizontally across the screen in full screen mode. I
tried many ways but it always gets stuck from time to time for a
few milliseconds and ruins the whole experience. Please, if someone
can help me to find a way to best animate a large dynamic string on
full screen, I would be very grateful.
Thank you.
P.S. If there is a better way then using a textField to have
a fluent animation, please tell me and I'll try using a different
object for my string.From your previous post I understand you use Tween to animate
the thing. Perhaps it is worth either exploring other tweening
engines (Tweener or TweenLite) or writing your custom one.
Before you do that I would give Tween one more shot and see
what and when happens when you use Tween class.
Tween has event TweenEvent.MOTION_CHANGE. You can add a
listener for this event and trace inside it:
trace(getTimer() + " : " + myText.x + " : " +
event.target.position);
This may provide information about how smooth the timing of
movement is and how evenly position is set.
I realize that the issue is in full screen mode and trace is
not possible, so, perhaps, you need another TextField on stage that
will out put this values:
Inside listener:
debugText.appendText(etTimer() + " : " + myText.x + " : " +
event.target.position + "\n");
As for the custom animation, the way to go could be using
Timer class.
First of all, to make sure there is a full understanding of
what happens in terms of frames, the following needs to be kept in
mind (forgive me if I am beating dead horse):
Look at Flash frames not as "physical" entities but as pieces
of code that executes before screen refreshes. So, when you set
frame rate to 20 - Flash JUST schedules every screen refresh every
50 milliseconds. Does it refresh every 50 milliseconds? NOPE! It
refreshes ONLY when ALL the code pertaining to particular frame is
executed. THIS IS VERY IMPORTANT! Frame rate is the directive that
in simple language states: "Refresh screen NOT MORE OFTEN than N
times a second if all the code is executed." So if the the next
refresh is scheduled in 50 milliseconds but code took 100
milliseconds to execute - screen is refreshed in 100 ms. In the
example when frame rate is 20 but every frame code takes 100 ms
your actual frame rate is 10 frames per second.
This discrepancy is usually the reason for jerky animation.
So, there are two solution: 1) create Timer based animation
or 2) create a velocity based animation.
Timer based animation
There is a very nice method of Timer, Mouse and Keyboard
events. The method is updateAfterEvent(). This method forces screen
to refresh/render INDEPENDENT of frame rate. Even if you frame rate
is only 2 fps - you can have 100 screen updates/refreshes per
second effectively making frame rate 100 fps. This makes it much
more reliable. (With all fairness, even Timer deep inside relies on
base frame rate which imposes some limitations on Timer. But for
now let's assume it doesn't).
In this approach you will instantiate a Timer class -->
add timer event listener --> on every iteration move the object
to desired position --> invoke event.updateAfterEvent() inside
the listener. VIOLA! You know that user sees what s(he) has to.
Velocity based animation
This approach relies on Event.RENDER.
Say you still decide to use Tween ENTER_FRAME. So, you will
need to have velocity variable.
Besides other listeners you will need to add say
this.addEventListener(Event.RENDER, render);
function render(event:Event){
// move the thing where is is supposed to be based on
velocity
// perhaps needs additional calculations base on time or
something
So, these are outlines of possible approaches.
Hope it helps.
Andrei -
Adobe AIR and Tweenlite - help!
Hi Guys,
Does Adobe Air support tweenlite or other 3rd party animation/tween plugins?
I have a Flash CS4 (AS3) application that uses a Tweenlite animation within a loop. This works perfectly when I output to FlashPlayer 9/10 but not when I publish to AIR 1.1.
I have included the /gs folder when I package out and publish as AIR but to no avail.
I'm so frustrated with this!
Super thanks in advancewhat's the error you get?
Please consider an upgrade to the last version of Air (1.5.1).
HTH. -
I am using ActionScript 3.0, Adobe Flash CS4 software
I have created Tweens for some MovieClip properties and experimented with some of the easing types.
This is what I have managed to create and works okay!
grow_btn.addEventListener(MouseEvent.CLICK, grow);
shrink_btn.addEventListener(MouseEvent.CLICK, shrink);
rotate_btn.addEventListener(MouseEvent.CLICK, rotate);
hide_btn.addEventListener(MouseEvent.CLICK, hideClip);
show_btn.addEventListener(MouseEvent.CLICK, showClip);
fadeOut_btn.addEventListener(MouseEvent.CLICK, fadeOut);
fadeIn_btn.addEventListener(MouseEvent.CLICK,fadeIn);
function grow(e:MouseEvent):void {
var scale1:Tween = new Tween(instrument, "scaleX", Back.easeIn, 0, 1, 3, true);
var scale2:Tween = new Tween(instrument, "scaleY", Back.easeIn, 0, 1, 3, true);
function shrink(e:MouseEvent):void {
var oneSmall:Tween = new Tween(instrument, "scaleX", Back.easeInOut, 0, -.2, 3, true);
var twoSmall: Tween = new Tween(instrument, "scaleY", Back.easeInOut, 0, -.2, 3, true);
function rotate(e:MouseEvent):void {
var spin:Tween = new Tween(instrument, "rotation", Elastic.easeOut, 0, 360, 5, true)
function hideClip(e:MouseEvent):void {
instrument.visible = false;
function showClip(e:MouseEvent):void {
instrument.visible = true;
function fadeOut(e:MouseEvent):void {
var tweenfadeOut:Tween = new Tween(instrument, "alpha", None.easeOut, 1, -.1, 3, true);
function fadeIn(e:MouseEvent):void {
var tweenfadeIn:Tween = new Tween(instrument, "alpha", None.easeIn, 0, 1, 3, true);
I am having trouble creating Tweens and add easing types for the action script below!
I keep getting error message (“Access of undefined property Sine”) for example when I type
function hideClip(e:MouseEvent):void {
var noClip:Tween = new Tween(instrument, "visible", Sine.easeOut, 0, 1, 3, true);
Can anyone help???? The original script is below
hide_btn.addEventListener(MouseEvent.CLICK, hideClip);
show_btn.addEventListener(MouseEvent.CLICK, showClip);
function hideClip(e:MouseEvent):void {
instrument.visible = false;
function showClip(e:MouseEvent):void {
instrument.visible = true;make sure you have imported the Sine class
import fl.motion.Sine; -
Adobe air 2.6 iPhone animation tween class vs onEnterframe
Hi, Does anyone knows what's better to create alpha or slide animations on iPhone applications, using a tween class like Tweener or use the classic onEnterframe. What's the better choice, who's the better performance . Thanks, Nuno
Use Tween Class,
http://www.greensock.com/tweenlite/ -
Adobe Flash CS5 - Blur effect & tween not working
When I try to create a tween for the blur, so it will blur into focus, the tween just wont work. I go to frame 130, keyframe, add blur filter, create clasic tween. But when i go to frame 131 it instantly pops into focus instead of going along the tween time span to blur in gradually(I have the next keyframe at 160). Anyone have any ideas?! This boggles my mind!
Any help or suggestions would be deeply appreciated
Thanks in advance...What type of textfield are you using? What type of symbol have you created it as? If you can show a screenshot of the stage and timeline for what you have it might help to identify the problem.
-
I am a bit new to the program and would appreciate the help!
You don't convert a symbol to a tween. You can tween a symbol, but that is just applying a movement over time to that symbol. If you select the symbol at either keyframe in the tween, you can still adjust the symbol at either keyframe. What do you mean by changing the color?
If you select the symbol at a keyframe, you can then double click on it to edit the original object in the Library, if you make a change to that original object, you will see the result at both the first and the second keyframe. So if you want to change the color of a symbol from the first keyframe to the second keyframe then you have to do more work. You can use one of several methods in Actionscript to alter the color of a symbol, or, you could make up the symbol from other objects and then make changes to those parts from one keyframe to the second.
Maybe you can give us a fuller explanation of what you have in mind. -
Does adobe photoshop cc have tweening?
Does it have it, and if so where do I find it?
Once in the Timeline panel, look to the little fly-out menu icon at the upper right corner of the panel.
-Noel
Maybe you are looking for
-
How do i switch back to my ipod info after syncing with someone elses?
I plugged my Ipod into my sisters computer to download her Itune music onto mine. Now my ipod has all her info on it. Its like mine syned up to hers and all my info is gone. I still have my aps but it wont let me use them and my email info is her
-
i can't add my videos to my ipod from itunes. itunes reads my videos but when i try and add them to my ipod it say's this ipod can't read these files. i have got the new ipod update and itunes and it still doesnt work. DOES ANYONE KNOW HOW TO GET ROU
-
Satellite P100-347: DVD multidrive - sound cracks
when I try to play a cd or dvd the sound cracks (sounds awfull) the device reads allright, p100-347 malfunction or technical solution ??
-
Formula in Bar graph not coming
Hi I am not able to show formula in graph as it is not coming in the Available Field List of chart expert. My req is like, I have the No of TTs and the TTR value for each TT. According to my req. I have created 2 running total fields Sum of TTRs and
-
Report Problem in Eclipse....
Hi friends, I am using MyEclipse Editor for project, Report purpose i am using Crystal Report for Eclipse Editor. How to combine both the things.