Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Actionscript Motion Tweens And Frames



is there a way for a frame to carry out its entire actionscript of tweening coordinates, width, height, alpha, etc. before continuing onto the next frame for a new set of coordinates and variables OR do i just have to keep adding frames for my MC to finish its animation?

ie -
frame one:
onClipEvent (load)
{
var ease = .15;
var width = 500;
var height = 20;
_width = 0;
_height = 20;
}
onClipEvent (enterFrame)
{
_width += (width-_width)*ease;
_height += (height-_height)*ease;
}

frame dos:
onClipEvent (load) {
var ease = .15;
var width = 0;
var height = 20;
_width = 500;
_height = 20;
}
onClipEvent (enterFrame)
{
_width += (width-_width)*ease;
_height += (height-_height)*ease;
}

there are TWO frames in this movie.



FlashKit > Flash Help > Flash ActionScript
Posted on: 02-22-2003, 11:13 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

A/S Motion Tweens And Frames
is there a way for a frame to carry out its entire actionscript of tweening coordinates, width, height, alpha, etc. before continuing onto the next frame for a new set of coordinates and variables OR do i just have to keep adding frames for my MC to finish its animation?

[CS3] Many Frames + Many Motion Tweens = Slow
so i made a little flash movie for my website, and the movie is about 45k.
there are at one point about 15 objects moving across the screen at the same time
(each with its own path and in its own frame) and it is SLOOOOW.
it's almost one frame at a time slow. one frame per second slow.
i've been on other websites where many things were going on at once
and it wasn't this bad. am i missing something?

Actionscript Motion Tweens
I've got a movieclip created in actionscript:

LayerMask_MC -- highest depth
Menu_Item_MC
 Menu_Item_Label_MC (child of Menu_Item_MC)
 Menu_Item_Background_MC (child of Menu_Item_MC)

I would like to create a motion tween for Menu_Item_MC and not for LayerMask_MC.  Essentially the motion tween would be just vertical movement downwards.  Also, I would like to have a pause in between the creation of each new Menu_Item_MC, so that the entire animation looks staggard, and not like they are being animated at the same time.

I've found and then manipulated some code:
CODEfunction menuLoadAnimation() {
        easeType = mx.transitions.easing.Regular.easeOut;
        var begin = -25;
        var end = 0;
        var time = .5;
        var mc = this;
        _yTween = new mx.transitions.Tween(mc, "_y", easeType, begin, end, time, true);
}

[F8] High-intensity Flash Site: Motion-tweens Or Actionscript Animation?
I am currently working on a website which is going to contain very heavy animations and interactivity. Similar to this site: www.ruinsmovie.com

I want it to run super-smooth and load quick.. like that site does. I've built stuff like that before using mostly motion-tweens and found that it was more unstable and definitely did not run as smooth as that website.

Would I be better off doing it all in actionscript? I could use some advice. Thanks!

Shape Tweens, Graphic Symbols, Motion Tweens
I am working on learning assignment for school and i want to make sure i did this right. i do not have a manual to look this up.
i am supposed to use shape tweens, Could someone tell me a definition and how to create them.
I also need a definition between a graphic and raw artwork?

i am making a small animation and I need to use shape tweens using raw artwork? i used the rectangle tool and the brush tool and made a scene on its own layer. i did not convert it to a graohic symbol. is that an example of a shape tween or am i totally off? and it plays behind the motion tween animation i created on various other layers.

anyone?

Shape & Motion Tweens With Motion Guide? Can It Be Done?
Hello everyone

I am currently trying to make a line shorten gradually as it moves.
In other words I want to combine a shape and motion tween, using a motion guide to direct it.

Could someone supply an explanation for how to do so??

Thanks

Using Motion & Shape Tweens With A Motion Guide?
I am currently trying to make a line shorten gradually as it moves. In other words I want to combine a shape and motion tween, using a motion guide to direct it.

Motion Tweens?
Hi.. I am creating a full website in flash.. I had it pretty nice but then something screwed up on it... so that when I pushed the button, it reloaded the current scene...

So, I was wondering if it had anything to do with my motion tweens.. because in my library you see like "tween1", "tween2" and so on... 1 for every tween i ever created during the movie...

IF i delete the tween's in the library it deletes the ones in the timeline/stage... So how can I get rid of these unwanted things if thats what's screwing me up??

Thanks in advance..

- Jblack144

Motion Tweens.......
anyone know a good tutorial for creating dynamic motion tweens like the ones you can see on the estudio site????
www.estudio.com

Motion Tweens
in Flash MX, i creat a motion tween, i want it to stop, how do i get it to end?

