Tween on CuePoint

I am currently trying to create a function (or set of functions) that automatically fades in a button for each cue point in a video the first time a video loads. This way the buttons only become accessible once that point in the video has passed. The buttons should stay active once the video is loaded.
The code below is what I have so far. Essentially all I have managed to do is trace the name of the cuePoint. I believe what I need to do is somehow assign the cue point name to an object, pass that reference to the "fadeIn" function and run the "fadeIn" function.
It is worth noting that the buttons I am fading in are already on the timeline, so I do not need to create them in code. I just need to reference them.
Any and all help is appreciated!
import fl.video.MetadataEvent;
import fl.transitions.Tween;
import fl.transitions.easing.*;
promoVid.addEventListener(MetadataEvent.CUE_POINT, cueCheck)
function cueCheck(evt:MetadataEvent):void {
var cName:String = evt.info.name;
trace(cName)
function fadeIn() {
var cueTween:Tween = new Tween(--------,"alpha",None.easeOut,0,1,1,true);

For future reference, here is the final solution I came up with. There may be a more elegant way to do this, and if so please share it, but this worked!
promoVid.addEventListener(VideoEvent.READY, cueControls);
function cueControls(evt:VideoEvent):void {
promoVid.addEventListener(MetadataEvent.CUE_POINT, cueCheck);
function cueCheck(evt:MetadataEvent):void {
var cName:String = evt.info.name;
trace(cName)
switch (cName){
case "Conclusion" :
var cueTween9:Tween = new Tween(cluCueBtn,"alpha",None.easeOut,cluCueBtn.alpha,1,1,true);
promoVid.removeEventListener(MetadataEvent.CUE_POINT, cueCheck);
promoVid.addEventListener(VideoEvent.READY, cueControls);
case "Results" :
var cueTween8:Tween = new Tween(resCueBtn,"alpha",None.easeOut,resCueBtn.alpha,1,1,true);
case "Affordable" :
var cueTween7:Tween = new Tween(affCueBtn,"alpha",None.easeOut,affCueBtn.alpha,1,1,true);
case "Portability" :
var cueTween6:Tween = new Tween(portCueBtn,"alpha",None.easeOut,portCueBtn.alpha,1,1,true);
case "Safety" :
var cueTween5:Tween = new Tween(safeCueBtn,"alpha",None.easeOut,safeCueBtn.alpha,1,1,true);
case "Ease" :
var cueTween4:Tween = new Tween(easeCueBtn,"alpha",None.easeOut,easeCueBtn.alpha,1,1,true);
case "Innovation" :
var cueTween3:Tween = new Tween(innCueBtn,"alpha",None.easeOut,innCueBtn.alpha,1,1,true);
case "Convenience" :
var cueTween2:Tween = new Tween(conCueBtn,"alpha",None.easeOut,conCueBtn.alpha,1,1,true);
case "Intro" :
var cueTween:Tween = new Tween(introCueBtn,"alpha",None.easeOut,introCueBtn.alpha,1,1,true);

Similar Messages

  • Free Transform breaks Motion Tweens

    Sigh! Normally I try to solve problems myself... but Google isn't giving me anything about this so maybe I'm the only one in the world experiencing this particular issue.
    I've used Flash for making games for years now, and I got used to using the old motion tweens for making looping animations for characters. I made the leap from AS2 to AS3 a while ago, and felt like I should try to use these new motion tweens as well since I got CS5...
    I've found them completely unusable, however, due to a bizarre problem that happens when moving around objects using the Free Transform tool.
    For a single character, I'll have a MovieClip with several layers, each with a 'body part' MovieClip on it, then I add the new blue-type motion tweens to all of those layers. At the end of those tweens, I use F6 to (hopefully) duplicate the starting pose; it is meant to loop, after all. Then I'll go about half way between these two keyframes and move bits around to create the A->B->A sort of 'idle' or 'breathing' animation.
    The Free Transform seems dodgy though. If I select all the 'limbs' of a character at once and try to rotate them as a group, it works, but they each end up displaced a bit when I release the mouse; they get offset slightly or rotate a bit in seemingly random directions.
    For example, compare these two images (it's easiest if they're opened in separate tabs, I suppose): http://scraps.fighunter.com/sparkpupagh1.png and http://scraps.fighunter.com/sparkpupagh2.png
    The first one is after rotating it but before I released the mouse button, the second is what the pieces ended up like after I released the button. Most of the pieces ended up where they should be, but the head was offset slightly. This is a mild case; it's usually worse and affects all the pieces, and the slight offsets and rotations build up, too.
    This in itself wouldn't be too bad - though it's frustratingly inaccurate - but it gets much, much worse the more I work on a single animation.
    (Note: These strange changes don't happen if I rotate all the parts as a group if they're not also contained within new motion tweens...)
    Here's a screenshot showing a frame mid-way through an animation, with one of the parts selected: http://scraps.fighunter.com/meepagh1.png
    The Motion Editor is shown, though I don't use that directly.
    With that feather bit selected, I then rotated it a tiny, tiny amount, but didn't *move* it at all. When I released the mouse, it ended up snapping suddenly to here: http://scraps.fighunter.com/meepagh2.png
    That'd be frustrating in itself, but as you can see from the Motion Editor, it's also messed up most of the other frames in the animation, somehow. This becomes unbearable, as you can likely imagine!
    If I edit the graph in the Motion Editor directly to alter the Z value and cause a rotation, it works, without problems... but this is horribly inefficient and unintuitive and not a solution. I can't animate by tweaking numbers. It's like trying to draw a portrait using an Etch-A-Sketch!
    It seems to only be the Free Transform tool that creates this bizarre problem.
    This has been happening since I got CS5 maybe a year or two ago, though I haven't actually had to use the animation tools much until a few days ago so that's why I'm bringing it up now. I've restarted Flash, my computer, etc, etc, many times; I also got the trial version of CS6 today to see if THAT would fix it, but the exact same thing happens in that version too.
    I'm wondering whether it's my computer's fault in some way... I don't know enough about hardware and 'specs' and that sort of stuff to describe anything about it, but I'm using Windows Vista and the computer is fairly old and not exactly what I'd call reliable. I'm planning to get a new one soon, so it'd be nice if that fixed this problem... but frustrating if it doesn't.
    I'll link to the CS6-flavoured .fla that those screenshots are from: http://scraps.fighunter.com/Meep.fla
    I'd very much appreciate it if someone could test this to see if it's happening to only me! If I go to frame 146 (to choose one at random), and try to rotate the foot, slightly, using the Free Transform tool, it breaks in the way that I've described. (Oddly, the head feather rotates without issues on that frame...) If you were to try to do this same thing and it *doesn't* break, it might be a good sign that it's my computer's fault!
    If it *does* break though... then I'd very much appreciate any help I can get from someone who understands the new motion tweens better than I do!
    It'd be a shame to have to go back to Classic Tweens because of this...

    Sigh! Normally I try to solve problems myself... but Google isn't giving me anything about this so maybe I'm the only one in the world experiencing this particular issue.
    I've used Flash for making games for years now, and I got used to using the old motion tweens for making looping animations for characters. I made the leap from AS2 to AS3 a while ago, and felt like I should try to use these new motion tweens as well since I got CS5...
    I've found them completely unusable, however, due to a bizarre problem that happens when moving around objects using the Free Transform tool.
    For a single character, I'll have a MovieClip with several layers, each with a 'body part' MovieClip on it, then I add the new blue-type motion tweens to all of those layers. At the end of those tweens, I use F6 to (hopefully) duplicate the starting pose; it is meant to loop, after all. Then I'll go about half way between these two keyframes and move bits around to create the A->B->A sort of 'idle' or 'breathing' animation.
    The Free Transform seems dodgy though. If I select all the 'limbs' of a character at once and try to rotate them as a group, it works, but they each end up displaced a bit when I release the mouse; they get offset slightly or rotate a bit in seemingly random directions.
    For example, compare these two images (it's easiest if they're opened in separate tabs, I suppose): http://scraps.fighunter.com/sparkpupagh1.png and http://scraps.fighunter.com/sparkpupagh2.png
    The first one is after rotating it but before I released the mouse button, the second is what the pieces ended up like after I released the button. Most of the pieces ended up where they should be, but the head was offset slightly. This is a mild case; it's usually worse and affects all the pieces, and the slight offsets and rotations build up, too.
    This in itself wouldn't be too bad - though it's frustratingly inaccurate - but it gets much, much worse the more I work on a single animation.
    (Note: These strange changes don't happen if I rotate all the parts as a group if they're not also contained within new motion tweens...)
    Here's a screenshot showing a frame mid-way through an animation, with one of the parts selected: http://scraps.fighunter.com/meepagh1.png
    The Motion Editor is shown, though I don't use that directly.
    With that feather bit selected, I then rotated it a tiny, tiny amount, but didn't *move* it at all. When I released the mouse, it ended up snapping suddenly to here: http://scraps.fighunter.com/meepagh2.png
    That'd be frustrating in itself, but as you can see from the Motion Editor, it's also messed up most of the other frames in the animation, somehow. This becomes unbearable, as you can likely imagine!
    If I edit the graph in the Motion Editor directly to alter the Z value and cause a rotation, it works, without problems... but this is horribly inefficient and unintuitive and not a solution. I can't animate by tweaking numbers. It's like trying to draw a portrait using an Etch-A-Sketch!
    It seems to only be the Free Transform tool that creates this bizarre problem.
    This has been happening since I got CS5 maybe a year or two ago, though I haven't actually had to use the animation tools much until a few days ago so that's why I'm bringing it up now. I've restarted Flash, my computer, etc, etc, many times; I also got the trial version of CS6 today to see if THAT would fix it, but the exact same thing happens in that version too.
    I'm wondering whether it's my computer's fault in some way... I don't know enough about hardware and 'specs' and that sort of stuff to describe anything about it, but I'm using Windows Vista and the computer is fairly old and not exactly what I'd call reliable. I'm planning to get a new one soon, so it'd be nice if that fixed this problem... but frustrating if it doesn't.
    I'll link to the CS6-flavoured .fla that those screenshots are from: http://scraps.fighunter.com/Meep.fla
    I'd very much appreciate it if someone could test this to see if it's happening to only me! If I go to frame 146 (to choose one at random), and try to rotate the foot, slightly, using the Free Transform tool, it breaks in the way that I've described. (Oddly, the head feather rotates without issues on that frame...) If you were to try to do this same thing and it *doesn't* break, it might be a good sign that it's my computer's fault!
    If it *does* break though... then I'd very much appreciate any help I can get from someone who understands the new motion tweens better than I do!
    It'd be a shame to have to go back to Classic Tweens because of this...

  • Adobe Flash CS5 - Blur effect & tween not working

    When I try to create a tween for the blur, so it will blur into focus, the tween just wont work. I go to frame 130, keyframe, add blur filter, create clasic tween. But when i go to frame 131 it instantly pops into focus instead of going along the tween time span to blur in gradually(I have the next keyframe at 160). Anyone have any ideas?! This boggles my mind!
    Any help or suggestions would be deeply appreciated
    Thanks in advance...

    What type of textfield are you using?  What type of symbol have you created it as?  If you can show a screenshot of the stage and timeline for what you have it might help to identify the problem.

  • Problem with Tweens and HitTest

    Hi guys,
    I have a problem with by code generated Tweens and HitTest.
    But first of all the backgeround info. I have a couple of dots. They are generated from a single movieclip and differ in scale. The idea is, that the biggest one ist set to the middle position of the stage.
    The others are coming from the outer stage border and are moving towards the middle position. This is done by using the Tween class.
    What should happen is, that they stop exactly at the border of the dots which are already in the middle. In the beginning there is just the main, big dot which was manually positioned to the middle. When the first dot reached its position, the bounding box should include this new dot.
    I use the hitTestObjects method to stop the Tweeing.
    The problem is, that there is a 80% chance that the dots have gaps or overlapping each other. Any thoughts on that?
    Thanks for every reply!
    This is the hitTesting Code in the main class:
    public function hitTesting(e:Event):void{
                                  for(var i:int=0; i<dotArray.length;i++){
                                                      for(var j:int=i+1; j<dotArray.length;j++){
                                                                if(dotArray[i].hitTestObject(dotArray[j])==true){
                                                                          dotArray[i].stopTweening();
                                                                          dotArray[j].stopTweening();
    This is the code for a single Dot
    public function Dot(anchorArray:Array,randomX:int,randomY:int,scaleVal:Number,first:Boolean, delayVal:Number, lastElement:Boolean, values:Array) {
         this.x=randomX;
         this.y=randomY;
         this.scaleX=this.scaleY=scaleVal;
         this.valueName=values[0];
         this.countValue=values[1];
         this.gRanking=values[2]
         this.lastElement= lastElement;
         this.first=first;
          if(!first){
               this.xTween = new Tween(this, "x", None.easeNone, this.x, anchorArray[0], 20, false);
               this.yTween = new Tween(this, "y", None.easeNone, this.y, anchorArray[1], 20, false);
               this.xTween.start();
               this.yTween.start();
    public function stopTweening():void{
      if(!first){
          if(lastElement)
               parent.removeEventListener(Event.ENTER_FRAME, parent.hitTesting);
          xTween.stop();
          yTween.stop();

    Ok guys,
    found a solution. It seems to be, that the build in HitTest functionality is to inaccurate for my problem.
    I found a better implementation here.
    Tanks for reading.
    -alex

  • I am trying to create a simple animated gif in Photoshop. I've set up my frames and want to use the tween to make the transitions less jerky. When I tween between frame 1 and frame 2 the object in frame two goes out of position, appearing in a different p

    I am trying to create a simple animated gif in Photoshop. I've set up my frames and want to use the tween to make the transitions less jerky. When I tween between frame 1 and frame 2 the object in frame two goes out of position, appearing in a different place than where it is on frame 2. Confused!

    Hi Melissa - thanks for your interest. Here's the first frame, the second frame and the tween frame. I don't understand why the tween is changing the position of the object in frame 2, was expecting it to just fade from one frame to the next.

  • How do I create 2 motion tweens for one line of text?  the text needs to "fly-in-right", I can do that,

    how do I create 2 motion tweens for one line of text?  the text needs to "fly-in-right", I can do that, then it needs to "fly-out-bottom" again, I can do that, but not on the same line of text...any ideas...

    my question
    1- there is any way to assign the Fetch process to specific region so the process take all item in these region only.
    2- how can create manual process to fetch row into specific items in page ( i tray these code
    SELECT col1, col2, col3 ....
    INTO :P1_ITEM1, :P1_ITEM, :P1_ITEM...
    FROM table
    WHERE id = :P_id ) but no data retrieve .
    I do not think that it is possible to have more than one Automated Row Fetch process in a given page. See the thread:
    ORA-01403: no data found : Unable to fetch row multiple automated row fetch
    On your second question, the manual process should work provided:
    P_ID has a value when the process executes. You can do it this way:
    i. Make this process as a on-load After/Before header process
    ii. Make sure that P_ID page item has value when the process executes (set it from another page or before the pl/sql process executes)

  • How many motions tweens can you have on a timeline?

    I'm a college student in Seattle.  We just had our mid-terms in Flash CS5.  One of the really simple questions was "How many motion tweens can you have on a timeline."  Yup.  The answer is one...... or is it?  I had a long discussion with my tutor (who is the greatest tutor in the world) and he wanted to think about it. I said to him that I thought that one motion tween was wrong because you can click on an object in the timeline, make it a motion tween, and double click it and make several motion tweens.  So, essentially, you can have more than one motion tween on a timeline.  Is anyone able to advise me because this is all about grades!

    You can have quite a few motion tweens on a timeline.  You can even have them happening simultaneously (I don't know of a specific limit), as long as they are all on their own layers.  Though the more you add simultaneously the more they can weigh down the speed of things running.
    If you need to prove this to someone, the easiest way is to create it and demonstrate it.  But you may want to check the exact wording of the question... it would not be beyond an examiner to throw a trick question in.

  • Is there a way to make the Tween class move XY?

    I want to move an object across the screen. For the first 10 x pixels I want it to also move 10 y pixels. So if I was manually coding it I would do
    for (i = 0; i < 10; i++) {
         x + i;
         y +i
    Once it gets to the max x position I want it to reverse y.
    At the same time I would like to reduce the size of the object for the same by 1% while moving y and then reversing it back to the normal size at when the y is reversed.
    I think maybe the size can be done with the transition but I'm not sure.
    Thanks for any help.
    Joe.

    Where object is the instance name of the object to move
    import fl.transitions.Tween;
    import fl.transitions.TweenEvent;
    var xTween:Tween;
    var yTween:Tween;
    var yScale:Tween;
    var XScale:Tween;
    var initX:Number;
    var initY:Number;
    var finishX:Number;
    var finishY:Number;
    var timeTweens:int = 5;
    var newScaleX:Number=0.3;
    var newScaleY:Number=0.3;
    xTween = new Tween(object,"x",Strong.easeOut,initX,finishX,timeTweens,true);
    yTween = new Tween(object,"y",Strong.easeOut,initY,finishY,timeTweens,true);
    xTween.addEventListener(TweenEvent.MOTION_FINISH, reverseY);
    function reverseY(e:TweenEvent):void{
        yTween = new Tween(object,"x",Strong.easeOut,finishY,initY,timeTweens,true);
        XScale = new Tween(object,"scaleX",Strong.easeOut,1,newScaleX,timeTweens,true);
        yScale = new Tween(object,"scaleY",Strong.easeOut,1,newScaleY,timeTweens,true);

  • Trying to tween a colour change on an mc with AS...

    Hi
    I have a Flash front-end that loads menu data from an XML
    file, duplicates an empty movie clip and populates a dynamic text
    field with each menu item mc and then populates the text fields
    with the text from the XML. With help from others in the forum I've
    finally managed to get the movement tween working perfectly,
    however I can get the rollOver call to change the colour of the mc
    - essentially I want the menu itm mc when you rollover it. I've
    tried using setRGB, but that's not doing anything. Any help would
    be much appreciated. Here's the code:

    LuigiL thanks a lot for your response, and the interesting
    link to the fuse engine...looks definetely worth a try.
    now back to my question:
    of course you can make any function return a string value and
    pass this to the Tween class as a constructor parameter, thats just
    what I said before:
    "the Tweeing class modifies object properties, but can not
    call (a) function"
    waht I wanted to say with that (which was maybe misunderstood
    by you) is that the Tween class can modify any objects pubic
    properties, but it can not call any of the _objects_ functions. So
    I am not sure if you misunderstood my statement or if I am realy
    wrong.
    Your example also only shows how to modify any property of
    the mc object (even though the name of the property is returned by
    a function, therefore is dynamic) with the Tween-Class but not how
    to call an objects funtion for every Tween step. And this is what
    RedBox tried to do, which, as I said is not possible.
    Do you agree?

  • How can I set up a keyboard shortcut for 'Remove Tween' in Flash Pro CC 2014?

    I'm trying to set this up, as I have in previous versions of Flash, but the 'Remove Tween' command (among other commands) is not available in the Keyboard Shortcut window.
    Is there some other way to add this shortcut?
    Thanks,
    George

    I don't think this had a keyboard shortcut even before (checked in CS6). There's an alternative though.
    1. Create a JSFL file with following code and save it in the commands folder as 'Remove Tween'.
         fl.getDocumentDOM().getTimeline().setFrameProperty('tweenType', 'none');
    2. Now goto Edit Menu > Keyboard Shortcuts..
    3. Search for 'Remove Tween' and assign a keyboard shortcut to it.
    Now everytime you press the assigned key - jsfl script is executed which essentially removes the tween from selected frame. (works for Classic and Shape tween but not Motion Tweens)

  • Poor quality motion tween with png image, tried "Trace Bitmap", but then it looks like a newspaper

    Greetings all,
    I've been a software developer for many years, but am not very savy in the design elements.  So, much of what I'm going to say will probably sound "newbie", so please forgive me in advance.
    So, I'm trying to get a transparent image to fly in from the side.  So, I *thought* I was doing the correct thing by moving the "symbol" off of the visible portion of the stage, and creating a motion tween to move it onto the stage.  The motion works, but the quality of the image in general (and the text in specific) looks pixelated.
    Thus, I did a little bit of snooping, and everyone said that you should start with a bitmap.  So I saved the image from Photoshop into .bmp format, and was able to set the properties to "allow smoothing" and with lossless compression.  So far, so good.  Now, as I expected, the transparency is no longer there... 
    So here's the question:  how can I make this image retain its quality, still have transparency, and a motion tween?
    It seems like this is some set of characteristics that don't play well together, even though I see this type of thing online ALL the time.
    I tried "Trace Bitmap" to convert to a raster image, and tried to follow some suggestions online, but when I do "Trace Bitmap", it ends up looking like it has a bunch of grayish dots on the image... definitely NOT what I was expecting.
    Thanks for your help!
    JPB

    Go back to using the png, and set the smoothing allowance. That should take care of the quality.  In Flash, a "bitmap" will often refer to any type of image element... .bmp's are probably dinosaurs (as in extinct) where Flash usage is concerned.

  • 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.

  • How do i apply a certain tween to several objects?

    hi all,
    I'm working on a little flash project to show a card game being played out. Its just playing out a set of moves - no actual logic for actually playing the game.
    Anyhow, what i would like to be able to do is create a tween (hope thats the right term) where a card will appear in the center of the table, and then slide over to the players hands and at the same time shrink down so i can fit a few hands on the screen. So basically i need a tween that takes an object (the card), places it on the center of the screen, and then slides over and shrinks down to a specific point. So in whatever action script calls this tween, i guess i would need to feed it two values - which card it starts with, and where the card should end up.
    can someone give me some pointers as to how i'd go about doing this? I'd like to learn how to create this in the flash interface and then convert all that clicking and dragging into action script 3.0. I think it's easier to visually create the animation that way rather then trying to program it. but if there's a better way i'm all ears.
    thanks

    i'm not having much luck getting this working.
    I created a simple animation in the user interface. I then right clicked on it and selected copy motion as action script 3. That gave me the following code:
    var CardDeal1_xml:XML = <Motion duration="25" xmlns="fl.motion.*" xmlns:geom="flash.geom.*" xmlns:filters="flash.filters.*">
    <source>
    <Source frameRate="24" x="89.35" y="467.3" scaleX="1" scaleY="1" rotation="0" elementType="movie clip" symbolName="AceHeart" class="AceHeart">
    <dimensions>
    <geom:Rectangle left="0" top="0" width="170.45" height="254.55"/>
    </dimensions>
    <transformationPoint>
    <geom:Point x="0.49985332942211796" y="0.4999017874680809"/>
    </transformationPoint>
    </Source>
    </source>
    <Keyframe index="0" tweenSnap="true" tweenSync="true">
    <tweens>
    <SimpleEase ease="0"/>
    </tweens>
    </Keyframe>
    <Keyframe index="24" x="81" y="-329.95000000000005" scaleX="0.144" scaleY="0.128" rotation="180"/>
    </Motion>;
    var CardDeal1_animator:Animator = new Animator(CardDeal1_xml, CardDeal1);
    CardDeal1_animator.play();
    How do i take this card, and replace "AceHeart" with whatever card i want to animate? I couldn't even get this above code to work at all. Tried to run it and i get an error about acces of undefined property CardDeal1. I assume CardDeal1 should be an item on the stage, because when i change carddeal1 to the name of an instance of a card on the stage, it sort of works. My movie runs, but not very well. It seems like i have to press the button to advance the animation by one frame - so i have to keep pressing it over and over to advance the animation. And then the card doesn't even stop where it's supposed to - it litterally just flies off the stage. So at this point i feel pretty clueless.
    Can this only work with an item thats already on the stage? if so, do i first need to go through the addchild function to place an instance of whatever card i want to animate and then call this motion animator thing?
    thanks in advance for any help

  • Error when creating tweens and masks

    Hi Guys, i seem to be having a porblem with any sort of tweens, motion (classsic) and shape.
    when i create a new motion tween for example, i get the yellow "!" error in properties and it says "Motion tweening will not occur on layers with ungrouped shapes or on layers with more than one group or symbol". Thing is, i dont have more than one symbol or thing more than one shape and that is actually being tweened.
    the ! error only shows when i select the last frame in the tween. any ideas how i can get around this? i've never had this problem previously.
    when i create a motion tween, i draw the object (in this case a circle), right click on the single keyframe, select create motion tween, then copy this keyframe and paste it further down the timeline, say at frame 10. At frame 10, i will move the circle to another location. the tween seems to work and it has created the symbol in the libary (tween 1) as a graphic, and when i export, it works ok, but the last frame has still the same error with the "!".  Same thing happens with shape tweens.
    In this case i have used a shape tween to make a circle become larger, and this which is my mask layer, with the masked later underneath, which is a static shape which i have drawn with the pencil tool. The mask works fine in flash, but when exproted, nothing shows.
    I've linked to an example .fla file of the problem that i am having with the tween and also the mask layer. The main animation is in a movie clip called "Drop 10", in the libary.
    Any help would be great as this is driving me mad.
    File: http://ranicx.com/test/example_problem.fla

    does anyone have any idea what could be happening? i really need help with this.

  • Use length of XML file to tween movieclip?

    Hello,
    I'm creating a horizontal scrolling gallery in which the content is loaded through xml. So far the xml loads fine and the content is easily nested within movieclips and positioned within a larger movieclip containing each of the movieclips containing the content. With that said, I am able to move this main movieclip left and right with no problem using a tween and a fixed position but I have no way of stopping the movieclip according to how much content is in the xml file. I'm attempting to use the length of the xml file to move this main movieclip but either it can't be done or my coding is wrong.
    Thank you in advance!
    Here is my code:
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import  fl.transitions.TweenEvent;
    var currentContentIndex:uint = 0;
    var  currentContent:MovieClip;
    // container movieclip
    var container:MovieClip = new  MovieClip();
    container.y = 120;
    addChild(container);
    var imageLoader:Loader;
    var xml:XML;
    var xmlList:XMLList;
    var xmlLoader:URLLoader =  new URLLoader();
    xmlLoader.load(new URLRequest("gallery.xml"));
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
    var x_count:Number = 0;
    var y_count:Number = 0;
    // Everything in the function below loads and positions fine
    function  xmlLoaded(event:Event):void
         xml = XML(event.target.data);
         xmlList  = xml.children();
         for(var i:int = 0; i < xmlList.length(); i++)
              //  contentContainer
              var contentContainer:MovieClip = new  MovieClip();
              contentContainer.graphics.beginFill(0xFFFFFF);
              contentContainer.graphics.drawRect(0,  0, 1000, 500);
              contentContainer.graphics.endFill();
              contentContainer.width  = 1000;
              contentContainer.height = 500;         
              contentContainer.x  = (contentContainer.width+400)*x_count;
              contentContainer.y  = 0;
              // thumbInfo
              var  imageInfo:MovieClip = new MovieClip();
              imageInfo.graphics.beginFill(0x000000);
              imageInfo.graphics.drawRect(0,  0, 150, 100);
              imageInfo.graphics.endFill();
              imageInfo.x  = 400;
              imageInfo.width = 150;
              imageInfo.height  = 100;
              addChild(imageInfo);
              imageLoader  = new Loader();
              imageLoader.load(new  URLRequest(xmlList[i].attribute("source")));
              x_count++;
              y_count = 0;
              contentContainer.addChild(imageLoader);
              contentContainer.addChild(imageInfo);
              container.addChild(contentContainer);
    function tweenCurrentImageF(){
         currentContent=MovieClip(xmlList[currentContentIndex]);  // PROBLEM CODE?
         var targetX:Number = stage.stageWidth/2 -  currentContent.x - currentContent.width/2;
         var  myTween:Tween = new Tween(container, "x", Strong.easeInOut, container.x,  targetX, 1, true);
    rightArrow.buttonMode = true;
    rightArrow.addEventListener(MouseEvent.CLICK,  right);
    function right(e:MouseEvent):void {
         currentContentIndex++;
         if(currentContentIndex<xmlList.length){
              tweenCurrentImageF();

    Hey again,
    I understand what you are saying and I've omitted that problem code because it's code I'm trying to carry over from a gallery using an array of movieclips and, to me, it seems irrelevant to this code. I have moved some code around and the movieclip scrolls now but its scrolling directly to the last nested movieclip even though the "currentContentIndex" variable traces 0.
    I moved the button and it's function code inside of the xmlLoaded function because it was recognizing "contentContainer.x" as an undefined term when it was outside of it (I just stated this in case this is the problem).
    Thank you again!
    Here is my new code:
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import  fl.transitions.TweenEvent;
    var currentContentIndex:uint = 0;
    // container movieclip
    var container:MovieClip = new  MovieClip();
    container.y = 120;
    addChild(container);
    var imageLoader:Loader;
    var xml:XML;
    var xmlList:XMLList;
    var xmlLoader:URLLoader =  new URLLoader();
    xmlLoader.load(new URLRequest("gallery.xml"));
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
    var x_count:Number = 0;
    var y_count:Number = 0;
    function xmlLoaded(event:Event):void {
           xml = XML(event.target.data);
            xmlList  = xml.children();
            for(var i:int = 0; i < xmlList.length(); i++)
                //  contentContainer
                var contentContainer:MovieClip = new  MovieClip();
                contentContainer.graphics.beginFill(0xFFFFFF);
                contentContainer.graphics.drawRect(0,  0, 1000, 500);
                contentContainer.graphics.endFill();
                contentContainer.width  = 1000;
                contentContainer.height = 500;        
            contentContainer.x  = (contentContainer.width+400)*x_count;
            contentContainer.y  = 0;
              container.addChild(contentContainer);
                imageLoader  = new Loader();
             imageLoader.load(new  URLRequest(xmlList[i].attribute("source")));
              contentContainer.addChild(imageLoader);
                x_count++;
                y_count = 0;
              var imageText:TextField = new TextField();
              imageText.x = 400;
              imageText.y = 30;
              imageText.text = xmlList[i];
              imageText.autoSize = TextFieldAutoSize.LEFT;
              contentContainer.addChild(imageText);
         function tweenCurrentImageF(){
              var targetX:Number = stage.stageWidth/2 -  contentContainer.x - contentContainer.width/2;     
               var  myTween:Tween = new Tween(container, "x", Strong.easeInOut, container.x,  targetX, 2, true);
         rightArrow.buttonMode = true;
         rightArrow.addEventListener(MouseEvent.CLICK,  right);
         function right(e:MouseEvent):void {
              currentContentIndex++;
              if(currentContentIndex<xmlList.length()){
                 tweenCurrentImageF();

Maybe you are looking for

  • Video was not copied to the iPod because it cannot be played on this ipod.

    I have a mp4 file that won't sync to my iPod 4th Gen. The file is H.264, 720p, the bitrate is 1415 kpbs. Could the problem be that is has a stereo and a Dolby Digital 5.1 audio channel? It was an mkv but I used ffmpeg to change the container. Any hel

  • My daughter's stolen iPhone is CCing her eMail.  Can you explain this?

    My daughter had her brand-new (2 days old) iPhone stolen in Baltimore, MD last summer at a concert.  Recently, she has started recieving email  (on a gmail account that must have been entered/configured somehow) from the phone. Since this is Verizon

  • Error activation imessage and facetime

    Hi, I can not activate iMessage and Facetime in my iPhone 5. In both applications it appeared "error activation, please try again" Thanks for your support

  • Debugging j2me applications

    I am wondering what people are using to debug j2me apps. I am using the wireless toolkit to build and run apps right now. I tried to use the ktoolbar debug feature, but it looks like that sets up for a remote debug session with who knows what. Also t

  • Automatic Packaging material as delivery item

    Hello Friends, In the delivery document there was a automatic packaging material created and deleted in the delivery document, due to which the weight is pickedfrom that of item of delivery document and not from the Handling unit. I would like to kno