ActionScript 2.0 :: Tween Setup - Symbol Jump To Center Of Stage?
Sep 30, 2008
I have a tween set up in actionscript... something like this
Code:
function tween(){
var tweenPart1:Tween = new Tween(_root.tweenMe), "_x", Strong.easeOut, 100, 50, 3, true);
}
That isn't the problem... it actually works very well.
But I also have another peice of script.
Code:
_root.tweenMe.onEnterFrame = function (){
this.onRollOver = function(){
this._x = 50
}}
This just counter-acts the tween to make the symbol jump to the centre of the stage and then stop. but that is the problem... the symbol wont stop. it jumps to 50 for about 0.1 sec then continues with the tween.
PS tweenPart1.stop(); doesn't work for some reason
View 4 Replies
Similar Posts:
Jul 21, 2011
Basically what I have is a 31 frame, frame-by-frame animation that plays(no stop() command at all currently) in a continuous loop on one "page" of a flash presentation. What I need to be able to do is set it up in actionscript 2.0 so that when a viewer has his mouse over the movie symbol and then clicks and drags to the right, the movie plays forward, click and drag to the left and it plays in reverse, and on release stops on the frame it is currently on.
I need it set up so that if someone is dragging it to the right and reverses direction, the frames are played in reverse from that point (frame) and vice versa and releasing the mouse button stops the movie on that frame: e.g. if the viewer is dragging right up to frame 20 then starts dragging to the left the animation will play backwards from frame 20 to frame 1 so long as the mouse button is held down) I can't use playback buttons, I have to set this up this way for a specific reason for a work project. I'm not even sure if I explained it correctly If I can set this up on the frame the symbol is nested in, fine. If it has to be done within the symbols' animation, fine. Doesn't matter really, the end result is what counts.
View 3 Replies
Jan 23, 2009
I'm just trying to figure out to get my MC to resize from the center instead of the top left? Can I change the registration point or something in AS?
View 1 Replies
Jun 9, 2009
I have problem to center my movie clip by tween class, check my file. I need the object to center and it goes to left..
Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
[Code]...
View 3 Replies
Jan 31, 2010
I am trying to have flash draw a line from the center of the stage out and increment around the stage. Not sure what math I would use to do this though. So far I have the line going out to a certain point but not sure how to change that point so that it circles around whatever the dimensions of my stage would be.
So far I have this:
var linetox=0;
var linetoy=0;
var _stage=this;[code]...
which obviously moves the destination ending of the line lower and lower, just trying to get it to draw around the screen (like a clock)
View 1 Replies
Jun 28, 2008
I have a mc, "Transition", on my main stage. It does an animation. At the end of the animation I would like it to gotoAndPlay("music"). The problem is that "music" is on on my main stage. Is there any way possible to jump from a frame of a movie clip to a specific frame on the main stage?
View 4 Replies
Jul 27, 2009
I created an illustration in Illustrator, imported it into Flash, and converted it to a movie clip symbol. I added a keyframe at frame 20 and stretched its shape a bit. Then I created a classic tween from keyframe 1 to keyframe 2, and the resulting animation doesn't animate at all; it sits there from frames 1 to 19, and then jumps to the new position at frame 20.
View 3 Replies
Nov 11, 2009
I'm trying to develop a simple SWF that will loop on a monitor at a convention booth. When someone moves the mouse, I need it to jump to a different stage, which contains interactive content.
View 3 Replies
Aug 15, 2010
The .swf I am having trouble with is embedded on the front of my home page [URL]. I am trying to make it so when the back button is pressed it causes the four buttons to move 200px left and when the forward button is hit right 200px. Here is the code for the back button, forward is identical minus the - sign...
back.buttonMode = true;// creates the hand cursor
back.addEventListener("click", onClick3);
function onClick3 (obj:Object){
back.buttonMode = false;// creates the hand cursor
Tweener.addTween (homebutton, {alpha:1, time:3, x:x-=200});
Tweener.addTween (button2, {alpha:1, time:3, x:x-=200});
Tweener.addTween (button3, {alpha:1, time:3, x:x-=200});
Tweener.addTween (button4, {alpha:1, time:3, x:x-=200});
}
View 9 Replies
Dec 9, 2010
Is there a way to use the scaleX and scaleY property in conjunction with the Tween class to scale from the center?ActionScript Code:[code]above unfortunately only scales from top left. This is not a class I can go in and move all the content by hand (so that the registration point is in middle) as it's all dynamic. I've looked al over but none seem to make use of the Tween class.
View 8 Replies
Mar 31, 2010
This is my first attempt at external as classes and I can't get them right. I've a button set up on the stage and an external as file with the following code:
Code:
package {
import flash.display.*;
import flash.events.MouseEvent.*;
import flash.display.SimpleButton.*;
public class myTasteButton extends SimpleButton {
[Code] .....
Basically I need to link an external class to the button, which will in turn when clicked play the beat_mc. I've given the button the class of myTasteButton. It's not working but I'm not getting any errors.
View 4 Replies
Jul 14, 2005
I use a .png sequence for a sprite (primarily because it has the alpha channel) I will use in flash... its a walking animation of several frames. I make an empty symbol, load the frames into it. I put the symbol in the canvas. It animates fine and the alpha channel is working. Now I try to make a motion tween of the symbol instance, so as to simulate the walking movement, from one point to another. I playback [ENTER] its working fine, just as I want it.
Now if I do the [ctrl+ENTER] preview or export, the motion tween is working, the sprite is moving from point a to point b BUT the walk animation is NOT WORKING. Its just showing the first frame in the image sequence! Am I missing out something to make the image sequence animation work like it should? I tried to do the exact same thing to a movie clip (MOV) it works... but with the png image sequence I am really puzzled.
View 3 Replies
Nov 29, 2009
I'm making a very simple animated flight plan with 3 airfields and six airplanes as seen from the top. To imitate the effect of take off and landing I want to be able to change the size of the plane when it flies.Only trouble is I can do that only with the Free Transform Tool. Even if I select Modify -> Transform -> Scale I have to change the shape of each object manually and they end up having different sizes. I tried editing the size in the properties box but the fields are greyed out. Any idea how I can change that.
View 2 Replies
Dec 10, 2010
I want to drag symbol that has a tween. As soon as I drag, tween gets messed up, since flash thinks I want to manually adjust tween. No, I just changed size of stage and want to tween start and end same way but in different position. You could drag by tween line, but this particular tween just changes opacity so no luck. Is there some shift-control-something key sequence to drag symbol with tween intact?
View 1 Replies
Dec 1, 2010
I am a flash user who used old version in the past and purchased new flash CS4 professional come with Adobe design premium recently. Now my problem is when I tween two symbol I cannot see any tweening between. I have created keyframe1 and insert my graphic, then converted to symbol. Then I click on F6 at timeline 50 and create motion at middle. But I only can see the effect at keyframe 1 and key frame 50. I cannot see any slowly tweening effects at all. Do I did something wrong?
View 2 Replies
Feb 22, 2011
I have started the vhost setup. I have cpanel on the server and I added the domain and it resolves to
the hosting account just fine pull up www.domain.com and goes to server.
I added the www.domain.com vhost. I pointed the application dir to /home/domain/public_html/applications/
I copied live over to applications dir. I setup user and pass for the virtual host login.
View 3 Replies
Feb 7, 2009
I'm just a graphic designer and basically new to flash. But i got this project where background images would loop in full browser resolution. Well i managed to work on the looping images, but i'm having trouble on how i will add objects that will tween from side to center in same full browser resolution.[code]...
View 1 Replies
Jun 15, 2010
I am brand new to scripting in Flash, and was hoping I could get some help on a question. I have an animation that is 300 frames long. The first 100 frames are an animated 'ad' (for lack of a better term), the second 100 frames are a different ad, and the third 100 frames are the last ad. This can be viewed straight from beginning to end (and is intended to loop if no action is taken), but I would also like to add some functionality to the animation, so that people can jump forward to the next ad, or back to the previous ad (hitting back from the first ad would take them to the third ad, and vice versa.)
[Code]...
This does not turn up any errors when I test the movie, but the functionality does not work. Am I anywhere near a working script, or am I attempting this in a completely wrong way?
View 3 Replies
Apr 20, 2009
I'm having trouble centering the stage on screen, its locked to the top left of my window and nothing will make it move. I remember accidentally pressing something on the keyboard just before this happened, but don't know how to get my stage center again. The hand tool does nothing.
Oh and its only happened in this fla, other fla's are fine.
View 3 Replies
Jul 11, 2010
I need to center a MovieClip, and i know how to do this, but the problem is this MC has content in it of different sizes on each frame. So when it goes to say, frame 2, the MC is no longer in the center. This is what i use:
ActionScript Code:
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, resizeHandler);
[code]...
How can that be changed to center this MC when the size of it changes? I would guess the code would need to know when the MC's size has been changed and re-align...
View 0 Replies
Feb 9, 2009
I have a MC on stage that I dynamically add and remove elements to and from. Since its dimensions vary subject to those changes I's like to "pin-point" it to the center of my (800x600) stage. I thought it would be agood idea to get the dimensions of the MC (it's called container) and set its x and y accordingly, but somehow it won't work as I got the feeling the registration is somewhere else (and I don't get the logic behind where it is).
The code I am using at the moment is the following
Code:
var dimensions:Rectangle = container.getBounds(stage);
container.x = 400 - dimensions.width/2;
container.y = 300 - dimensions.height/2;
View 3 Replies
Apr 20, 2009
I'm having trouble centering the stage on screen, its locked to the top left of my window and nothing will make it move. I remember accidentally pressing something on the keyboard just before this happened, but don't know how to get my stage center again. The hand tool does nothing. Oh and its only happened in this fla, other fla's are fine. See attached image for screenshot
View 1 Replies
Jun 2, 2007
I have a big movieClip which the user can zoom by click on a 'zoom-in' button. Once zoomed the user can click on that movieclip and pan it. Now the center of that movieClip is displaced and no longer where it was before. However, if the user click on 'zoom-in' now again, the movieClip should zoom from the center of the stage and not from the movieClip's center.
To put it simply, I want a formula which will zoom a movieClip from the center of the stage and not from its registration point, no matter where the registration point is.
View 3 Replies
Oct 4, 2009
I've ceated 18 buttons 1-18 on two rows and using the alignment tool made then all gapped the same and in line etc.
I now want to center the two rows of buttons on the stage.
I've shift clicked to select all the buttons but no matter what option I pick in window alignment I can't get it to work.
View 1 Replies
Feb 8, 2010
This is the code I'm using which loads in external swf's in 2 loaders, replacing each other. I just to center the main clip(tl) in the main swf, and can't figure it out![code]...
View 13 Replies
Jul 2, 2011
I needed to make my document size larger. Is there an easy way to center all the content in the new size? Right now everything is flushed to the top left corner.
View 3 Replies
Sep 8, 2010
How can i center the Movieclip x and y postion onto the stage. [code]...
View 1 Replies
Feb 22, 2009
I have this movieclip which i would like to set an rotationY in 3d space. I want the rotationY angel to have a value so that the right side of my movieClip faces the center of the stage. Like an arrow in a dartboard. I thought this was easy to accomplish using simple trigonometry like this: (before the testMC is rotated in Y space, it has a widh of 1000) testMC.rotationY = -(Math.acos((stage.stageWidth/2)/(1000))*(180/Math.PI));
View 1 Replies
Apr 15, 2005
I am curious abut two things... 1. Instead of a Bar at the bottom I wanna use a MC that will rotate in the center of the stage... With one half acting as a paddle, and the other side being a game over or life over side...
2. Also with the MC in the middle i want to use the arrays to make a pattern or whatnot *grid* around the middle move clip, so there is only one way to die and that is from the ball MC hittin ghte backside of the middle mc?
View 1 Replies
Aug 31, 2010
Is there a way on a drag zoom image viewer to have the draggable mc scale from the center of the stage rather than from its registration point?
View 1 Replies