Motion Tweens
What exactly do motion tweens do?
I don't like using 'help' because you get toooooooooooooo many results and they may as well be in a foreign language...

Mental Man

P.S. estudioworks, if you read this will you please answer that question on that thread last night...

Motion Tweens
in the glinting text tutorial in ,flash mx, when i motion tween my mask layer it does not move until it gets to frame 399 of 400 then jumps rightwithout tweening at all--HELP

Motion Tweens
Hi guys, I am trying to create a motion tween so when a button is clicked an extension comes out and something is displayed.

So for example I have an image (which will stay the same) and then when a button is clicked a box extends from the side of the image and displays something.

Now i can make the motion tween work on its own...but when I want to do it with the image in the same frame, it doesnt quite go to plan, any ideas whats going on or any tutorials that might explain this.

The button will be at the bottom of the image in a seperate box

Hope that gives u an idea

Thanks Lopster

Motion Tweens ...
Just stumbled across a thread that explains scripted motion (view it here). Left me quite perplex.

In general, is it actually unprofessional to use motion tweens instead of actionscript? How does scripted motion work anyway?
Let's say I've got a square, 100 x 100 pixels at position x = 0, y = 0. What does it take to make it move to let's say x = 20, y = 20 in a second? (Would you even work with seconds?)
Thanks,
aut.

Help With Motion Tweens
Okay, so I must completely be missing something with motions tweens. I'm completely new to the Flash interface as I've just come off of a different program that did Flash completely differently. Anyway, I'll give you an example of what I'm having trouble with:

I have a text item, and I would like to have a nice little blur animation on it. So, I thought I would just create a text item, set the blur to say 20px at the 0 keyframe, then jump ahead to the frame 20, create a keyframe, and set the blur to 0, then create a motion tween in between them. Well, I tried that and it doesn't work. It has a blur for the first 19 frames, then suddenly at frame 20 its perfectly clear.

What am I missing??? Maybe just give me step by step of how to create this...

Thanks!

Motion Tweens
Can anyone tell me how to make it so that in my Library, all of the motion tweens that I make don not show up in this list. It is very distracting to have hundreds of tweens listed in there.

Motion Tweens - Other Objects?
I want an object to "run over" another one (like a car running over someone), but using motion tweens, i can't add another object, can't even color in the backround (just all black).

Smooth Motion Tweens
how do you make motion tweens that start up slowly then get faster and before they stop they slow down again til they finally stop.

know what i mean?


thanks!

Jumpy Motion Tweens?
G'Day all,
I've built a component that takes a text parameter that gets put into a text box. The text box is wrapped in a MC and that movie clip is tweened so that it pulses (slowely from big to small), only my pulses are very jumpy. Having never really tweened before what is going on, it's for a client and they will not like the jumps..

Any help would be appreciated!

Motion Tweens Don't Work
Alright. This is the problem. I inserted my movie clip onto the stage and when I try to preview it by pressing Alt-Enter, it doesn't work. When I double click on the movie clip and press enter to press, it works perfectly fine, but when I try to preview it or even export it, the motion tweens do not work. Does anyone know the problem?

Motion Tweens Coming Out Bad
For some reason, since I've had the new version of mx, the motion tweens have all come out horribal...

just really chocky and skippy like.. they just aren't smooth, regardless of what I do.. what can I do about this..?

Smooth Motion Tweens
How can you make your motion tweens smooth? They all seem to be jerky when previewing. All of the registration points are fine, but the tweens look more like a flip card movie than a smooth flowing tween. Any ideas would be a great help.

Unsmooth Motion Tweens
I'm sure i'm being stupid here, but
my motion tweens are always juddery.
the scene i am doing has a grouped selection of photos (low-res) simply sliding across the screen yet they're never smooth what ever the frame rate.
???

Motion Tweens Not Working
hi, in my movie i am using motion tweens. if i press enter on the keyboard in flash it plays my movie like i want it with all the tweens working but if i press ctrl + enter then it does not display any of my tweens. it does not display my tweens when i export movie aswell? can anyone help?
thanks, dandono

Need A Smooth Motion Tweens
I have a Simple effect on my text. Outlined Text on the mask layer, and a white box that moves across the outlined text on the sub mask layer. Everything works, the text seems to have a Shine across it but the Box that moves across it that is motion tweened, skips like 15 pixels in between each frame. Is there any way to smooth the motion tween?

Thanks alot!

