Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Tween + Actioscript


Hello all,

I have a question that been really long in my mind. If i have the following setting.

the main timeline of my movie is divided into 2 keyframes on labled 'key1' and the other 'key2'. In each of this keyframes i used the function stop(); to stop the movie from running once loaded.

Now i have a button with the following actionscript lines:


ActionScript Code:
on (release) {      this.gotoAndStop("key1");}


at the first run when this button is clicked the desired motion will occur but when the button is pressed again, the movie timeline will be on 'key2' and then it will go to 'key1' to play but their is the stop(); command so the user will have to click the button another time to play the movie.

Anybody can tellhow i can overcome this problem.

Thanks




KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 05-19-2003, 11:11 PM


View Complete Forum Thread with Replies

Sponsored Links:

Actioscript
Hello all,

I was on this site. http://www.topixfx.com/topixflash/topixflash.swf I'm trying to figure out how I would the images so that
they move/slide and then slide back after they're rolled over. Any suggestions anyone! Any help on this would be greatly aappreciated.

Cheers-
Graeme

View Replies !    View Related
Updating Actioscript
I got this piece of actionscript from a tutorial designed to show how a button click can bookmark a page:

On (Release)
Get URL ("javascript:window.external.AddFavorite('http: //www.yoursite.com','Friendly Site Name')")
End On

This scripting is for Flash 4. When I try using it in MX it comes up with these debug errors in my test movie screen:

Scene=Scene 1, Layer=Add to Favourites, Frame=1: Line 1: Statement must appear within on handler
On (Release)

Scene=Scene 1, Layer=Add to Favourites, Frame=1: Line 2: ';' expected
Get URL ("javascript:window.external.AddFavorite('http: //www.awakinglife.live.com.au','Awaking Life')")

Scene=Scene 1, Layer=Add to Favourites, Frame=1: Line 3: ';' expected
End On

Can anyone help to decipher the main code at the top so that it works in Flash MX.

Thanks a lot

View Replies !    View Related
Actioscript Dictionary
Hello everybody!!!

Anyone knoks where can I find a complete ActionScript dictionary? if it's posible I need it with diferent lenguages, betwen them in spanish, jejej

Cheers...

View Replies !    View Related
Javascript -> Actioscript
hi all

i have a procedure in my flash file that i want to trigger it from the HTML page ..

that is: i need to call my actionscript function from a submit button on my html page (javascript)

HOW 2 DO THAT ??!!! any help ??

thx

View Replies !    View Related
Game Actioscript Help
Im trying to make a game 4 my dad but it doesn't work as i want it to. grr

Its supposed to go back to the beginning when you crash into a asteroid but it doesnt
heres what ive done w/ the code


Code:
Asteroid

onClipEvent (enterFrame) { if (this.hitTest(_root.player_mc)) { this._alpha = 50;
crash = "true"; } }




frame 2

if (crash = true) {
gotoAndStop(1);
}

I dont know how to monitor true/false so i dont know if it is setting the variable. But i kno that the asteroid has been hit because it fades out...
Please
help
anything would be increndilby aprecciated

View Replies !    View Related
Someone Help With A Rotating Actioscript
hello, i have this little thing that I'm trying.. i drew box and i want it to rotate x-axis in form of an orbit... please can anyone help me on that...?

View Replies !    View Related
Advanced Audio And Actioscript Help Please
Ok, heres the problem:

I've got to create a sound controller for four simple loops. Each of the loops are timestreached to be beatmatched perfectly when they're playing all at once.

When a user clicks on a new loop. The previous loop keeps playing for a few seconds and gradually fades out. (like a real dj)

How do I do this?! I can create a player that jumps from loop to loop but not this..

Thanks in advance for your assistance!!!
__________________
bleroux

View Replies !    View Related
Rollover Effect With Actioscript
i want to make an rollover effect that sets alpha of my button smoothly to 0% and smoothly to 100% at roll out.
i tried it with set property and variables but somehow it doesn't work right.

perhaps someone can help me...

benjamin

View Replies !    View Related
Drawing A Line With Actioscript
this is what i want to do. have a start point and end point and let actionscript draw the line. But i would like to be able to see the line being drawn like a motion tween. ive seen some sites do it in their intros drawing company logos, etc.

