Motion tween using actionscript

I'm pretty sure there has to be a way to do this. I want an
object to move to certain coordinates when certain objects are
moused over. Any help?

Bryan,
> Thank you so muck...honestly. I hate to ask for more
help,
> but i need to ask ONE more thing.
's okay. :)
> I got the movement working but the thing i need now is
for
> the puck to stay under the button when i mouse off.
Well ... okay, I looked at your code. Honestly, bro, it's a
complete
hodge-podge of new and old style coding. I know it's because
you're on
unfamiliar territory, and I'm not slammin' ya ... but really
-- really,
really, really -- your life will be soooo much easier if you
step back and
look at the big picture. Sooner or later, this will all gel
for you, and it
suddenly becomes very easy.
Forget that tellTarget() business. That's old; like, Flash 3
old. In
fact, it was deprecated in Flash 5. If you want to path to an
object, you
use its instance name. Of course, first, that means you need
to give your
relevant assets instance names. You've already done with with
the revolving
"police" lights -- but make sure you're consistent. Name them
light1,
light2, light3, and so on (yours were a bit dissheveled).
An instance name is just a "handle" that lets ActionScript
"talk" to a
given object. That light exists as a single movie clip symbol
in your
Library, but you want to talk to each one individually, so
each one gets its
own instance name.
Do the same thing with your "net" instance (the tab/button
movie clips).
Rather than this ...
tellTarget(this._parent.light4) {
gotoandplay(this._currentframe+70);
... just refer to objects by instance name.
light1.gotoAndPlay();
Much cleaner code. Now, this isn't relevant in your case,
but if that
"light" symbol had another movie clip inside it, you could
give *that*
symbol an instance name, too. For example, you might name the
bulb "bulb".
If you needed to instruct that bulb movie clip, you could
react it inside
each instance of light like this ...
light1.bulb.gotoAndPlay();
light2.bulb.gotoAndPlay();
// etc.
It's just like folders and subfolders on your hard drive.
Next, you've GOT to make sure you use the correct case.
gotoandplay
doesn't exist in ActionScript, but gotoAndPlay does.
Thankfully, the
ActionScript 2.0 Language Reference is only a click away, and
besides,
script code changes color to indicate when you've spelled
something
correctly.
Next, while it's perfectly legal to use the on() event
handler, it's
also pretty old. It was deprecated as of Flash MX (aka Flash
6), so use the
approach I showed you in previous posts. Just use the clip's
instance name
and assign a function to its event.
You want those instances of "net" to respond to mouse
events. I gave
each movie clip an instance name ... mcHome, mcCalendar,
mcRecord, and so
on.
This allows you to neatly put all your code into frame 1 of
the main
timeline. No more hunting and pecking, having to click on
each movie clip
separately, etc.
mcHome.onRollOver = function() {
// instructions here
That also means you don't have to keep repeating the import
statements
for each button. It's just much cleaner and more efficient.
Give yourself
a Scripts layer dedicated to scripts only, and put all your
code there.
Just remove all the on() stuff.
Now here's the part that should make a halogen bulb go BOOM
in your
head. I'll repeat what you were asking:
> I got the movement working but the thing i need now is
for
> the puck to stay under the button when i mouse off.
Okay. That means you want the puck not to start from its
original
position every time. (In your Tween instantiation, you were
always starting
from 66.3 -- which of course means that's where the puck will
start from
every time.) So, how are you going to know where the puck is?
Well, the puck is a movie clip -- so look up the MovieClip
class. The
MovieClip class lists a bunch of properties, which refer to
characteristics
of the object at hand. In other words, the MovieClip class
TELLS YOU what
properties are available to any movie clip out there --
because classes
define objects, and this is a movie clip object.
So if you need to know where the puck is horizontally, look
up its
MovieClip._x property. Badda bing.
mcHome.onRollOver = function() {
new Tween(puck, "_x", Elastic.easeOut, puck._x, 58, .5,
true);
light1.gotoAndPlay(2);
That puts the current _x value of the puck instance as the
fourth
parameter of that Tween constructor. Make sense? Here's
working code for
your Flash banner ...
import mx.transitions.Tween;
import mx.transitions.easing.*;
mcHome.onRollOver = function() {
new Tween(puck, "_x", Elastic.easeOut, puck._x, 58, .5,
true);
light1.gotoAndPlay(2);
mcHome.onRollOut = function() {
light1.gotoAndPlay(this._currentframe + 70);
mcHome.onRelease = function() {
getURL("site.php?page=press&links=home");
mcCalendar.onRollOver = function() {
new Tween(puck, "_x", Elastic.easeOut, puck._x, 215, .5,
true);
light2.gotoAndPlay(2);
mcCalendar.onRollOut = function() {
light2.gotoAndPlay(this._currentframe + 70);
mcCalendar.onRelease = function() {
getURL("site.php?page=press&links=home");
mcRecord.onRollOver = function() {
new Tween(puck, "_x", Elastic.easeOut, puck._x, 373, .5,
true);
light3.gotoAndPlay(2);
mcRecord.onRollOut = function() {
light3.gotoAndPlay(this._currentframe + 70);
mcRecord.onRelease = function() {
getURL("site.php?page=press&links=home");
mcTitans.onRollOver = function() {
new Tween(puck, "_x", Elastic.easeOut, puck._x, 533, .5,
true);
light4.gotoAndPlay(2);
mcTitans.onRollOut = function() {
light4.gotoAndPlay(this._currentframe + 70);
mcTitans.onRelease = function() {
getURL("site.php?page=press&links=home");
mcPressBox.onRollOver = function() {
new Tween(puck, "_x", Elastic.easeOut, puck._x, 688, .5,
true);
light5.gotoAndPlay(2);
mcPressBox.onRollOut = function() {
light5.gotoAndPlay(this._currentframe + 70);
mcPressBox.onRelease = function() {
getURL("site.php?page=press&links=home");
... keeping in mind, of course, that each instance of the
"net" movie clip
needs the relevant instance name, and that each instance of
the "light"
movie clip should be named as shown from left to right. NO
CODE exists as
attached to any movie clips. It's all in frame 1 of a new
layer named,
arbitrarily, scripts. The correct case is in use --
Elastic.easeOut, rather
than elastic.easeOut (or easeIn, whatever you prefer). And
make sure to
correc the getURL() parameter as needed.
> I owe you big time!
If you really feel that way, I do have an Amazon Wish List.
;) Write
me off line, if you're so inclined. I'll reply with your FLA.
You're under
NO obligation to buy me anything. I mean that. If the spirit
moves you, I
won't complain -- but write me so I know where to send you
your FLA. I
think seeing it will help you out.
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design."

Similar Messages

  • How to adjust the path of a tween using actionscript

    I'm a novice at Actionscript3 and would greatly appreciate an answer to what seems like a simple question:
    Here's my project:
    http://home.comcast.net/~samiri/director/mortals/amadoFlashPortrait/index.htm
    Click on the gray scale frame images. A larger version of that image tweens out along the z axis. However it comes from 'somewhere else' not from 'within the frame.' How do I get the each larger gray scale frame image to look like it comes directly from the place where the user clicks (not to one side or the other)?
    So I guess what I'm asking is how to adjust the path of the tween along the x and y axis using the actionscript code (below).
    My method:
    I'm using this line of code in my script:
    var myTween:Tween = new Tween(mdImg, "z", Strong.easeOut, 300, 0, 1, true);
    "mdImg" is the variable that holds the name of the hotspot clicked upon by the user.
    I have the larger (faded edge) image positioned directly on top of the frame image and just kept invisible until the User clicks on the hotspot over the frame image.
    Thanks much.

    Thanks moccamaximum,
    By "do your tweens manually" you mean to use the timeline to do frame-based tweening? That is an option but I'm wondering (as a newbie): Isn't it better to use actionscript to do animation since you have more control and it's time based rather than frame-rate based (and works better on low performance machines)? Just curious if I should be spending the time to learn actionscript or do it in the traditional way.
    Thanks

  • [F8] How to move a MovieClip with Ease In/Out tween using Actionscript

    In Flash 8, I need to move a MovieClip from point A to point
    B when a user clicks a button.
    I currently have a function which I pass three arguments:
    TargetX, TargetY, and the Duration (in frames). I have it working
    to move the clip linearly, however, I would really like to be able
    to ease in/out on the tween.
    I'm really stuck on the math of it all and need someone to
    give me the formula.
    Here's my function:
    Code:
    // Function which is called when user clicks button to move
    the mc
    _global.fMoveTheMovieClip = function(iTargetX, iTargetY,
    iDuration){
    // Calculate the distance to the Target position
    iTotalDistance = iTargetX - MoveThisClip_mc._x;
    // Mover function
    MoveThisClip_mc.onEnterFrame = function(){
    // If the movie clip has gotten close enough to the target
    if((Map_mc._x > iTargetX && Map_mc._x <
    (iTargetX + 1)) || (Map_mc._x < iTargetX && Map_mc._x
    > (iTargetX - 1))){
    // Snap the movie clip to the target x
    MoveThisClip_mc._x = iTargetX
    // And stop this function
    delete this.onEnterFrame;
    // Else, if the mc has NOT reached the target zone
    }else{
    // Move the clip
    // This is where I would like a formula to ease out then in
    based on the duration
    // Right now I have this to move the mc at a constant speed
    MoveThisClip_mc._x += (iTotalDistance / iDuration);
    Also, everything needs to be AS2 compatible.
    AND, I can't use the "tween" or "transitions" classes.
    So, please don't post anything with code similar to this:
    Code:
    import mx.transitions.Tween
    import mx.transitions.easing.*;
    If I need to add a "power" or "strength" argument to my
    function, that's fine.
    Thanks!!!!

    I'm thinking what I want isnt possible...
    Here is what I get.
    Its perfect for landscape.
    But when I use the same settings on a portrait, I get this
    The entire canvas should be portrait.  If I flip it, then the watermark is under the image instead of on the right hand side going up like on the landscape one.
    The portrait one should end up looking like this
    I know this is being picky, but I'm taking over running photo and reviews for a media, and we have 4-5 photographers (myself including) covering shows.  So I'm looking for a one click to export and bam everything is fine type of thing. 
    So it's like the canvas would need to be portrait for portrait photos and landscape for landscape photos, and keep the name on the lower right regardless.  I'm thinking LR isnt that smart just yet to say "add 1 inch and put logo down here on all images" lol
    But I totally appreciate your input.

  • Motion tween using scripting

    I have this working, which moves a picture of a horizon
    starting at the left edge of my document and slowly moves off the
    scene to the left. Question is, How can I tile the same picture
    together where the left edge meets the right edge so it appears to
    be a seamless ongoing horizon made up of just the one picture?
    Any ideas?
    thx
    var endX = horizon._x + 70;
    var stepX = (endX - horizon._x) / 50;
    horizon.onEnterFrame = function ()
    if (this._x < endX) this._x -= stepX;

    Yes the picture is greater than the stage width and I
    understand aligning the picture so it is seamless, but how do I
    continually get it to loop to its original position so it always
    repeats itself. It is a backgrd to an interactive piece that I want
    to always keep in motion.
    I hope I making this clear

  • Simple tutor for motion tween in AS3

    i am searching one simple tutor for motion tween in AS3. Does any body know website ?

    Assuming you are creating your tweens using actionscript I would highly recommend using the external animation engine TweenLite, developed by greensock. You can download it and read a tutorial on it here: http://blog.greensock.com/get-started-tweening/
    If you are just creating tweens using the timeline then try this one: http://tv.adobe.com/watch/learn-flash-professional-cs4/getting-started-13-creating-motion- tweens/ I've not watched this one in a while but I seem to remember that the tutorials in this series were quite helpful to me.
    Hope they help you out!

  • Motion tweens from keyframe vs properties panel

    When motion tweening a grouped object in either Flash 8 or
    Flash CS3, I get different results depending on whether I use the
    keyframe or the properties panel to set the tween.
    If I right-click the first keyframe and select "Create Motion
    Tween," I get two graphic symbols named Tween 1 and Tween 2 in the
    library .
    If I select Motion from the Tween drop-down list in the
    Properties panel, I do not get those two graphic symbols in the
    library.
    Question #1: Which is the better way to create motion tweens
    -- using the keyframe or using the properties panel?
    Question #2: What other differences are there between
    creating a motion tween (or shape tween in CS3) between using the
    keyframe or using the properties panel?
    Ken Elder
    Oklahoma City

    1) either is fine, however you should not try to tween
    multiple object at the same time, put them in a moveclip and tween
    the clip, or on separate layer and tween them individually. This is
    why the symbol shows up in the Library, because it's not quite the
    right way to do it, and Flash needs to make some things to try a
    keep it straight. The best way to tween is to use the Tween class
    and script the tween.
    2) no difference, they both fire the same method. Like using
    key shortcuts vs. the menu.

  • Motion Tween (CS4)  - please help

    I'm a student trying to finish (what should be) a pretty
    simple assignment. I'm creating a 30 second banner. From frame 1 to
    frame 90 (3 seconds), I have an image (movie clip) sliding in and
    "bouncing" into place with a motion tween (used the motion editor
    to get the "bounce in" ease effect on the tween). So, currently,
    after frame 90 there are no more frames on that layer; my image
    disappears.
    Now I want the symbol instance to stay in place for the next
    x frames, while stuff on other layers slides in on "top" of it. But
    if I go out to frame x, select it, and hit F5, F6, or F7, it makes
    the symbol stay in place over those frames like I want, BUT it
    screws up my motion tween. I lose the "bounce in" ease, for some
    reason. How can I get my motion tween to work like I want from
    frame 1 to frame 90, and then have the symbol instance stay put for
    the next x frames after that?
    Thanks!
    Christophe

    My instructor said just to go to the frame in the layer, go
    to frame x and select it, then do insert>timeline>frames. But
    that still screwed up my tween. The object slides into place, but
    the "bounce in" ease is no longer visible.
    I found this workaround - which doesn't seem very efficient,
    but it worked. My motion tween ends at frame 90:
    1) select frame 91, hit F7 to insert a blank keyframe.
    2) go to and select frame 90, select the object on the stage,
    copy it.
    3) go to and select frame 91, paste in place.
    4) Now go out to frame X, select it, and hit F5. Object now
    sits in place from frame 91 to frame X, and "bounce in" ease of the
    motion tween from frame 1 to frame 90 isn't affected.

  • Shape Tweening via ActionScript?

    Hey all,
    I am trying to create a tweening using ActionScript between
    two vector graphic shapes.
    The application is very simple: I have frames with different
    shapes (frame 1: circle; frame 2: square; frame 3: triangle and so
    on). I have an edit box in which the user can select two frames. I
    want to automatically create a tweening between those shapes and
    display it to the user.
    From what I saw, the Tween Class can affect only size,
    location, alpha, etc. There is no option to define two objects (or
    for that matter two frames) and let the Action Script interpolate
    between them... is that so? Does anyone have creative suggestions
    for solving this problem?

    yes, it's true that you cannot shape tween using actionscript
    alone. you could use a combination of actionscript and timeline
    tweening and that would probably be the easiest for the situation
    you're describing.
    you could utilize the drawing methods and sequentially draw
    the shapes that you want but that would be more involved that
    combining actionscript of timeline tweening.

  • Using Timewarp on motion tweened effects...

    I'm using Timewarp to adjust the speed of a layer that contains motion tweened effects (ie. particles). For some reason Timewarp is treating the layer as regular 29.97 fps footage and using it's vector blending to interpolate the footage (creating undesirable distortions).
    In the end, I plan on Timewarping a single pre-comped layer that contains many different effect layers (Particular, Optical Flares, Element, etc.)
    Is there a way to get Timewarp to just re-calculate and re-tween the motion instead of doing it's usual vector blending thing?
    -Pete

    Hey, thanks for the great suggestion. I never really used Time Remapping before so I tested it and it works great! It actually re-calculates tweened motion and does a decent job on regular footage that has pixel motion frame blending enabled.
    I guess since Timewarp is just a filter, it's limited.
    Thanks agan.
    -Pete

  • Using Motion Tween to create a moving timeline

    I'm just learning the software and haven't been able to figure this out.  I'm trying to create an historic timeline for our company and am using 20 jpg images, which I placed on separate layers and then converted each jpg to a symbol and motion tweened to go across the screen.  The problem is that there is a gap between the frames when they play as a movie and I don't know how to get rid of that so that they flow continuously across the screen from left to right seamlessly.  Can anyone provide me with some instruction on this?

    this may be time-consuming but should be easy.  start at the left-most keyframe that has an image.  i would think there's only one keyframe there that has an image so nothing needs to be done there.  go to the next keyframe.  there will be an image there and the previous image should still be on-stage (or you need to move that 2nd keyframe).  move that 2nd image so it abuts the first. go to the next keyframe etc.
    all your tweens should be the same number of frames, use the same easing and move the images the same number of pixels.

  • How do i start a motion tween by clicking a button and stop it at the end of the tween.

    Hi guys,
    I am creating a website for a project and i am trying to activate a box bropping down from another box when i click on the enter here button i have created. I have set the motion tween and its working when i preview i just unsure of the correct actionscript to start this tween when i have clicked the entere here button or how to stop it at the end of the tween.
    I am scared i may have made the layers in the wrong place, they are all currently in scene 1. does my second box that is dropping down need to be set inside the layers of the first box?
    Bit of a newbie at this.
    Thanks in advance!

    Create the dropping box movieclip as an animation by itself with a stop() coomand in the first frame and a stop() command in the last frame.  The click of the button should tell the movieclip to play(); at which point the animation should play and stop at the end.
    Another option would be to use an actionscript Tween to make the box drop.  Going that route the animation is what you code it to be and there is no need to have to stop it as it will end where you tell the Tween to end at.

  • Motion Tweens in AS3

    I'm trying to make a screen object(digitB1_mc) move in one of two different directions, depending upon the current cicumstances.
    I drew the Motion Tween _B1_12 and saved it as a preset for the first direction.
    I drew the Motion Tween _B1_21 and saved it as a preset for the second direction.
    Then I tried to find AS3 code to grab one of these two from the presets and apply it to digitB1_mc. Could not find a way to do it.
    Then I copied _B1_12 to Actionscript 3.0 code (ie. clipboard) and pasted it into an Actionscript 3.0 function B1_12 and got:
    function B1_12() {
    import fl.motion.AnimatorFactory;
    import fl.motion.MotionBase;
    import fl.motion.Motion;
    import flash.filters.*;
    import flash.geom.Point;
    var __motion_digitB1_mc:MotionBase;
    if(__motion_digitB1_mc == null) {
        __motion_digitB1_mc = new Motion();
        __motion_digitB1_mc.duration = 11;
        // Call overrideTargetTransform to prevent the scale, skew,
        // or rotation values from being made relative to the target
        // object's original transform.
        // __motion_digitB1_mc.overrideTargetTransform();
        // The following calls to addPropertyArray assign data values
        // for each tweened property. There is one value in the Array
        // for every frame in the tween, or fewer if the last value
        // remains the same for the rest of the frames.
        __motion_digitB1_mc.addPropertyArray("x", [0,7.4116,14.0277,19.6419,23.9742,26.6463,27.1809,25.0619,19.91,11.7411,1]);
        __motion_digitB1_mc.addPropertyArray("y", [0,-14.8969,-30.1606,-45.8179,-61.8789,-78.2953,-94.9161,-111.395,-127.195,-141.658,-154. 35]);
        __motion_digitB1_mc.addPropertyArray("scaleX", [1.000000]);
        __motion_digitB1_mc.addPropertyArray("scaleY", [1.000000]);
        __motion_digitB1_mc.addPropertyArray("skewX", [0]);
        __motion_digitB1_mc.addPropertyArray("skewY", [0]);
        __motion_digitB1_mc.addPropertyArray("rotationConcat", [0,36,72,108,144,180,216,252,288,324,360]);
        __motion_digitB1_mc.addPropertyArray("blendMode", ["normal"]);
        __motion_digitB1_mc.addPropertyArray("cacheAsBitmap", [false]);
        // Create an AnimatorFactory instance, which will manage
        // targets for its corresponding Motion.
        var __animFactory_digitB1_mc:AnimatorFactory = new AnimatorFactory(__motion_digitB1_mc);
        __animFactory_digitB1_mc.transformationPoint = new Point(0.500000, 0.500000);
        // Call the addTarget function on the AnimatorFactory
        // instance to target a DisplayObject with this Motion.
        // The second parameter is the number of times the animation
        // will play - the default value of 0 means it will loop.
        // __animFactory_digitB1_mc.addTarget(<instance name goes here>, 0);
    But when I called this function it did nothing at all except increase my swf file size from 3.8 kb to 27.3 kb.
    Can anyone suggest a solution that would allow me to swap back and forth between two motions for an object.
    Thanks,

    The culprit is most likely the garbage collector. If you do
    not have any references to your tween object, it will eventually be
    destroyed by the garbage collector.
    From
    Adobe
    Flash Quick Start
    quote:
    Note: Consider variable scope when using the Tween class. If
    a tween is created in a function, it is important that the
    variable's scope exists beyond the function itself. If a tween is
    stored to a variable of local scope, ActionScript garbage
    collection removes the tween as the function completes, which will
    likely be before the tween has even begun.

  • Moving multiple symbols "breaks" motion tweens

    I'm working on a character rotation in Flash CS 5.5 that leads into a basic walk cycle using all motion tweens. The tutorial I'm following (which only uses classic tweens) says to grab all the upper body symbols with free transform and rotate them forward a little. This works fine with classic tweens, but with motion tweens, the parts pop strangely out of place and the more frames I try to move the upper body symbols on, the worse the symbols start randomly sliding around. You can see a simple before/after example posted below. Moving the profile view upper body symbols displaces the arms on the first frame.
    Is there any way to move multiple symbols without ruining them? Someone else described at length a problem like this on an old thread, but no one answered: http://forums.adobe.com/thread/1084800
    I've tried taking all the upper body layers and sticking them in a symbol, but that won't work because the left hand will pass over the left leg instead of under due to layering.
    EDIT - Whatever change is made to the arms during the walk  changes the key frames at the beginning, but only if selected with other symbols. If I move the upper body parts down instead of rotating them, the first frame arms will be retroactively be moved down.
    Message was edited by: LastNameLeft3000

    If you are interested in getting decent results at some point youwill have to looke into the Bone-Tool or use a extension like DragonBones
    The reason why you are having "Displacement"-problems lies in the "Math" behind how AnimatorFactory (the system behind Motion Tweens) handles transformations different from Tweens (Its outright misleading to call them Tweens, and Adobe did a poor naming job).
    Right click one of the Motion tweens and chosy "copy as Actionscript 3.0" from the context menu then paste the code in any available textEditor and you will see sth like:
    import fl.motion.AnimatorFactory;
    import fl.motion.MotionBase;
    import fl.motion.Motion;
    import flash.filters.*;
    import flash.geom.Point;
    var __motion_Symbol1_9:MotionBase;
    if(__motion_Symbol1_9 == null) {
        __motion_Symbol1_9 = new Motion();
        __motion_Symbol1_9.duration = 24;
        // Call overrideTargetTransform to prevent the scale, skew,
        // or rotation values from being made relative to the target
        // object's original transform.
        // __motion_Symbol1_9.overrideTargetTransform();
        // The following calls to addPropertyArray assign data values
        // for each tweened property. There is one value in the Array
        // for every frame in the tween, or fewer if the last value
        // remains the same for the rest of the frames.
        __motion_Symbol1_9.addPropertyArray("x", [0]);
        __motion_Symbol1_9.addPropertyArray("y", [0]);
        __motion_Symbol1_9.addPropertyArray("scaleX", [1.000000]);
        __motion_Symbol1_9.addPropertyArray("scaleY", [1.000000]);
        __motion_Symbol1_9.addPropertyArray("skewX", [0]);
        __motion_Symbol1_9.addPropertyArray("skewY", [0]);
        __motion_Symbol1_9.addPropertyArray("rotationConcat", [0,3.91304,7.82609,11.7391,15.6522,19.5652,23.4783,27.3913,31.3043,35.2174,39.1304,43.043 5,46.9565,50.8696,54.7826,58.6957,62.6087,66.5217,70.4348,74.3478,78.2609,82.1739,86.087,9 0]);
        __motion_Symbol1_9.addPropertyArray("blendMode", ["normal"]);
        __motion_Symbol1_9.addPropertyArray("cacheAsBitmap", [false]);
        __motion_Symbol1_9.addPropertyArray("opaqueBackground", [null]);
        __motion_Symbol1_9.addPropertyArray("visible", [true]);
        // Create an AnimatorFactory instance, which will manage
        // targets for its corresponding Motion.
        var __animFactory_Symbol1_9:AnimatorFactory = new AnimatorFactory(__motion_Symbol1_9);
        __animFactory_Symbol1_9.transformationPoint = new Point(0.499943, 0.500000);
        // Call the addTarget function on the AnimatorFactory
        // instance to target a DisplayObject with this Motion.
        // The second parameter is the number of times the animation
        // will play - the default value of 0 means it will loop.
        // __animFactory_Symbol1_9.addTarget(<instance name goes here>, 0);
        // Call the addTarget function on the AnimatorFactory
        // instance to target a DisplayObject with this Motion.
        // The second parameter is the number of times the animation
        // will play - the default value of 0 means it will loop.
        // __animFactory_Symbol1_9.addTarget(<instance name goes here>, 0);
    This is only the code for simply rotating a rectangle over the duration of 24 frames.
    You notice 2 two problems right away: while having the registration point in the center, Flash distorts the values:
        __animFactory_Symbol1_9.transformationPoint = new Point(0.499943, 0.500000); //should be (0.5, 0.5)
    you can imagine that this "error" gets worse when inherited from nested symbol to nested symbol, it "exponentially" grows with each nesting, and it will soon reach a point were it gets visible.

  • Motion Tween.

    Hello!    
    I have a big problem on a project that I'm developing.
    I've created an animation with ActionScript 2.0 using mx Tween class.
    This is the code:
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    var myTween:Tween = new Tween(mc1, "_y", Regular.easeOut, mc1._y, mc1._y-100, 0.8, true);
    var listeningObject:Object = new Object();
    myTween.addListener(listeningObject);
    listeningObject.onMotionFinished = function():Void {
         this.mc1.gotoAndStop(1);
    The first time the animation work well, but when i try to execute again by button on first frame of my scene the motion not execute standard motion tween and execute only final parts of this code.
    I've tried to insert a trace and flash send to me this information: [Tween]
    I think I can't exit or delete or stop or reset this Tween.
    The code work well but I can't do a "rewind" of all the scene!
    After the tween I want to see the standard motion...
    Please help me if you can.
    Bye!

    How does telling the mc1 to goto and stop at its frame 1 have to do with going back to frame 1 of the timeline tween and playing it again?  Wouldn't you want to use...
    listeningObject.onMotionFinished = function():Void {
         this.gotoAndPlay(1);

  • Motion Tween querry?

    Hi,
    I have 10 objects in 10 layers to make a single logo. I have created them using flash drawing objects. Now I would like each object to come one by one on stage using motion tween. How can I go further?
    Do I need to make each object a movie clip before set it motion tween? Or do I need to make a single movie with all 10 objects as combined? Please note that I need each object to come on stage one by one (not a whole logo on once). Please provide help or any example tutorial link.
    Thanks.

    Create each object as a movieclip.  If you plan to use the the timeline to tween them onto the stage, then you should be all set to configure that as long as you are faqmiliar with timeline tweening.  If you plan to use actionscript code, then you'll need to learn about using the Tween class and listeners or timers to be able to have things tween seuqnecially.

Maybe you are looking for

  • How can I get i phone 4s to work with a tom tom car kit

    I upgraded to an i phone 4s from an I phone 3gs.  My tom tom app worked perfectly with the tom tom car kit on my old phone but now I have managed to get it to charge when plugged into the car kit but there is only poor gps reception showing, any Idea

  • Conversion From SQL Server to Oracle.. Just New pls someone help

    I am new to Oracle 11g and badly need the conversion of SQL Server Functions to Oracle.. Sample Pasted Code not working .. end with error.. pls help Create Table TempT (ID1 Varchar (10),      ID2 Varchar (10) CREATE OR REPLACE PACKAGE GLOBALPKG AS   

  • Where is the CCV number stored for offline processing? I cannot see it the secure PDF document

    Please note that we will not collect CVV, CVV2, CVC2 & CID as per PCI standards. A Card Verification Value code, CVV, (CVV2 for Visa, CVC2 for MasterCard and CID for AMEX) is the three or four digit number located either on the front or back of a cre

  • Configure domainValues_Xact_Types_EAM_WO_Type_ora11i.csv

    I am configuring EAM analytics 7.9.6.4 with EBS R12. I am folliowing http://docs.oracle.com/cd/E35287_01/bia.7964/e35272.pdf In Section 16.2.2 Domain Values and CSV Worksheet Files for Oracle Enterprise Asset Management Analytics with Oracle EBS It s

  • Changing context root

    I know how to change context root inside Jdeveloper but I couldnt find any way to modify it outside Jdeveloper. like I changed application.xml and weblogic.xml but not successful. I am using Jdev 11.1.2.2 and Ojdeploy for creating ear file