Motion Tweens Not Working?
Hi. I've just started working on a new website, and am building from bottom up, meaning preloader first . I've created the actual preloader, but to make the animation smooth, I made some fade-out and other various effects on the bar, % loaded box, etc. These are mostly in motion tweens. I tested my movie, and the one tween that is a shape tween works, and the motion tweens do not. Then when I made those motion tweens shape tweens, and "broke" them, they showed in the movie, but not very smoothly. That's why I want to use motion tweens. When I switched the shape tweens back to motion tweens, and pressed Enter to test the timeline on the stage, instead of exporting, the motion tweens and shape tweens both showed and work perfectly, but then when I exported the movie, they didn't show!!! This is extremely frustrating !! If anyone has had this problem before, or knows a fix, please let me know!

Thanks,
Sportzguy933

Edit: I just made a new blank Flash file, made a simple square, grouped it, made a new keyframe at frame 10, motion tweened the frames, and tested it. It worked fine! So the problem must be specific to that file?!

Motion Tweens NOT Working
Let me start by saying I have just returned to Flash after an extended (6 year) hiatus from the program. The last time I used Flash was Flash 5.0. I've probably forgotten most everything I did know (which admittedly wasn't all that much), but the program is so different now, jumping from 5 to 9 would probably be stressful even if I were better with the tool. Now, anyway with that disclaimer out of the way I have (what should be a simple chore) driving me bonkers.

I created several lines of text and converted the text to symbols. I then created "funky" motion tweens for the text featuring alpha and tint changes, 360 rotations and flips, etc. etc. When I am in Flash and do a Control > Play, the movie displays EXACTLY as I had envisioned with all bells and whistles. The problem is after I export the movie to SWF and play it in Flash Player it's not the same movie that just played back moments before. The exported file only contains the motion tweens that involve no-resizing, spinning, or alpha changes. The symbols with those features merely only display the last frame of the animation. Furthermore the fonts and stylings I used are missing.

Please help.

2 Types Of Motion Tweens ?
I have noticed a difference between motion tweens created by the context menu ( ie right clicking on a PC and selection Create Motion Tween) and creating two seperate frames and then selecting motion tween from the Properties bar.

These are represented on the time line ... both in blue .... bowever if you use the context menu you end up with a black dot for each of the 2 keyframes however the second keyframe doesnt have a black vertical line to the left of it.

What is the differnece here ? Has it got to do with the sync option ?

For a visual reference check out ...

http://www.silverstone.co.za/temp/timeline.gif







Attach Code

<br><br> <img src="http://www.silverstone.co.za/temp/timeline.gif">

Choppy Motion Tweens
I'm trying to move a small block of text over and down just a little bit very slowly and am getting a very choppy tween. Has anyone come across this before? I tried positioning with my cursor as well as making a path for the tween.

Breaking Motion Tweens
Sometimes when I'm editing a scene, if I erase something or change something then a motion tween for another item will be affected. For instance, a walk cycle will break up.

What causes this and how do you fix it?

Odd Problem With Motion Tweens
Hey everyone. I'm having this odd problem with Flash MX that I've never had before with motion tweens involving fading symbols.

For example, I have a symbol which reads "hi". On frame one, the alpha is set to 0 and on frame 30 the alpha is set to 100. I then added a motion tween. When I preview the movie, the text fades in and fades out. But when I test the movie, nothing happens. If I export the movie as a .swf file, nothing happens there either.

I've used this effect many times, but this is the first time I've never had it work properly. Any ideas as to why my motion tweens don't work?

Thanks!
Nicole

Rotating Motion Tweens
Hello.

I'm sure that this is a very simple question that would no doubt be quite shameful to ask in a site for skilled Flash designers. However, I'm on my way, and I really can't find a friendlier place to ask this.

Okay, so I'm trying to make a continuous 20-frame loop of rotating objects. I rotated my object 180 at frame 10, and back to its original position at frame 20. However, Flash has this very annoying trait of spinning my object backwards to its original position, in this case during frames 10-20, instead of giving me a smooth rotating movie clip. What should I do to resolve this?

Thanks in advance.

Actionscripted Motion Tweens
im currently working on my own version of bejewelled for those of you who know the game.

i have a 6x6 grid of 50x50px colored blocks.

i have a function which simply, takes two blockes, switches their positions, then switched them back. it works fine as long as i dont attempt to switch the same two blocks a second time, if i do the aimation breaks up, skips or just dosent happen at all. Any ideas?


