A Simple Scripted Motion Tween Question
hi u all! i found a nice tut about tweening with action scripting, and actually can make some sense of it. hooray! it works. but how could i alter the code so that i can make my object (here figure1_mc) move diagonally instead of straight horizontal/vertical line? the tut explains only how to toggle x or y values separately. ok ok, my cover has blown: i'm pretty new to action scripting, but i'm learning...
here's the code:
var easeType = mx.transitions.easing.Regular.easeOut; myTween = new mx.transitions.Tween(figure1_mc, "_y", easeType, 0, 300, 30);
so if there's anyone with extra hands out there, i sure could use one now manymanythnx, mar
FlashKit > Flash Help > Flash ActionScript
Posted on: 07-25-2005, 02:28 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Stopping A Scripted Motion Tween
onClipEvent (load) {
//this sets the initial x position of our clip
this._x = 50;
}
onClipEvent (enterFrame) {
//this moves our clip 5 pixels to the right every frame
this._x = this._x+5;
if (this._x == 200) {
trace(this._x);
this._x = 50;
this._x = this._x+0;
}
}
=========================================
What i want to do is make the tween stop and go to 50 at x axis after reaching 200.
Simple Motion Tween..?
Hi All,
what is wrong with this. It is a very simple thing, 2 lines that cross each other in the middle in what I thought should be an easy motion tween, but isn't. I don't un why the lines move in frame 3 and why the lines don't gradually move towards their final points, within the tween. Any suggestions..? Cheers.
Looping A Simple Motion Tween
This is pretty simple, (to all of you!) but I am using Flash MX.
I have created a simple short motion tween (ball moving across the stage) but I would like it to loop for the entire duration that the page is viewed.
If you have any advice, please break it down into newbie language! (I'm really new to actionscript etc)
How Do I Tween A Simple Motion Using Action Script
HI,
Im trying to make a square move around by tweening its motion which is something I am already very comfortable with using regular actions mode, as well as more dificult things. However, being a beginer I am having a lot of trouble creating even a simple action like this using purely actionscripting or "expert mode". if anyone has any advice that would be greatly apreciated thanks!!
Simple Alpha And Motion Tween Problem
I've been trying to do something which I thought was simple in flash, however I'm having problems.
I create a piece of text and make it a symbol. Then set its alpha value to zero.. insert a keyframe further on, change the alpha value to 100 and move the symbol elsewhere on the screen. This, I thought, should create the effect of the text moving across the screen and fading in at the same time?
When I drag the slider along the timeline, all seems to work as I want, but if I "test movie" or publish etc, the text moves but no alpha tweening happens. I've tried using "tint" and this works ok, so why doesnt alpha? Any help greatly appreciated as I'm going mad with this!
Motion Tween Resizing Of Images + Scenes (simple Question)
Hey There!
I'm currently stuck on a small bug, but let me get to the point. In my flash applet, there's alot of resizing of images and alot of clickable buttons that trigger animations and whatnot.
The problem i'm having is that my image quality when resizing is beyond horrible. I know you lose quality when you resize images in flash, but this is beyond the normal generation loss. It all seemed to go downhill when I introduced scenes to the applet.
Everything looks extremely jaged and rough. Yet in the flash editor itself, it looks normal. For an example of what i'm talking about, visit:
http://www.lockbuddy.com/mark/lb.html
Click on the picture frame with the smiley face on it, and you can see the issue, the bracelet ring is horribly jagged. If you click on the tree on the bottom, the resizing is beyond horrible.
Is this jagedness normal? Or are there ways I can fix/minimize it?
Thanks to everyone for reading, and a great appreciation goes out to those who can help me out, thanks
-Mark
Scripted Motion...
hi, i got 2 cases here....
1. once the frame is loaded... i want to tell the instance to move , but the movement is a scripted motion... it's not tweens on the timeline...
and
2. once the frame is loaded,... i want to change a fade in/out of the instance from tweens on the timeline... into a scripted motion...
since it means much on the file size...
the problem in these 2 cases is, i m not sure how to activate the movement once the frame is loaded... i did try onLoad event method... but it's not working...
basically , all i wanna do is some intro similar to www.ysl.com
Scripted Motion?
Can someone please give me a tutorial or a link for "scripted motion". I just want to learn a little about it because I just learned that I can get smoother animation by using that other than using tweens? Help.
Scripted Motion
hi...
Can someone point me to a tutorial or help me out with how to get an effect similar to the one here:
http://www.webookbands.com
Look on the top navigation bar. When you mouse over a link, a black bar moves over to "hilight" the link....it's doing this with a nice smooth movement. I'm not concerned with the black bar resizing itself because I just want to use this effect to hilight boxes that are all the same size.
Thanks!!!
Scripted Motion?
Help with Smooth Movement
I want to use an effect like the one on this site: http://www.federicafontana.it/index3.html
(Settle down boys Nice work, huh?)
That is, I like the way the small windows open. Can anyone lead me to how this is done? I suspect it is scripted vs. tweened, no? It'd be great if you can lead me to a site with some source.
Anyway, have fun on the site.
Thanks,
Rick
Scripted Motion Problem...
I've used this code before and it work smooth but for some reason this it's really choppy. Is it because I'm giving it negative numbers for coordinates or because I'm using dynamic and input textfields??
Here it is:
Code:
// this is looped
difx = x - this._x;
if(difx != 0){
this._x += difx/3;
}
if(difx <1 && dfix >-1){
this._x = x;
}
if(this._x == x){
gotoAndStop("rest");
}
If anyone has a better motion script that takes x coordinates let me know ASAP thanks.
Scripted Flying Motion
Hello,
k, i'm working on this project where i need to script the following kind of motion:
i have four 'pods', spheres bascially, that need to come onto the stage via a flying motion. the four are supposed to come in from four random directions, and sorta curve into position. when i say curve, what i mean is not come in via a straight line.
once they're there, the need to sorta hover around a bit in place. like up/down/side to side.
any, any help would be appreciated, or points to tutorials or websites that might cover this kind of thing.
thanks!
-tp
Scripted Motion Question: Can't Anyone Help Me At All?
scripted flying motion
my original message:
Hello,
k, i'm working on this project where i need to script the following kind of motion:
i have four 'pods', spheres bascially, that need to come onto the stage via a flying motion. the four are supposed to come in from four random directions, and sorta curve into position. when i say curve, what i mean is not come in via a straight line.
once they're there, the need to sorta hover around a bit in place. like up/down/side to side.
any, any help would be appreciated, or points to tutorials or websites that might cover this kind of thing.
thanks!
-tp
Basic Scripted Motion
(saw a few questions about how to script movement lately, and this is something i wish i'd known when i started)
psuedo-real movement via script is accomplished using pretty much a bunch of variations on this basic formula
Code:
element.property += (destination value - current value) / steps;
stick that in an enterFrame and you're off.
Stoping Scripted Motion
Hey there I have 10 movieclips on the stage, and for each one I have this code:
var tween=new mx.transitions.Tween(MY MC NAME, "_alpha", mx.transitions.easing.Regular.easeOut, 0, 100, 1, true);
once this code is executed it calls on the other using:
tween.onMotionFinished = function(){ THE NEXT MC TRANSITION
I have a button on the stage which I would like it to stop this animation, how can I do this? normally when I'm tweening directly on the timeline it is easy using the gotoAndStop ("LabelName"); but using scripted animation I don't have a clue on how to stop the animation.
Thanks for any help you may provide on the subject
Scripted Motion Blur...
Anybody knows how to do Scripted Motion Blurs...to make simple movements with blur, _x,_y,...easing...like menus in:
http://newsantafe.hyundai-motor.com/
Scripted Motion Techniques
I am scripting a movie clip to be dynamically animated. For example using a coasting script like this:
ActionScript Code:
// Dummy Coasting
new_x = _root._xmouse;
// Target Movement
cur_x = _root.dummy._x;
speed = 12;
with (_root.dummy) {
_x=cur_x+(new_x-cur_x)/speed;
_y=_root._ymouse;
}
This gives the target dummy the 'delayed coast' motion. What I'm looking to do now is somewhat the opposite. I want a movieclip to coast, but start out slow and gradually get faster until it reaches the target position.
I think what I'm looking for is the equivalent of the 'ease' in a motion tween. Going from 100 to - 100. I've tried a few things of my own, but I'm not quite getting the effect I'm looking for.
Any ideas?
Scripted Motion Loop
Hi, i'm confessedly not a pro at this stuff so let me know if this is really easy. More into design but really want to get better at scripting.
I've got a movie clip and I want it to move in both the _x and _y directions to certain points in both and then go back the other way.
I can make it go in one direction but have trouble making it go back the other way and keep on doing it. Ideally I'd like this motion to have a random element to it but for now I'd be happy with just it moving back and forth accross the stage.
I can't figure out if I'm suppossed to you if/else or for or something else entirely? Sorry if this is an easy question but i've tried searching...
Any help very much
Advanced Scripted Motion
Hi gang,
has anyone got any ideas about scripting A.I. motion, i.e. an object accelerates, decelerates, maintains its velocity on the fly. I'm gonna be creating a horse racing game where the results are predetermined, and hence I need to have the motion generated randomly, but the results fixed.
I'm aware of basic deceleration techniques, but I'm interested in something a bit more flexible.
If any of you have tackled something like this before, I'd be greatful for some input.
Cheers
Jerky Motion (scripted & Timelined)
Hi
We have created a Flash Projector movie to run via a 500mhz iBook to a projector for a presentation we are doing. There is only a short piece of vectorised animation (this is the jerky bit) leading into a series of 72dpi jpegs, each onscreen for 2 seconds before being replaced by another, and once they've done starting over again at the animation.
The movie runs full screen on the iBook with no other applications open, and with a boat load of memory allocated to it. (when its not on fullscreen it sails along).
The problem we are having is the tweened movement created via the time line and the alpha fades created via Actionscript are very jerky on screen.
I've tried 12, 24, 30 & 48 fps all seem to create the same jerkyness.
Is there anything we can do to improve what we have, or are we going to have to accept it?
Any help greatly appreciated!
Scripted Motion Tweens: Cpu Issues
I've made a site that uses a number of masks to reveal parts of the interface piece by piece. I've noticed though that some of the transitions are very cpu intensive. i was thinking of transferring some of the tweens that happen on the timeline to actionscripted tweens. should this solve the problem or is it that masks themselves use a lot of cpu?
this is the script i would use, varied according to whether it needs to move by x, y or increase in width or height:
code:
onClipEvent (load) {
//set initial width of clip
this._width = 0;
}
onClipEvent(enterFrame){
if (this._width<300)
{
this._width+=50;
}
}
Is there any way though that i could set these transitions to be related to movement within a specified number of frames?
Thanks.
Scripted Motion & History Buttons
Hi I saw this cool Korean website http://www.motion-wave.com
n I was wondering how the elastic resizing effect (when one of the buttons is pressed, the main window resizes and other parts move) was done. was it purely actionscript?
And another thing i had been trying to find out is how do u do history buttons? (like the one show in motion-wave.com, where when u click it change to one color(this is easy) and when u click on other buttons, the previous button fades back into the original color)
Really hope to recreate these effects... n will appreciate help =)
If i manage to recreate it I will post it in Flashkit so that everyone can benefit from it ok?
Thanks again^^
Flashmx Scripted Motion Problem
this is difficult to explain, i will attempt to be clear.
simple slide show
here is the code and the problem
function moveObject (objecttoMove, newPosition){
objecttoMove.onEnterFrame=function(){
this._x-=(this._x-newPosition)*.5
}
}
function indexUp(){
_root.oldIndex=_root.currentIndex+1;
_root.newIndex=_root.currentIndex;
_root.moveObject(_root["h"+_root.oldIndex], -341);
_root.moveObject(_root["h"+_root.newIndex], 0); <<< **problem lies here**
_root.currentIndex=_root.currentIndex-1;
_root.right.gotoAndStop(2);
_root.gotoAndPlay(4);
}
stop();
*note: indexUp() is called from the "next" button ( on(release) ).
on the first part of the indexUp() function, i take the picture currently being displayed on the stage and slide left, works like a charm. at this point, it moves the MC holder "_root.h3" (value of _root.oldIndex being 3)
the value of _root.newIndex is 2, the MC holder i want to move is "_root.h2", but it does not move.
any thoughts?
cheers
Basics Of Angular Scripted Motion
What are the, or where could I find a resource, on the basics of scripted motion.
I have a mc which can be located anywhere on the stage. On a button mouse over I want mc to smoothly move from where it is to a (xy) specified by the mouseover.
I have used scripts to animate movie clips before. Unfortunately the motion has always been along 1 axis. For instance horizontal scrolling along the x axis. The calculation of the next point is a simple matter of addition and subtraction. So the basics of scripted motion I understand.
Here is the root of my problem.
1) I need to know how to calculate the points that mc will need to pass through when it is on an angle to its eventual destination.
2)Further I need a method for calculating the length of that line so as to control the rate of movement.
3)Need some understanding of positive / negative slopes and how to handle them. (from my perliminary investigations this seems a basic but important point)
The rest I can figure out.
Obviously there are many fla s available which make use of these very equations. But generally speaking there is a great deal of extra code which muddies the water for me somewhat. I could really use a clear explanation of the equations involved and an outline of how to implement them.
Thanks ahead of time for any assistance you can offer.
cheers
scott
Zigo Prototype Vs Scripted Motion
hi guys,
I wanted to toss this question and hear your opinion about this subject.
What do you guys think of tweening prototype zigo http://laco.wz.cz/tween/ vs scripted motion.
Which one should I stick to?
What the disadvantages of using zigo.
Thanks
Scripted Tween
Hi. On the release of a button i want to tween a movie clip to a new position.
Can someone please tell me the actionscript for this.
Thanks,
Mark
Is This Scripted Or A Tween ?
Hello,
Do you kwow how to reveal from the center of the screen a picture
like in http://www.monnone.com/
Have you some hints/tutorials to do this with actionscript (MX 2004) ?
Thank you
Tony
Scripted Motion - Simulating Upstream Movement
... been a while since I visited Kirupa! Hello all
How would you go about coding something like the waves in the header on this page?
http://www.trts.com/radio/radio.html
I'm hoping to write something that will look a bit like eels swimming upstream but wasn't quite sure where to start ... any pointers would be much appreciated. Thanks!
Tom
Scripted Motion, Good Programming In General
hi,
i'm working on kind of a flash-database-visualization-thing.
started some time ago (must be several months now - which year do we have??) with a basic idea of how things could work and got quite far.
but as a result of this slow process of trial and error the whole thing is not very well formed in terms of programming and architecture and i am currently thinking of rebuilding the whole app (...again ) or considering even another language (like java, is this hard to learn?).
the major problem i am facing is the following:
every dataset (like -lets say- a user) is one loaded movie that gets moved by actionscript across the screen, and with every movieclip actionscript has to move the whole framerate is getting slower and slower and slower...
as i blame that on bad programming, could you give me some hints on good programming that leads to faster running apps?
like, "what is the best way to write a script for a motion of maybe 100 movieclips?" and stuff.
i know this is quite general but to explain the structure of this monster would be too much - i would have to pay you just for listening
however you can take a look at it (still no layout - just the engine):
html (tested on ie6/XP only) or if this doesn't work: the swf
(this is loading like forever, give it some time)
and if it helps anyone(i dont think so as it is really weird code): the main fla
and some of the ones that get loaded (haha): network-clip and fileclip.
well, i hope this is not totally overwhelming, keep in mind i appreciate any help like links to resources by people who did similar things etc,
just everything that could help.
thanks so much in advance
d
Stopping Scripted Tween
Hi there. Is there anyone here who knows how to stop a moving scripted tween?
The code goes like this..
import mx.transitions.Tween;
import mx.transitions.easing.*;
myTweeningX = new Tween(_root.bala, "_x", Strong.easeOut, 267,400,5,true);
myTweeningY = new Tween(_root.bala, "_y", Strong.easeOut, 355,400,5,true);
myTweeningX.FPS = 40;
myTweeningY.FPS = 40;
I got an event that should stop the actionscript in a certain point, but i just don't know the codes to do it. Please help. Thanks.
Stopping A Scripted Tween
hi,
i'm using the tween class to control a tween in the attached movie. The orange shape should ease in and out when you rollover it and the grey shape should get bigger and smaller.
it sort of works but I need a way of stopping the tween for the orange shape as otherwise, it goes into a loop when the mouse is in certain positions.
can anyone help me out?
thanks,
lukemack.
Scripted Shape Tween
Is it possible to script a shape tween?
For example, you have a rectangular mc, then press a button and have it change(tween) size and turn into a circle.
Is It Possible? Motion Guide + Motion Tween + Actionscript Api Drawing
Hi
Im looking for some help I've done a lot of research and spent hours trying to find a way to do this so any input is appreciated.
I have drawn a shape in actionscript
_root.createEmptyMovieClip("myMoon",6);
with (myMoon){
beginFill(0x999999, 100);
drawCircle(50,120,30);
endFill();
}
new Tween(myMoon, "_x", Elastic.easeOut, 0, 300, 3, true);
Basically I have a tween on it that works fine but what I need to do is motion tween along a motion guide.
Of course I know how to achieve this through the normal way of drawing a circle through the tools box but I have to figure a way out to do this to the shape drawn in action script via the drawing api. How can I do this?
I presume I have to someway make this shape appear in my library as a symbol possibly? Hope someone has a soloution thanks a lot
Using Stop(); On A Shape Tween Of A Swapped Movie Clip Symbol Within A Motion Tween
Thanks a lot for your time. I'm new to actionscript, and language syntax and I never really got along to begin with so I appreciate any help in the matter.
Basically the title says it all - I made a motion tween in the main scene, made a movie clip symbol (to shape tween a gradient) and added a stop(); inside the gradient-tweened-symbol. I then swapped the movie clip symbol with the motion tween in the main scene, and got exactly the effect I wanted (the item moved, then tweened itself) but the stop(); seems to have no effect.
I know this looks like one of those "that idiot didn't google before posting" questions, but I've been looking for about a half hour with different permutations of stop, doesn't work, actionscript, and flash, and I haven't found anything that seems to target this problem specifically.
If you've got any idea what's going wrong, please feel free to respond or show me how to better seek help on my own. Thanks again.
Tween Loop And Scripted Rotation
okay, what i'm trying to do is create something similar to a planetary orbit. the final result should be a rotating object following an elliptic path.
When click on a object, that object should move along the elliptic path to a specified focus point(which is on the path also).The challenging part is that all the object have to be dynamic retrieving from database.
What i have done is i store the coordinate of the object and i calculate the distance in between the onclick object with the focus point and tween it. Well, it is working but the result is not satisfy. What they want is a smooth elliptic path but what i have done is not elliptic enough.
Attach is my code. Anyone have any idea to improve my code or a new way to achieving the elliptic tweening is more than welcome. I been googling but cannot find any solutions yet. Thankz in advance.
Set Interval/pause In Scripted Tween
hi guys
i've small problem. i have a mc that i animated through a button this button changes the _x and _y position and the scale.
what i would like it to do is this. once the first _x and _y position has been met i would like to go to different position. the script should look something like this:
code:
on (release) {
_root.targXscale =25;
_root.targYscale =25;
_root.targX =890;
_root.targY =528;
unloadMovieNum(4);
unloadMovieNum(5);
//something here to set an interval or a pause//
_root.targX =890;
_root.targY =1000;
}
any ideas? i'm sure it is simple but am at a loss. thanks for your help.
Scripted Tween Not Working Properly
I have a scripted tween which is not working properly. the idea is that when i click a button this massive movieclip (8000 pixels wide), moves along 1000 pixels (the width of the stage) to show the next slide. Sometimes, and randomly, it stops in the middle of the tween, if you click the button again, it goes to the next slide as if the previous one had worked correctly.
this is the code i am using...
PHP Code:
navigation.nextBtn.addEventListener(MouseEvent.MOUSE_DOWN, GoToNextSlide);
// function to call ChangeSlides() when next button is pressed
function GoToNextSlide(e:MouseEvent)
{
var n:Number = 0;
if (curSlide < 8)
{
n = curSlide + 1;
ChangeSlides(n);
}
}
function ChangeSlides(n:Number)
{
if (n != 0)
{
var moveSlideTween:Tween = new Tween(slides, "x", None.easeIn, slides.x, xPos[n - 1], 0.4, true);
curSlide = n;
tweenNo++
}
}
when i trace xPos[n - 1] (an array) it comes out with a value that is expected - eg. where the movieclip should finish. but when i trace the x value of the movieclip it is not equal to where the tween should finish
can anyone see what is going on?
Scripted Tween: Weird Artifacts....a Bug ?
I've done a very simple tween of 25 lines of text, with one line fading in when the other fades out.
The original was a bit different with 3 lines being displayed at the same time, but I needed to make a different version with one line visible only.
BUT this new version is giving me weird artifacts on top of the text, like there's some irregular kind of mask on top of each layer.
I'm really puzzled....I made it again, starting again from the original, but the same thing happened!!
I really don't know how to fix this very strange problem of a non-existent mask/artifacts, so any kind of help is very much appreciated!
Adding Ease To A Scripted Tween
how do i add an ease to this code:
Code:
new mx.transitions.Tween(logo_mc, "_y", mx.transitions.easing.Regular.easeOut, 500, 306, 2, true);
the 500 and 306 are for the y-pos. and the 2 is the speed.
thank you.
Scripted Tween Then Preload Movieclip
okay, for some reason i'm not able to figure out why this no worky.
not going to attach my movie cuz too much going on...
first frame of my movie i have a stop frame with a simple clip which i tween (tween class) in that same frame. just a white line that comes in and slides down the stage. i'm not preloading this movie itself because it only contains that initial tween and some light actionscript.
My tween ends, triggers .onMotionFinished and I load a 1000px x 620px jpeg into a 2nd movie clip and advance to the next frame in the main timeline where I have a 3rd movie clip with a basic preloader bar movie clip inside it.
on that 2nd frame i assign an .onEnterFrame function to that 3rd clip like this:
Code:
stop();
preloadClip.onEnterFrame=function(){
bytes_loaded = Math.round(this._parent.picHolder.getBytesLoaded());
bytes_total = Math.round(this._parent.picHolder.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*200;
this.loadText._x = loadBar._x+loadBar._width+4;
if (bytes_loaded == bytes_total) {
trace("pic loaded");
this._parent.gotoAndStop("preloaded");
}
}
i usually use .onEnterFrame in this manner to preload stuff into clips with no problems.. for some reason, now my loadBar inside the preload clip gets moved over to the left end of the stage and doesn't appear to register any change in the ._width if i test movie and simulate download.
what the heck am i doing wrong? running out of ideas here!
Scripted Tween: Weird Artifacts....a Bug ?
I've done a very simple tween of 25 lines of text, with one line fading in when the other fades out.
The original was a bit different with 3 lines being displayed at the same time, but I needed to make a different version with one line visible only.
BUT this new version is giving me weird artifacts on top of the text, like there's some irregular kind of mask on top of each layer.
I'm really puzzled....I made it again, starting again from the original, but the same thing happened!!
I really don't know how to fix this very strange problem of a non-existent mask/artifacts, so any kind of help is very much appreciated!
Script Motion Vs Tween Motion Question
I have asked for help before on scripting that slows down text or smooths it out, etc.
My question is this.. (and i havent experimented yet so..)
If you were to use script to cause alpha changes and motion changes, as opposed to tweening everything, would it make the flash file move much smoother, especially if you had alot going on at one time???
It also should make the file quite abit smaller too correct?
Thanks
Tween Class Scaling Breaks Motion Tween?
I have a movie clip which uses a motion guide to animate the entry (and eventually the exit) of a bunch of other movie clips. These smaller clips contain buttons, and animate on rollOver and rollOut using the following code:
Code:
on(rollOver) {
this.swapDepths(2);
ParentxScale = new mx.transitions.Tween(this, "_xscale", mx.transitions.easing.Back.easeOut, this._xscale, 100/.6, .5, true);
ParentyScale = new mx.transitions.Tween(this, "_yscale", mx.transitions.easing.Back.easeOut, this._yscale, 100/.6, .5, true);
play();
}
on(rollOut) {
ParentxScale = new mx.transitions.Tween(this, "_xscale", mx.transitions.easing.Bounce.easeOut, this._xscale, 100, .5, true);
ParentyScale = new mx.transitions.Tween(this, "_yscale", mx.transitions.easing.Bounce.easeOut, this._yscale, 100, .5, true);
stop();
}
However, once an object has been moused over, it doesn't exit with the others. Any ideas why it seems to "fall off the track" of the motion guide?
Shape Tween Like A Motion Tween, Using Guide Layer
How if possible, can i make a shape tween behave and follow a set path (like using a guide layer)while morhping/tweening?
So far it seems as each time i try it always goes in a straight line from a to b and in this case that's not what i'm after.
Call Function Scripted On Tween Complete
im trying to make an event listener for a when a tween completes, and im not having any luck, any advise
my script
function startmove(event:KeyboardEvent) {
switch (event.keyCode) {
case 17 :
if ((blasts>0) && (blown)) {
blasts -= 1;
updateblasts();
blown = false;
blastx = ship.x;
blasty = ship.y-(ship.height/2);
bomb = bhold.addChild(new blast());
bomb.name = bomb;
bomb.x = blastx;
//bomb.addEventListener(Event.ENTER_FRAME, dropbomb);
bombtween:Tween = new Tween(bomb, "y", null, blasty, blasty-200, .5, true);
}
break;
}
}
bombtween.addEventListener(Event.COMPLETE, removebomb);
how can i make it call the removebomb function after the tween is completed???
Do I Use A Shape Tween? Mask? Motion Tween?
How do I make this arrow grow into shape? I want it to slowly appear...but not fade in...
it's hard to explain...but here is the arrow, hopefully you will understand what I want...
I tried using a mask, but instead of revealing the arrow little by little, it dissapeared little by little...(basically the exact opposite)...
I also tried putting a white box over it & motion tweening the box to reveal the arrow...but that didn't look good...
any ideas?...suggestions?
thanks in advance...
|