ActionScript 2.0 :: Stop Scroll Buttons While Tween Is In Motion
Nov 13, 2008
I'm scrolling a masked MC, which is basically a grid of thumbnails with a few rows. Right now, it works beautifully by scrolling row-to-row if the up/down buttons are pressed only after the tween has finished. However, if I press the up or down buttons in succession before it finishes scrolling, the positions get all messed up because it will start the motion tween from the current y position, which is halfway through a scroll.
Code:
new Tween(holder,"_y",mx.transitions.easing.Strong.easeOut,holder._y, holder._y+scrollAmt,1.5,true);
That is basically the only code in my onRelease function.
I've thought about 2 ways of tackling this problem:
1: to disable the up/down buttons while the tween is taking place.
2: to NOT have the tween start from the current y position since that is the root of the problem. But I think this is impossible due to the nature of the purpose of the function.
View 1 Replies
Similar Posts:
Sep 20, 2011
I'm making a "master movie" for an assignment and I'm stuck right now. What I've got is an Intro page that will serve at the Parent.swf to load 4 other child swf's upon a mouse click. The problem is I have a theater stage where I tweened an animation to make it appear the curtain on the stage is going up but once it reaches it maximum height....the tween abruptly stops. I want it to HOLD there until a user clicks a button.
How would I make this happen? Here is the page in question: [URL]...
View 3 Replies
Dec 4, 2003
Let's say I've got button 1, 2 and 3 as the main menu and button a, b and c as the submenu. The idea is: If I press on button1, buttons 2 and 3 moves to the right by 200 pixels. At the same time, the buttons a, b and c will appear between button 1 and 2.
Now, I got this working with Motion Tween, but that's not the way how I want to do it. I think it should be possible with AS too, right? I've tried with SetProperty and _x, but then it doesn't scroll to the new location.
View 7 Replies
Aug 24, 2010
I created a motion tween. I stried to put an action script, stop();, at the end of the tween but it says "Current selection cannot have actions applied to it.". How do I stop the tween then?
View 15 Replies
Jul 29, 2010
I've started using Motion Tweening in CS4 and I am puzzled by something with how the durations are set. The best way I can describe this is by comparing it to what are now called Classic Tweens. In a Classic Tween, I set the beginning and end keyframes of a particular animation, and when the playhead reaches the ending keyframe, the animation stops. In a CS4+ Motion Tween, I set the first keyframe and then make changes using the motion editor, but when I add frames to the timeline, the tween keeps on growing, and the animation doesn't stop correctly. Is there some trick to telling the Motion Tween that it should only be X amount of frames?
View 1 Replies
Jul 1, 2009
I'm having trouble using a scrollRect on an object instance on the timeline that has a motion tween. As soon as I apply the scrollRect to it, the object just stops! I've attached a simple fla that shows what I'm talking about.
Simply comment out this line in the first frame's actions to see the oval move across:
Code:
oval1.scrollRect = window;
The actual application I'm making is using a scrollRect on a custom list control, where each item in the list is a symbol in the library. It works great, except if I try to move my list around using a motion tween (the list still works, but the list doesn't move in the motion tween). As soon as I remove the code to apply the scrollRect, it works but the list fills the screen!
View 1 Replies
Mar 25, 2011
I'm a young girl who recently discovered flash cs3 (I started yesterday) I found this tutorial about how to make a flying bird. I did as the tutorial said, I just made a butterfly instead of a bird. Now I made a flower and I want the butterfly to land on the flower. The tutorial only showed me how to make the bird/butterfly fly through the scene and not how to stop it while I still see it in the scene. I figured out how to stop the motion tween but then the butterfly dissappeared from the flash file after it stopped and I also figured out how to make it land on the flower but it keeps moving its wings Now I need help to make it stop moving the wings while it's still visible. I hope my explanation is understandable. As I said I just started with this program so I don't know how to explain all the different things.
I tried to upload the file on imageshack but it seems like it doesn't support this kind of file, or I'm saving it wrong. I could need some help with that too so I can show others what I'm making without that they have to download the file so it's easier to get help when I'm stuck A link to the .swf file [URL]
[Code]...
View 3 Replies
Aug 28, 2011
Once I tried to change a movieclip's colorTransform like this:
in frame1 of the movieclip this.transform.colorTransform = new colorTransform(1,1,1,1,0,0,0,0);
then all motion tween or shape tween of this movieclip will stop at this frame. what can I do to prevent this?
View 1 Replies
Mar 1, 2011
I'm trying to create a simple game. Right now I have one button that when clicked moves the character across the screen. My issue is trying to make the player stop looping after I click the button. If I just insert stop for the last frame it will only loop once and stop, but it will not play again after the button is clicked. I've tried using players_turn boolean but couldn't get that to work.
[AS]package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
import flash.events.Event;
[Code] .....
View 5 Replies
Feb 6, 2009
Im tring to create a slot machine game...I have a mask.and I have 3 layers each of which has a motion tween of 120 frames.they animate my 3 slots..the problem is how and where I can assign a random number so that the motion tween should stop at any image.?
[Code]...
View 1 Replies
Sep 9, 2009
I'm simply trying to stop a motion tween created in an AS3 document from looping after its compiled. how would i achieve that?
View 5 Replies
Oct 27, 2009
I am making a webpage for class and i copied all the code from previous projects that i made that worked fine. I made a menu that once you go over the button it starts a 2 motion tweens that end with buttons appearing. i keep getting the message
TypeError: Error #1009: Cannot access a property or method of a null object reference.
The whole code is this
stop();
back.addEventListener(MouseEvent.MOUSE_OVER,back1);
function back1(event:MouseEvent):void {
gotoAndPlay("one");}
pump_link.addEventListener(MouseEvent.MOUSE_DOWN,pump_btn);
function pump_btn(event:MouseEvent):void {
MovieClip(parent).gotoAndPlay("pumpkin_frame", "pumpkin");}
View 1 Replies
Dec 24, 2009
how to make some scroll buttons. Not like a regular scrollbar button, but just two graphics that have a rollover function. I got the buttons to work except that I can't get it to stop. Here is the code I wrote:
[Code].....
Once I rollover, it keeps going forever unless I rollout, but it doesn't stop at 43 or -167. It only checks the boundaries at the start of a rollover, but I thought it would run the function every 10 milliseconds to see if I had passed the boundary.
View 3 Replies
Mar 8, 2010
If I perform a motion tween along a curved path, Flash CS4 does not allow to change the curves to "corner point" or "linear" in the motion editor. URL...
View 2 Replies
Nov 11, 2011
I will have three seperate pages for the motion tween, mask effect and shape tween... would you make the seperately, in a different scene, as a symbol or on the same scene with the website.
View 2 Replies
May 1, 2009
my movieclip button was working perfectly as a motion tween. Can you use shape tweens as movie clip buttons? I just made that change, and kept my code:
[Code]....
View 1 Replies
Jan 25, 2010
I am facing a problem in one of my animation with flash CS4 - I have nested a Shape Tween in a Motion tween to get more control over the easers and effects, unfortunately I am not able to view on the timeline of my Motion Tween the action of the Shape tween nested inside.
It only show the first shape of the Shape Tween during the entire Motion Tween and that is really a problem for me because I need to see the final frame result of that Shape tween to be able to position it in a precise way on my scene according to other instances.
[Code]..
View 1 Replies
Nov 2, 2010
Is there a way to convert a classic tween to a motion tween?
View 0 Replies
Aug 21, 2009
How do I add motion blur to a motion tween?
View 2 Replies
Feb 22, 2010
Put 2 identical tweens, 1 motion tween, the other classic tween.Are there any differences in the final weight (Kb) of the resulting .swf file?
View 1 Replies
Feb 24, 2011
I've gotten to chapter 5 in my AS 3.0 classroom book but I need to use wisdom today (CHAPTERS before I gain it for myself),I need to create a custom scroll bar with buttons that function just like the UIScrollBar but more visually suited to our projects. the boss demands it.
I found several tutorials on creating the custom scrollBar, however, they don't include the buttons and I'm unable to find a tutorial on how to create a button scroller (I figured I could link them both to my "info_txt" after creating them separately).
how to create an AS3 text scrollBar WITH buttons? how to create a nice scroll effect with buttons(if creating the scroll bar and buttons apart then linking them to the same text field is not possible or a faulty way to accomplish this).
View 1 Replies
May 23, 2003
I thought I would be able to find a tut somewhere for this, but amazingly no. Does anyone know how to make a mc scroller that uses up and down buttons (no bar), that starts scrolling onPress and stops on onRelease... but eases into place wherever you happen to stop?
View 2 Replies
Jun 23, 2010
whether it be text, symbol, a shape that I drew. None of it works. When I create the motion tween the line arrow in the timeline doesn't show up like it should. Here is the extremely simple animation i'm doing. The problem are for the bottom 9 layers starting from frame 80. I converted all of those to graphic symbols and I'm just trying to do a very simple alpha 0-100 while resizing the letters. I've also tested motion tween on very simple shapes and it never works. I just don't get it.
View 3 Replies
May 4, 2009
Does anyone can explain, why on the timeline in CS4 I can move only those motion tween which have the same long? Yet, It's without sense.
[Code]...
View 3 Replies
Jun 1, 2009
I'm building a drop down menu in flash CS4. I have followed the directions meticulously...3 times... and still I can't get a mask to accept a motion tween.
View 1 Replies
Jun 5, 2009
I am currently using CS4 but taking a class that is using CS3. The problem is I am finding the "motion tween" is not creating a tween. What is the difference between the motion tween in CS3 and CS4.I can get the tween to work if I use the "classic tween" but the instructor is saying I must use the motion tween.
View 4 Replies
Jun 8, 2009
Is it possible to make a motion tween (or something) where as the page would start blank and then writing would just start to be laid down..... affectively, scribbling onto the page?
View 3 Replies
Apr 15, 2012
I'm trying to get the name of a motiontween in AS3. I have many tweens that call a generic function on MOTION_FINISH.
mainContent3X = new Tween(MainContent3, "x", Strong.easeOut, MainContent3.x, 1750, 1, true);
I need to get the number/name to know what to do. I've tried the following with no luck:
trace(event.currentTarget.toString());
trace(event.currentTarget.name);
View 1 Replies
Nov 4, 2008
Has anybody found a way to ease motion only between keyframes, not the whole animation? In classic u get separate easings.Generally, I want to convert old tween to new for more control, but it seems to be impossible.
View 4 Replies
Feb 2, 2009
I created some text, converted into a movie clip and I have three keyframes - 1,5,15.at 1 the text is as it is, at 5 i flip it horizontally, using the transform tool [q key] and at 15 i flip it horizontally it again, so it's normal again And I've put motion tween between both the places. Now when I preview the swf, from 1 to 5 the text animates as it is supposed to clockwise but from 5 to 15 it rotates clockwise
So it covers 1/2 revolution and then traces the same half back to become normal again.What must I do in order to make it swivel in clockwise sense only ?
View 1 Replies