Code:
/* ********************************************
* Swap Adjacent Block
* - From (x, y)
* - To (x, y)
* ******************************************** */
function playTweenBack(x1:Number, y1:Number, x2:Number, y2:Number):Void{

var block1:String = "B" + String(x1) + String(y1);
var block2:String = "B" + String(x2) + String(y2);
var ox1:Number = this[block1]._x;
var ox2:Number = this[block2]._x;
var oy1:Number = this[block1]._y;
var oy2:Number = this[block2]._y;
if(x1 == x2){
var blockTween1:Tween = new Tween(_root[block1], "_y", None.easeNone, oy1, oy2, .5, true);
var blockTween2:Tween = new Tween(_root[block2], "_y", None.easeNone, oy2, oy1, .5, true);
blockTween1.onMotionFinished = function() { blockTween1.continueTo(oy1, .5); }
blockTween2.onMotionFinished = function() { blockTween2.continueTo(oy2, .5); }
}else if(y1 == y2){
var blockTween1:Tween = new Tween(_root[block1], "_x", None.easeNone, ox1, ox2, .5, true);
var blockTween2:Tween = new Tween(_root[block2], "_x", None.easeNone, ox2, ox1, .5, true);
blockTween1.onMotionFinished = function() { blockTween1.continueTo(ox1, .5); }
blockTween2.onMotionFinished = function() { blockTween2.continueTo(ox2, .5); }
}
}
each block is a move clip which is an instance of a "Block" class which have onRollOver, onRollOut and onPress behaviours.

Motion Tweens Not Working (?)
i'm making a load of little movieclips that i'm then placing onto the main stage. one of these movieclips has some fading text with a motion tween and negaive alpha, and there are some rotating and size transformations here and there... anyway: if i manually drag the timeline, i can see these efects taking place, but if i test the movieclip i only see the first tween (a text transformation - from little to big) and nothing else.. ?
also, when i place the movie in the main timeline, i only see the same - none of the other effects (the negative alpha and the flips) ??

i did a 'save as' to 'flush' any crap out, but same results occur.

is there a limit of little movie clips you can have on teh time line? or is this something more sinister?

Odd Problem With Motion Tweens
Hey everyone. I'm having this odd problem with Flash MX that I've never had before with motion tweens involving fading symbols.

For example, I have a symbol which reads "hi". On frame one, the alpha is set to 0 and on frame 30 the alpha is set to 100. I then added a motion tween. When I preview the movie, the text fades in and fades out. But when I test the movie, nothing happens. If I export the movie as a .swf file, nothing happens there either.

I've used this effect many times, but this is the first time I've never had it work properly. Any ideas as to why my motion tweens don't work?

Thanks!
Nicole

Creating Motion Tweens
I just started doing flash and I tried a tutorial on an interactive button. I created a button that upon mouse event a text motion tween would occur. The problem is that the motion tween affected the button as well. Do I need to place every object that has a motion tween on a seperate layer from the other objects or is there a way to isolate the object in the same layer?

Really Easy Quistion On Motion Tweens
Ok, i know i'm stupid for asking this and it's really easy for most people but i was wondering about motion tweens. See i inserted a motion tween and it moves my hole box, not the text that i have selected.. Does anyone know what i did wrong, or how to move the text only, and not the box.

Thanks!!

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.

Motion Tweens - Smoth With A Jerk At The End
This problem has been killing me, I have wasted much time trying to figure this out and searched the help files of Flash so i have come here in hopes of help.

Sometimes when I make a motion tween it works like its supposed to, sometimes it does part of the motion in all the frames except the last, and in the last it makes a very sudden movement.

After awhile i noticed that the GOOD tweens have a line inbetween the arrow and keyframe, while the bad ones don't. I've attached a picture showing the difference. The good one is on the top and the bad on the bottom. Now im not sure why i end up with the good one sometimes and the bad one at other times, i can only assume it has something to do with the grouping. Please if anyone knows the difference between these two types of tweens and how to make ALL my tweens look like the first in the picture, your help is greatly appreciated.

Motion Tweens/movie Clips
Hey all, basically i have a central box which is the main part of the site and a menu down the left hand side. When a link is clicked a rectangle extends across the length of the main box and displays the content of the link. Now when i click on another link I want the rectange which was shown before (with the content) to minimise back in and the new rectangle (obviously with different content) to extend out and take its place.

I can make the tweens so the rectangle extends out and shows the content but the rest is beyond me. Any ideas of how i can achieve this or any other possible ways to show each link.

Many thanks

Lopster10

Motion Tweens With Multiple Images
I am making something where blades of grass on the ground, all in 1 layer, move and form 4 different images by combining. Can I do this by having all the blades of grass in 1 layer, or does each blade need to be on its own layer? When I tried doing it all on 1 layer, only 1 piece moved and all the rest disappeared. Is it possible to do it all on 1 layer?