any help would be greatly appreciated

View Replies !    View Related
Actioscript Sniper Game
uhhh i am new at this actionscript stuff but i want to know how you actionscript it so when the space bar is pressed you zoom into the frame and create a sniper scope that is corrolated to the mouse. then when space is pressed again you remove the scope and zoom out of the frame....
any help is appreciated thx!!!!!!

View Replies !    View Related
Flip Vertical Actioscript
Hello!

Is it possible to flip a movieclip vertically on stage with actionscript?

darth

View Replies !    View Related
Flash MX Actioscript Book
what would be the best book to recomend to someone just starting out with Flash MX

View Replies !    View Related
Slide Precison (looped Actioscript)
Hello.

I have this actionscript loop that makes a particular movieclip slide at the touch of a button. There are three different buttons that make it slide to 3 different positions. Unfortunately the movie slides lacking always one or two pixels from the pretended position.

I've used Math.round on the loop but it still gives me the same problem. Any ideas?

View Replies !    View Related
Changing Mask Size With Actioscript
I have a movieclip called "mc1" that's basicaly a masked imaged.
Also have an invisable button called "ib" that's on top of "mc1" which i would like to, on (mouseover), enlarge the mask in a specific way (for exemple,from 100x100px to 200x100px while moving to the left).
Is that possible with action script?

All i can do is something like this:

Code:
on (rollOver) {
_root.mc1.Xpos = -210;
_root.mc1.gotoAndPlay(2);
}
on (rollOut) {
_root.mc1.Xpos = -210;
_root.mc1.gotoAndPlay(21);
}
Attached to "ib"
and...

Code:
onClipEvent (load) {
Xpos = -210;
}
onClipEvent (enterFrame) {
Xa = _root.mc1._x;
Xdiff = Xpos-Xa;
Xmove = Xdiff/7;
_root.mc1._x = Xa+Xmove+50;
}
attached to "mc1"

"mc1" has a moving mask that goes from mc1._frame(1) to mc1._frame(20) enlarging the "view" of the picture and from mc1._frame(21) to mc1._frame(40) shrinking the view in the exact same (but opposite) way.

The it is, it's working good, but not perfect, the only possible way to be perfect is "actionscripting" the mask size-transforming behavior.

Could any one help me with that?
I could place here the fla if my writing communication skills are not so good...
Best regards and thanks to all.

View Replies !    View Related
Problem With Sound Play And Actioscript
Hi.
I have a problem with the sounds and action script.
In my library, there is a sound (Submarine.aiff), sound I have exported for actionscript in the linkage property window, with the indentifier "Submarine".

In one of my scripts, I put this :

mySound.attachSound("Submarine");
mySound.start();

but it doesn't work.

If some one can help me...

Bob

View Replies !    View Related
Simple Actioscript To Javascript Question
I have a flash movie, and an .html file:

myMovie.swf
myPage.html

I have a button in my flash movie that has the following code:


Code:
on (press) {
getURL ("javascript:setHome()");
}


In my html page, I have the following code:


Code:
<script type="text/javascript">
function setHome() {
if (document.getElementById && document.all) {
var obj = document.getElementById('home');
obj.style.behavior='url(#default#homepage)';
obj.setHomePage('http://www.mywebpage.com');
}
}
</script>


Can anyone see why this wouldn't be working ?. The only thing I can think of is that I have just installed the latest Windows XP service pack - Service Pack 2 - and now it doesn't work (it did before this)

Can anyone please advise

Thanks,
Stephen.

View Replies !    View Related
A Small Actioscript Problem With MovieClip
I want a movieclip/button instance to blink in my movie, for this I am using the
_alpha property. I put this script in the time line of the movieclip/button but it doesn't seems to work ...?? The script is:
(I expect the _alpha of the clip to be 100)

onClipEvent(enterFrame){
if(this._alpha > 99){
this._alpha -= 1;
}
if(this._alpha < 50){
this._alpha += 1;
}
}

It would be great if anyone can suggest a function for it

View Replies !    View Related
Flash 5 ActioScript Help - Deep Programming
Hi all,

