This code is within a class and the problem is that the "myMovieToAnimate" movieClip animates the first time around but when the tween finishes, it does not call the AnimateScreen() function again, why is this.
I am trying to create a photo album, and I need the image to fade out, load the next one from XML, then fade back in...trouble is, when I tried a simple fade out, load then fade in, there wasn't enough time for the fade out to take effect and it loaded the next one instantly, so I need to pause the load section until the fade has finished...
[code]...
Oh, P.S I know I'm fading the alpha the wrong way, but to fade the images directly created some funky and undesirable effects, so I'm fading in and out a white rectangle that matches the size of the image.
I'm trying to animate entirely in AS for the first time. (Woo!) I'm using the Tween class, with the very convenient Tween.onMotionFinished to invoke my next animation. But once I get pretty far into it, it starts to look like this:
[code]...
I've found that, when applying a tween to a function, I am unable to refer to that tween (specifically, onMotionFinished) from outside of it. This works okay but leaves me with some rather ugly ActionScript!
fairly simple. but here's what i'd really like to do. i want the first tween to execute (_xscale) and then after that is finished execute the (_yscale) tween. i've thought about using onMotionFinished...but am not exactly sure how to go about getting it to work correctly.
I am currently creating a menu system for a site, that when hovered over expands from a short strip into the larger menu containing buttons/graphics etc. To reduce the number of frames used within the site, i am trying to achieve this method using the tween class / onMotionFinished action as opposed to having a movieclip which plays through when hovered over. However if you move the mouse off before the "loading in" animation is complete, it begins the "reverse" animation and seperate titles both appear on top of eachother.
Basically i need to stop the tweens from playing, should the user hover away before they are complete, like a movieclip would "rewind" if you were using that well documented method. Below is the script, and I have attached the .fla for you to have a look at.
Ok, for my site i have a preloader that slides in, then it slides out once it's finished. I decided to change a couple things, now the same file with some unrelated changes is giving me syntax errors when publishing it. Heres some code:
i'm experiencing a strange issue, until now i alwasy have used "onMotionFinished" without problem, like in this way...[code]suddendly, without any reasons, i get this error in the compiler when trying to publish no property named "onMotionFinished" (i translated it from italian language)i tried also opening other fla i created with the same actionscript, that have always worked fine.there is no way to use the property again.url...
I created some code in Flash 8 for a client using MX2004. I used Tween and made a onMotionFinished function. I saved it as a MX2004 file, but when he tries to compile it he gets.[code]
I have this function that builds menus, and I'm using a tweening class function to move the menu items around. The thing is that when calling the tween function I need the submenu building function to wait until the tween is finished otherwise things start freaking out. It's organized like this (pseudo code):
[Code]...
The problem is that I need the first tweening to finish before I can build the submenu. I've tried using the onMotionFinished, but it doesn't seem to want to call a function nestled into another function (in this case buildMenu()).
I'm working with the Tween object: I'm building a game where mc's need to drop periodically from the sky, and then when they reach the bottom of the screen, they need to be unloaded. The problem I'm having is firing "onMotionFinished" events for these dynamically, "loop-generated" mc's. I think I need to be able to send parameters to an onMotionFinished function, but I can't figure out how. I made a stripped-down version of what I'm doing, here's the code:
Code: import mx.transitions.Tween; import mx.transitions.easing.*; //this keeps track of which bomb we're on bomb_count = 0;
[code]....
Basically I just want to have more control over the programmatic tween and its associated events. Everything is there, it's just that the onMotionFinished event isn't attached to the tween I want it to be attached to, it's attached to the most recent tween that occured, or something. I suspect it has something to do with the fact that all my tweens have the same name, but I don't know how to name them differently in the loop.
I read some stuff about "delegates" and "superclasses" and other dizzying objecty things that seemed relevant but like I said, since I'm not oop fluent, I get pretty lost pretty quick, esp.
I am new to flash and working on creating a simple animation. I have the objects ready, but problem is I can't seem to get motion tween working. Following this, I tried a very basic motion tween just increasing the size of text from one frame to another and can't get even this to work. I followed the basic steps, converted the text objects to symbol etcetera. What is seen is for frames 1-9 there is no change and in frame 10 there is sudden change in size. I also notice that there is no 'arrow' observed in the tween as shown in a sample tutorial.
I have a tween in my .fla that isnt working properly. I have 2 buttons, Start and Yoyo. When I click the "Start" button the tween runs. Clicking the "Yoyo" button play the tween in reverse. All fine, but when I press the "Start" button again after I've ran the animation twice the animation always run in yoyo mode. What my problem. Code:
I am having trouble with this button. The first half of the tween doesnt work but the second half does. It only does this when I add the code link._visible = 0;. This is to make the alpha completely disappear.
As code, simply trying to make things fade in and out namely :- homepage_mc which is a movieclip on my main stage. Fades in Fine on startup, but when the button mybuttons.homebutt is pressed i get no response.
I just can't figure out why a simple movieclip is not performing as expected.
Here's what happened:
In my MAIN SCREEN, I placed a a movieclip and named it "mainnav_mc" and on my ACTIONS layer, I placed a script on the frame that will eventually play the movie "mainnav_mc". This is the script: mainnav_mc.gotoAndPlay("show");The clip is suppose to fade-in but it seems that MOTION TWEEN is not working. I tried to create a test MC and still it's not working.
I want to create an image slideshow. When the user clicks the next button, I want the current image to fade out and the next image to fade in. I'm using Loader to load images, using .load(new URLRequest("imagename.jpg"). When the first image loads and next button is pressed, the image fades out just fine. The problem is when the second image loads. the image loads, but doesn't fade in, it just appears without the tween. Here is my code:
If I have this line of code: var myTween:Tween = new Tween(contHolderMain, "alpha", None.easeNone, 0, 100, 100, true); contHolderMain's alph value should move from 0 to 100 in 100 seconds, but it only take about 5.
The website I'm creating has a large map picture (mcMap) and a crosshair (mcLines) that moves to a different location, depending on which button is clicked. I used a Switch statement and the Point and Tween classes so the user can click from one to the other and the map and craosshair moves.
However, when a button is clicked...sometimes, at random, the map and/or crosshair goes to the wrong location and/or the MC that is supposed to appear doesn't. The issue is very random, so I'm lost as to what may cause this.
Is there any reason for a tween to randomly stop itself mid-tween? The animation works 90% of the time but sometimes it just stops while the animation is going. I'm curious if the Tween class has some known issues or if I've done something wrong... I've been working on this project for about a month now so its already a pretty hefty piece of code(everything else works), but this one little thing is frustrating because I can't recreate it (since it happens randomly) but it will happen at least once within a given session.
What it does:Cycle through an array of dynamically added images on the stage, checking if any of their tags(array) values matches a selected value. When true it executes the animation. When false does nothing. like I said 90% of the time it works fine but that random 10% is really bugging me.This code exicutes on a mouseClick of a MC. The MC name is the "activeTag" valueThis code does work, no errors and it properly traces the correct variables when asked. it is just the tween that is giving me problems.
Code: Select allfor (var t:int=0; t<imgnameCO.length;t++){ if (arrayHas(activeTag, imgNameCO[t].tags)){ rotateImageX2=new
im getting into using the tween classes in mx 2004, and im havin a bit of a problem. im not sure why this code isn't working
[Code]...
what im trying to do is to have the box scale to a certain size once the player enters that frame... am i missing something, because i thought i was doing it correctly. this action is on a frame and not on the movieclip itself.
I have an interesting problem here that I can't figure out. Here's the problem: This code works:
[Code]....
As you can see, I want the object to move in the x direction, then once it's done that I want it to move in the y direction instead of just doing both at once and going diagonal. One thing that is "interesting" is that the trace still spits out the word to the output window. But the object in the end has only moved to the x destination and never gets to the y.
Take a look at [URL] I have made a preloader for a site but the tween dosnt seem to be working properly. Stop the page from loading as soon as you see the preloader. You'll notice that the preloader circle appears to shimmer, i have no idea why. its basically a photoshop psd file that i have dropped to the stage as a graphic and then done a motion tween to make it rotate across 24 frames. I have set the html page to show the flash at 'best' quality and tried it on a black background to see if it was an optical effect, but its always the same.
i have a problem with my as3 working on normal movieclips, but not on the gallery, the site works by loading an external swf file with the UILoader, the swf that is loaded is a ScrollPane that loads a Movieclip.The script i use:
For some reason I can't get this nested set of functions to work, it executes the first tween and the tween invoked after motion of the first is finished but it doesn't ever get to the third!
ActionScript Code: var t1:Tween=new Tween(p1,"rotationY",Strong.easeOut,90,0,50,false); var t1x:Tween=new Tween(p1,"x",Strong.easeOut,-900,0,50,false); t1.addEventListener(TweenEvent.MOTION_FINISH,onMotionFinished);
I'm a bit rusty in flash. import mx.transitions.Tween; import mx.transitions.easing.*; var mytween:Tween = new Tween(ball_mc,"_x",Strong.easeInOut,-320.10,47.90,5,true); mytween.onMotionFinished = function() { var mytween2:Tween = new Tween(ball_mc,"_x",Strong.easeInOut,47.90,-320.10,5,true); } mytween2.onMotionFinished = function() { gotoAndPlay(2); } It does the first and second tween but doesn't do the gotoAndPlay function?