I have Flash 8 Professional if it helps.

Alpha Motion Tweens For Text
When you hit Enter on the Timeline, the text fades in like it's supposed to (when you are in edits for the MCs), but when you Ctrl+Enter, they skip to the end.

The text is static. What am I doing wrong?

Text Fades & Motion Tweens
I am trying to create a text fade-in/fade-out in Flash. In other words, it starts with nothing displayed, then the text slowly fades in until it reaches a certain peak, at which point it displays the text in full. After that, the text slowly fades back to nothing. I followed the steps below, but currently am experiencing an issue where there is a sudden jump in luminesence/brightness right before and at the peak. Instead of blending slowly to 100%, it seems like it skips a stage and goes from, say, 90% to 100% brightness in a second. It's a bit jarring, and I would like to smooth the transition so there is no sudden burst of brightness. Can somebody tell me what I'm doing wrong from the below?

- Type in text in given color
- Convert element to symbol -> graphic
- Change color to “Alpha” and set slider to 0 (Starts at nothing)
- Insert keyframe at 225
- Select graphic in frame 225, change slider to 100 (Full view)
- Insert keyframe at 450
- Select graphic in frame 450, change slider to 0 (Faded Out)
- Highlight frames 225-450, select Create Motion Tween
- Highlight frames 1-224, select Create Motion Tween
- Set frame rate of document to 15

Problem With Text And Motion Tweens
Please help me out on this one if you know what is going on. I am confused and at a total loss here. I have positioning statements moving across the screen in motion tweens, and I have two problems:

1-The text is cut off at the end of each word. This is happening at the last few letters. I have tried resizing text, moving text, deleting movie clip and recreating, but with no luck. I am not a flash novice, and I am using Flash 8. I have never had this problem before. Had I not started a new movie and done this again from square 1 no less than three time, I would've said it was probably something I was doing, but it has got to be some issue with Flash.

2-This text is also appearing a bit pixelated. I am using "impact" font on one word, and it is terribly pixelated!

What is going on here and how can I fix it? I am ready to pull my hair out and scream.

Thanks so much for the help

Sincerely-
Charles Carter

Shape Tweening Vs. Motion Tweens
I was doing a little flash animation when a question came to me. All I was doing was scaling a graphic, which I could do 2 ways. I could make the graphic embedded in a movie clip, scale the movie clip up (it's vector so that's no prob) and use a motion tween, or I could simply use a shape tween of the vector shape scaling. Most of my animations are created with web use in mind, so I always try to make sure everything is optimized for performance and my question is which of these 2 methods is more processor intensive? Is there a difference?

Motion Tweens In Animations For Handsets
I have an animation that's headed for mobile handsets and Flash Lite. In it are motion tweens. I've been advised that a tween will slow down the playback on a handset. Is the solution to convert each of the tweens to individual frames?

Thanks

Blur Filter And Motion Tweens
I am creating an animation in which about 5 movie clips that have blur filters move across the screen. One movie clip starts with a gradient blur filter, and moves up the screen while the blur disappears. This movie clip seems to slow down everything completely.

Is there any way to speed this up a bit?

Motion Tweens Missing From Exported SWF
Let me start by saying I have just returned to Flash after an extended (6 year) hiatus from the program. The last time I used Flash was Flash 5.0. I've probably forgotten most everything I did know (which admittedly wasn't all that much), but the program is so different now, jumping from 5 to 9 would probably be stressful even if I were better with the tool. Now, anyway with that disclaimer out of the way I have (what should be a simple chore) driving me bonkers.

I created several lines of text and converted the text to symbols. I then created "funky" motion tweens for the text featuring alpha and tint changes, 360 rotations and flips, etc. etc. When I am in Flash and do a Control > Play, the movie displays EXACTLY as I had envisioned with all bells and whistles. The problem is after I export the movie to SWF and play it in Flash Player it's not the same movie that just played back moments before. The exported file only contains the motion tweens that involve no-resizing, spinning, or alpha changes. The symbols with those features merely only display the last frame of the animation. Furthermore the fonts and stylings I used are missing.

Please help.

Motion Tweens And Movie Clips
A couple of basic questions.

1. What is a 'movie' symbol? whats the difference between this and a graphic.

2. Say i had a car moving across the screen with a motion guide, and i wanted some oval wheels to follow the car - so they stay in the same place in comparison with the car (and a CW motion tween so they turn) how would i go about this?

thanx,
slug

Copyright 2005-08 www.BigResource.com, All rights reserved