I have this animation (card game) at http://hroriz.klosterquelle.org and I got the following problem: there are 4 decks: COD, MAD, MOI and the red deck. In order to pop a card from any of the 3 first decks it is mandatory to click on the red deck first, so that one red card pops out. All cards are numbered from 1 to 9 (01-09). One used card cant be popped again - how can I make it??? I tried arrays but somehow the animation hangs. I appreciate any ideas you got.

thnx

just in case, the code:
***
code for clicking one deck (one deck objects in the main timeline):

on (release) {
if (oneDIfaPopped == true) {
linkFromCard = false;
if (pos1Occupied == false) {
tellTarget (cod) {
_root.pos1Occupied = true;
gotoAndPlay (2);
}
}else {
if (pos2Occupied == false) {
tellTarget (cod2) {
_root.pos2Occupied = true;
gotoAndPlay (2);
}
}else {
if (pos3Occupied == false) {
tellTarget (cod3) {
_root.pos3Occupied = true;
gotoAndPlay(2);
}
}
}

}
}
}
****
variables declaration on the main timeline:

play ();
waitTime = 0;
CoD09used = false;
CoD08used = false;
CoD07used = false;
CoD06used = false;
CoD05used = false;
CoD04used = false;
CoD03used = false;
CoD02used = false;
CoD01used = false;
MaD09used = false;
MaD08used = false;
MaD07used = false;
MaD06used = false;
MaD05used = false;
MaD04used = false;
MaD03used = false;
MaD02used = false;
MaD01used = false;
MOI09used = false;
MOI08used = false;
MOI07used = false;
MOI06used = false;
MOI05used = false;
MOI04used = false;
MOI03used = false;
MOI02used = false;
MOI01used = false;

oneDIfaPopped = false;

pos1Occupied = false;
pos2Occupied = false;
pos3Occupied = false;

codArray = new Array(9);

codArray
= 1;
codArray[1] = 2;
codArray[2] = 3;
codArray[3] = 4;
codArray[4] = 5;
codArray[5] = 6;
codArray[6] = 7;
codArray[7] = 8;
codArray[8] = 9;

session = "";

link = 0;
linkFromCard = false;
*****

code on the objects that are pops and turns:

if ((CoD09used == true) && (CoD08used == true) && (CoD07used == true) && (CoD06used == true) && (CoD05used == true) && (CoD04used == true) && (CoD03used == true) && (CoD02used == true) && (CoD01used == true)) {
// do nothing
trace("sux");
} else {
if (_root.linkFromCard == false) {
cardCOD = random(9)+1;
element = cardCOD;
if ((element == 1) && (_root.CoD01used == true)) {
trace("sux1");
} else {
if ((element == 2) && (_root.CoD02used == true)) {
trace("sux2");
} else {
if ((element == 3) && (_root.CoD03used == true)) {
trace("sux3");
} else {
if ((element == 4) && (_root.CoD04used == true)) {
trace("sux4");
} else {
if ((element == 5) && (_root.CoD05used == true)) {
trace("sux5");
} else {
if ((element == 6) && (_root.CoD06used == true)) {
trace("sux6");
} else {
if ((element == 7) && (_root.CoD07used == true)) {
trace("sux7");
} else {
if ((element == && (_root.CoD08used == true)) {
trace("sux8");
} else {
if ((element == 9) && (_root.CoD09used == true)) {
trace("sux9");
} else {
trace("sux10");
}
}
}
}
}
}
}
}
}

} else {
CODLinks(_root.link);
}

if ((cardCOD == 1) && (_root.CoD01used == false)) {
trace(_root.cod01used);
_root.CoD01used = true;
trace(_root.cod01used);
gotoAndPlay ("CoD01");
}

if ((cardCOD == 2) && (_root.CoD02used == false)) {
trace(_root.cod02used);
_root.CoD02used = true;
trace(_root.cod02used);
gotoAndPlay ("CoD02");
}

if ((cardCOD == 3) && (_root.CoD03used == false)) {
trace(_root.cod03used);
_root.CoD03used = true;
trace(_root.cod03used);
gotoAndPlay ("CoD03");
}

if ((cardCOD == 4) && (_root.CoD04used == false)) {
trace(_root.cod04used);
_root.CoD04used = true;
trace(_root.cod04used);
gotoAndPlay ("CoD04");
}

if ((cardCOD == 5) && (_root.CoD05used == false)) {
trace(_root.cod05used);
_root.CoD05used = true;
trace(_root.cod05used);
gotoAndPlay ("CoD05");
}

if ((cardCOD == 6) && (_root.CoD06used == false)) {
trace(_root.cod06used);
_root.CoD06used = true;
trace(_root.cod06used);
gotoAndPlay ("CoD06");
}

if ((cardCOD == 7) && (_root.CoD07used == false)) {
trace(_root.cod07used);
_root.CoD07used = true;
trace(_root.cod71used);
gotoAndPlay ("CoD07");
}

if ((cardCOD == && (_root.CoD08used == false)) {
trace(_root.cod08used);
_root.CoD08used = true;
trace(_root.cod08used);
gotoAndPlay ("CoD08");
}

if ((cardCOD == 9) && (_root.CoD09used == false)) {
trace(_root.cod09used);
_root.CoD09used = true;
trace(_root.cod09used);
gotoAndPlay ("CoD09");
}
}

stop ();

function CODLinks (destinationCard) {
if (destinationCard == 1) {
cardCOD = 1;
} else {
if (destinationCard == 2) {
cardCOD = 2;
} else {
if (destinationCard == 3) {
cardCOD = 3;
} else {
if (destinationCard == 4) {
cardCOD = 4;
} else {
if (destinationCard == 5) {
cardCOD = 5;
} else {
if (destinationCard == 6) {
cardCOD = 6;
} else {
if (destinationCard == 7) {
cardCOD = 7;
} else {
if (destinationCard == {
cardCOD = 8;
} else {
if (destinationCard == 9) {
cardCOD = 9;
} else {
cardCOD = random(9)+1;
}
}
}
}
}
}
}
}
}
_root.linkFromCard = true;
gotoAndPlay (2);
}

View Replies !    View Related
Simple Actioscript To Javascript Question
I have a flash movie, and an .html file:

myMovie.swf
myPage.html

I have a button in my flash movie that has the following code:


Code:
on (press) {
getURL ("javascript:setHome()");
}
In my html page, I have the following code:


Code:
<script type="text/javascript">
function setHome() {
if (document.getElementById && document.all) {
var obj = document.getElementById('home');
obj.style.behavior='url(#default#homepage)';
obj.setHomePage('http://www.mywebpage.com');
}
}
</script>
Can anyone see why this wouldn't be working ?. The only thing I can think of is that I have just installed the latest Windows XP service pack - Service Pack 2 - and now it doesn't work (it did before this)

Can anyone please advise

Thanks,
Stephen.

View Replies !    View Related
Activation Mechanism For Flash Exe Via Actioscript
I intend to develop and sell a flash app that will be distributed as an EXE.
I'm thinking about a mechanism to activate the app once a user pays for it
and then tie the activated copy to the user's machine..
Is there a way, using actionscript or any other flash mechanism, to

1- grab a unique ID of some sort of the user's machine (e.g. partial windows' product ID and or partial motherboard product ID)
2- store that value in the registry.

The idea is, if the user moved his copy of the app to another machine, he'd not be able to use the app.
thanks in advance.

View Replies !    View Related
Simple Actioscript To Javascript Question
I have a flash movie, and an .html file:

myMovie.swf
myPage.html

I have a button in my flash movie that has the following code:


Code:
on (press) {
getURL ("javascript:setHome()");
}
In my html page, I have the following code:


Code:
<script type="text/javascript">
function setHome() {
if (document.getElementById && document.all) {
var obj = document.getElementById('home');
obj.style.behavior='url(#default#homepage)';
obj.setHomePage('http://www.mywebpage.com');
}
}
</script>
Can anyone see why this wouldn't be working ?. The only thing I can think of is that I have just installed the latest Windows XP service pack - Service Pack 2 - and now it doesn't work (it did before this)

Can anyone please advise

Thanks,
Stephen.

View Replies !    View Related
GetBytesTotal For An Imaged That Is Loaded Into The Scene Using ActioScript?
is this possible...


i'm creating a very graphics intence website..

i dont want all the pcitures to load with the flash movie..

but as each one is requested i want to load it into a movie..


i know this part, it works... but can i somehow make a little preloader every time a new image is called.!!?!?!


i was thinking getBytesTotal and getBytesLoades, but i dont know how to apply that when loading a jpg into the scene.?

View Replies !    View Related
Noob - Listbox Population Trough Actioscript
ok, this is a stupid question but i need to know it;

i use mx2004pro and i got a mx file with listboxes that need to be populated dynamically.

how can i add a listbox item trough actionscript(mx component, not 2004) and update it.

thx a million

View Replies !    View Related
Applying Blur Filter With Actioscript On Carousel Menu
Hi all..

I made a carousel-type of menu with a tutorial I once found about 3d manipulation with actionscript.

I apply this code on the rotating mc's


Code:


onClipEvent(load){
y=100;
speed=0;
radius=150;
xcenter=0;
ycenter=0;
zcenter=100;
angle=144;
fl=180;
}

onClipEvent(enterFrame){
z=Math.sin(angle*Math.PI/180)*radius+zcenter;
scale=fl/(fl+z);
x=Math.cos(angle*Math.PI/180)*radius;
_x=x*scale+xcenter;
_y=y*scale+ycenter;
_xscale= _yscale = scale*100;
angle+=speed;
_alpha=scale*100;
speed =(_root._xmouse-250)/150;
if(angle>359){
angle-=360;
}
}



Somewhere in the code you see this line

Code:

_alpha=scale*100;



This is used to give the MC an alpha color when it moves to the back and takes it away when it comes to the back. Giving the MC a sort of fade out in the mist effect.

Now I want to add a blur effect too. When the mc moves to the back give it a blur filter and take it away when it moves to the front.

I have no idea how to do this. I found this blur filter tutorial but I cant seem to connect the 2 set of codes together.


Code:


var myBlur = new flash.filters.BlurFilter(50,50,1);
var myTempFilters:Array = circle_mc.filters;
myTempFilters.push(myBlur);
circle_mc.filters = myTempFilters;



Can anyone help. Tnx

View Replies !    View Related
Tween Class: Can One Tween More Than One Property Using The Same Tween
I want to scale both the _xscale and the _yscale properties of a clip, using a single execution of the Tween Class. See example below:


Code:
import mx.transitions.Tween;
var myTween:Tween = new Tween(myMovieClip_mc, "_xscale", Strong.easeOut, myMovieClip_mc._xscale, 300, 5, false);

Since one property at a time must be passed as a string to the constructor, I tried the following code, but it does not work quite as flawless as I expected:


Code:
myTween.onMotionChanged = function() {
//trace( this.position );
myMovieClip_mc._yscale += (300 - myMovieClip_mc._yscale)/12;
};
Any suggestions?

View Replies !    View Related
[F8] Flash 5 To Flash 8 Actioscript Error
ok my english is not very well...
my problems is that this file not work on flash 8 when i change the publish seting...

ok i wnat to change to flash 8 because i want to put some effect in filtre blur or glow...

enyone know how to change that work on flash 8

View Replies !    View Related
Using Stop(); On A Shape Tween Of A Swapped Movie Clip Symbol Within A Motion Tween
Thanks a lot for your time. I'm new to actionscript, and language syntax and I never really got along to begin with so I appreciate any help in the matter.

Basically the title says it all - I made a motion tween in the main scene, made a movie clip symbol (to shape tween a gradient) and added a stop(); inside the gradient-tweened-symbol. I then swapped the movie clip symbol with the motion tween in the main scene, and got exactly the effect I wanted (the item moved, then tweened itself) but the stop(); seems to have no effect.

I know this looks like one of those "that idiot didn't google before posting" questions, but I've been looking for about a half hour with different permutations of stop, doesn't work, actionscript, and flash, and I haven't found anything that seems to target this problem specifically.

If you've got any idea what's going wrong, please feel free to respond or show me how to better seek help on my own. Thanks again.

View Replies !    View Related
Tween Class If Moved Mc Passed Point Start Another Tween
Hey Actionscript Gurus

Now I am using the Tween Class to move some boxes in my movie, now I can move the first mc and then another mc after the first tween has finished with onMotionFinished but I was hoping someone could help with how do I start the second tween when the first mc has passed a certain _x coordinate.

ie starting the second mc moving while the first tween is still moving.

I am trying to do a intro loader for my front page controlling around 7 boxes. So I need to repeat this a few times.

Regs,
Jacko

View Replies !    View Related
Tween Class If Moved Mc Passed Point Start Another Tween
Hey Kirupa Flash Gurus

Now I am using the Tween Class to move some boxes in my movie, now I can move the first mc and then another mc after the first tween has finished with onMotionFinished but I was hoping someone could help with how do I start the second tween when the first mc has passed a certain _x coordinate.

ie starting the second mc moving while the first tween is still moving.

Regs,
Jacko

View Replies !    View Related
Laco Tween Engine Versus Flash Native Tween
i am wondering if there is a way to put a delay (seconds) on the flashs' native tween class like you can on the laco tween engine... such as

Code:
#include "lmc_tween.as"
my_mc.tween("_x",100,1,"easeOutStrong",1.5,callbackFunction)
where "1.5" is would be the one and a half second delay before the tween starts. this is very useful to me because i dont have to use a callback function or an onMotionFinished function to start a new tween.

thanks in advance to anyone who can teach me

-frankf

View Replies !    View Related
Tween Class Scaling Breaks Motion Tween?
I have a movie clip which uses a motion guide to animate the entry (and eventually the exit) of a bunch of other movie clips. These smaller clips contain buttons, and animate on rollOver and rollOut using the following code:


Code:
on(rollOver) {
this.swapDepths(2);
ParentxScale = new mx.transitions.Tween(this, "_xscale", mx.transitions.easing.Back.easeOut, this._xscale, 100/.6, .5, true);
ParentyScale = new mx.transitions.Tween(this, "_yscale", mx.transitions.easing.Back.easeOut, this._yscale, 100/.6, .5, true);
play();
}
on(rollOut) {
ParentxScale = new mx.transitions.Tween(this, "_xscale", mx.transitions.easing.Bounce.easeOut, this._xscale, 100, .5, true);
ParentyScale = new mx.transitions.Tween(this, "_yscale", mx.transitions.easing.Bounce.easeOut, this._yscale, 100, .5, true);
stop();
}
However, once an object has been moused over, it doesn't exit with the others. Any ideas why it seems to "fall off the track" of the motion guide?

View Replies !    View Related
Diference Between Motion Tween And Shape Tween
What exactly is the difference between a motion tween and a shape tween?

View Replies !    View Related
What's The Best Way To Do A Motion Tween And A Shape Tween At The Same Time?
Hi all,

I'm having some difficulty doing this. I have tried motion tweening a movie clip containing a shape tween but it just doesn't look right. Anybody have any ideas?

Cheers

View Replies !    View Related
Do I Use A Shape Tween? Mask? Motion Tween?
How do I make this arrow grow into shape? I want it to slowly appear...but not fade in...

it's hard to explain...but here is the arrow, hopefully you will understand what I want...

I tried using a mask, but instead of revealing the arrow little by little, it dissapeared little by little...(basically the exact opposite)...

I also tried putting a white box over it & motion tweening the box to reveal the arrow...but that didn't look good...


any ideas?...suggestions?

thanks in advance...

View Replies !    View Related
What's The Difference Between A Shape Tween And A Motion Tween?
Hi!
I just wanted to ask that what is the difference between a shape tween and a motion tween???

Not to bother you.

please reply me back

View Replies !    View Related
[MX04] Shape Tween And Motion Tween
Why do Flash doesn't allow ungrouped objects into motion tween and symbols into shape tween?

View Replies !    View Related
After Tween, Jump To New Frame (using Tween Class)
I need some help with using the tween class (among other things).

See my attached test file. It's clearer than my description.

You're supposed to be able to click the "next" or "prev" buttons and see the movie clip move forwards or backwards. It works, but only on the first click of the button. After the initial click I need the timeline to jump to frame label "2", and after the second click I need the timeline to jump to frame label "3", and so on, so that I can implement a new set of perameters. Is that clear? I'm so annoyed with this. Please help!

Thanks.

View Replies !    View Related
Tween Class Problem. Tween Freeze?
I am using the tween class to do an alpha tween on some jpgs that get loaded into a movieclip. Everything thing works great until the user rapidly clicks on the 'next' arrow to jump forward to a new picture. If the user clicks too quickly something happens and the tween function stops working.

Here is the tween code:

Code:
//set up tweening
import mx.transitions.easing.*;
import mx.transitions.Tween;
var tweenAlpha:Tween;
function alphaTween(object,duration){
easeType = mx.transitions.easing.Regular.easeIn;
tweenAlpha = new mx.transitions.Tween(object, "_alpha", easeType, 0, 100, duration, true);
}
http://12dogsofchristmas.com/12_dogs_menu2.swf

You'll notice that if you click slowly on the arrows the pictures load correctly with the story. However, if you click fast they stop tweening.

thanks for the help.

View Replies !    View Related
Change From Motion Tween To Shape Tween
I am trying to have a motion tween of some text move on the page and then change into a shape (i.e, a shape tween). I can't seem to make this work. I put a keyframe at each end of the motion tween and that works fine. Then I add another keyframe, delete the text and replace it with my shape. Then I select just those frames and add the shape tween but nothing happens. How do I accomplish this successfully?

Thanks.

View Replies !    View Related
Shape Tween / Motion Tween Problem
I must be missing something very obvious.

I have created a movie that draws a box, fills in the box with color and then is supposed to have the menu swoop in from the right. Mind you this is for learnnig, not cosmetic appeal Why is it when I use tweens I get the dotted line versus a solid line in the time line?

If you take a peek at the FLA it is obvious what I am referring to. I must be using the tween function or symbols in an improper manner.

I have attached the FLA.
Any help appreciated.
Thanks,
Kerry
www.skurz.com

View Replies !    View Related
Tween.stop(). Part Of The Tween Class?
I need to know if tween.stop() is part of the Tween class in Flash 8 or if it's related to an extension I installed (ie. TweenExtended).

View Replies !    View Related
How To Programmatically Begin A Tween When Another Tween Ends?
Hey everybooody,

In this example, I'm trying to programmatically fade-in the alpha of menu items created from xml data. Using the tween object, I'm trying to start the next tween once the first or previous tween has finished.

Clearly in my attempt below, the “if” statement isn't cutting it because it's not waiting for the tween to be finished.

Using the oListener.onMotionFinished method, I tried using a Boolean to return true when finished, and then to start the next tween. But clearly I haven’t figured out the proper control flow for this.

I also tried a 'do while' statement, attempting to creating a waiting-loop until the bCheck returned true, but that just created a series of open loops, and crashed the program.

The big problem here is that I'm trying to figure out how to do this while looping through an array of menu items, so that I triggure the fade in of each menu item...



Has anyone had experience with this? Thanks!!!

Here's what I was trying to do:

function fadein_menu() { var bCheck:Boolean = false;
var oListener:Object = new Object();
oListener.onMotionFinished = function(twObject:Tween):Void {
bCheck=true;
};
for (var i = 0; i<totalMenuItems; i++) {if (i==0) {var twMenuAlpha:Tween = new Tween(menuitems[i], "_alpha", Strong.easeIn, 0, 100, 3, true);
twMenuAlpha.addListener(oListener);
} else if (i>0) {if (bCheck==true) {bCheck=false;
var twMenuAlpha:Tween = new Tween(menuitems[i], "_alpha", Strong.easeIn, 0, 100, 12, true);
twMenuAlpha.addListener(oListener);
};
};
};
};

View Replies !    View Related
Tween Class Not Always Fulling Complete Tween
I have a switch statement that is a part of the tween effects found on the header of http://gfxcomplex.com/blog.

the problem is this case will change the rotation of a sprite and then tween it to zero. The funny thing is some times ("not all the time") some of the tween stop in the middle and do not complete leaving the sprite with a rotation somewhere in the middle of 180 to 0. My question is, is there something in my code that could be the reason for this or is this a bug??

You may have to watch the header for a long time to see this bug happen as it seems to be more a fluke then a true code bug.


PHP Code:



case 7 :            var u:uint = 0;            test1.getChildAt(0).rotation = 180;            test1.getChildAt(1).rotation = 180;            test1.getChildAt(2).rotation = 180;            test1.getChildAt(3).rotation = 180;            test1.getChildAt(4).rotation = 180;               intervalId = setInterval(function myFunction(){                                                          myTween1 = new Tween(test1.getChildAt(u), "rotation", Bounce.easeOut, 180, 0, 3, true);                                                          u++;                                                          if(u == 5){                                                                                                                      clearInterval(intervalId);                                                                                                                        }                                                          },                                                          150);break; 

View Replies !    View Related
Shape Tween / Motion Tween Problem
I must be missing something very obvious.

I have created a movie that draws a box, fills in the box with color and then is supposed to have the menu swoop in from the right. Mind you this is for learnnig, not cosmetic appeal Why is it when I use tweens I get the dotted line versus a solid line in the time line?

If you take a peek at the FLA it is obvious what I am referring to. I must be using the tween function or symbols in an improper manner.

I have attached the FLA.
Any help appreciated.
Thanks,
Kerry
www.skurz.com

View Replies !    View Related
Seperating Motion Tween From Alpha Tween
I am trying to fade in the alpha on a graphic symbol rather quickly at the same time the symbol scrolls very slowly up the stage, but the two seem linked, so that a very slow scroll means a very slow opacity gain. How can I fade the photo in quickly while the photo motion tweens slowly?

View Replies !    View Related
Laco Tween Pause/Stop Tween
Hi There,

I am using laco tween to move dynamic text that is taken from XML. I need the text to pause when the user rollsover the text, is there anyway of using the stopTween() function, then on rollOut getting flash to continue with the tween?

Thanks.

Dabush

View Replies !    View Related
Jerky Tween- How To Get A Smooth Slow Tween- Help
I'm working with a very slow tween of an image (800 by 350px and 50 kb) over a time of 60 seconds and it's jerky.

Code:

Tweener.addTween(pic, {x:pic.x-100, time:60, transition:"linear"});

I tried upping the frame rate to 30, then 60, but it didn't seem to make a difference.

I also tried using TweenLite, Tweener, and the built-in Tween class. None really performed better than the other. Another thing I tried was importing the image as a swf, masking it, and then tweening it. None of those really made a difference, still jerky.

Any ideas?

View Replies !    View Related
How To Motion Tween Thats Not Linear Using Script Or MC Tween?
If you wanted to do an animation of a ball that goes from A to B but not linear, how would you do it by code or Mc tween. How would you make the ball go in a curve line for example instead of a straight line from A to B?

I understand you can use a guide to get all types of non linear motion tweens on a timeline, but how would you do it using MC tween or coding.

View Replies !    View Related
Motion Tween & Shape Tween In Same MC? How?
I have created a shape tween on my first layer. On my second layer I would like to create a motion tween. But the motion tween says it will not occur with layers with shapes or more than one group. Can anybody enlighten me a little bit on this.


Thanks for any help that is given.

Derek

View Replies !    View Related
Make Exit Tween Do Into Another Tween
okay here's the deal. for every button i have on a flash menu. i have a lil animation tween that plays when the specific button it's set for it clicked on.

what i would like to do is add an exit tween for each of these animations that does the reverse of the animation before starting up the new animation.

now... this could probably be done using gotoandplay actionscript with frame labels, but i would have to make special sets of buttons for each section...

is there another easier why for the button to play the exit tween when pressed then go to the tween of whatever button was pushed??

please let me know...

K-Fresh

View Replies !    View Related
Tween Class Vs Custom Tween?
I have searched for info on the Tween class, gave up when I found little to nothing on it, so here I am with some questions.

1 - Can I use this class in MX 2004 or is it in 8 only? If so, what is the invocation script?

2 - How flexible is the easing of the Tween class? Can it do more than just fast/slow in/out (fully customizable time curves)?

3 - Can you specify a finite amount of time in which the current invocation of Tween must be completed, or do you have to calculate and apply values to enforce this?

Thanks,
+Q__

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved