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




Spinning Menu With Background (actionscript Or Tweening?)



how do I achieve this effect in flash6 with actionscript? do you have to tween to get the effect of the pictures moving in the background? to see the effect, go to:

http://www.flyingbaboon.com/
then choose the flash site (duh), click enter (double duh),
then go to the photos section.

I know you can probably do it with a movie and setting a variable to 0 or 1 depending on the mouse position and make the movie advance to the next or previous frame depending on the value. that's the easy way (I think). is there a way to do it without the tween?? I gotta know! thanks!



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 10-24-2002, 05:56 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Xml Menu - Tweening Actionscript
I'm building a movie that creates a vertical menu from an xml file - with one level of submenus.

When the submenu shows i'd like the options below to tween to the next position (and ease in) rather than just go there immediately.

I'm having a lot of difficulty doing this!



here's the function that shows the submenu..

function submenuShow() {
resetMenu();
name = "subItemClip"+(choice-1);
subMenuItem = menuItem[choice-1].childNodes
if (subMenuItem.length>=1) {
for (n=0; n<=subMenuItem.length; ++n) {
this[name+n]._visible = true;
}
this["itemClip"+(choice)]._y = this[name+(n-2)]._y+20;
for (j=choice+1; j<=menuItem.length; ++j) {
this["itemClip"+j]._y = this["itemClip"+(j-1)]._y+20;
}
}
}

thought that i could change the bottom few lines to -

for (j=choice+1; j<=menuItem.length; ++j) {
this["itemClip"+j].finalPos = this["itemClip"+(j-1)]._y;
this["itemClip"+j].onEnterFrame=function() {
this._y = (this.finalPos-this._y)/2;
}
}

but it doesn't work!!

..any of you got any ideas?

cheers

fil

Need Actionscript Help (Menu, Easing, Tweening, Active Item, Etc)
I need some help with this one. It works upon first click and then it goes haywire. Here's what's supposed to happen.

RollOver = Scale to 150% and change Alpha to 100%
RollOut = Scale back to 100% and change Alpha to 60%
Release = Scale back to 100% and change Alpha to 100% and reset all other buttons' alpha to 60%

Additionaly, I need to figure out an easy way to apply actions to these buttons individually while still using a succint script such as the one i'm working on here. Any ideas to make this script more to the point and dynamic so that I would only have to enter the name of each button once and the name of it's link or action once would be great! I'd like to make this an easily reusable script.

This is a Flash 8 File
http://bradlyjon.com/MENU.fla



Code:
// BUTTONS //////////////////////////////////////////////////

home_btn.onRollOver = over;
home_btn.onRollOut = out;
home_btn.onRelease = clicked;

about_btn.onRollOver = over;
about_btn.onRollOut = out;
about_btn.onRelease = clicked;

projects_btn.onRollOver = over;
projects_btn.onRollOut = out;
projects_btn.onRelease = clicked;

contact_btn.onRollOver = over;
contact_btn.onRollOut = out;
contact_btn.onRelease = clicked;

// FUNCTIONS //////////////////////////////////////////////////

import mx.transitions.Tween;
import mx.transitions.easing.*;

function over() {
if(this != _root.activeMenu) {
new Tween(this, "_alpha", Regular.easeIn, 60, 100, 5, false);
new Tween(this, "_yscale", Strong.easeOut, 100, 150, 1, true);
new Tween(this, "_xscale", Strong.easeOut, 100, 150, 1, true);
}}
function out() {
if(this != _root.activeMenu) {
new Tween(this, "_alpha", Regular.easeIn, this._alpha, 60, 5, false);
new Tween(this, "_yscale", Bounce.easeOut, this._yscale, 100, 1, true);
new Tween(this, "_xscale", Bounce.easeOut, this._xscale, 100, 1, true);
}}
function clicked() {
if(this != _root.activeMenu) {
new Tween(this, "_alpha", Regular.easeIn, this._alpha, 100, 10, false);
new Tween(this, "_yscale", Regular.easeOut, this._yscale, 100, 10, false);
new Tween(this, "_xscale", Regular.easeOut, this._xscale, 100, 10, false);

new Tween(_root.activeMenu, "_alpha", Regular.easeIn, this._alpha, 60, 1, true);
_root.activeMenu = this;
}}

Looking For A Spinning Penny Gif With Black Background
Hi i thought i would see if anyone has a spinning penny with a solid black background. I would like it to be about an inch and a half tall. Just seeing if anyone has one or know were i can find one. THanks

Im searching the web right now.

Spinning Menu Help..
what i want to make is a spirial 2d menu that spins and when rolledover stops so that the user can choose from 4 different buttons but continues to spin once left, ive been working on it for 2 hours and keep running into problems: i made a wheel with the four buttons on it and grouped it and converted it to a button whereas i put a spinning wheel (movie)in the "up" and left the frame empty for the "over" so that it would disappear when the user rolledover it but now the buttons dont work.. is there a better way to do this or am i missing something? thanks for the help!

Spinning Menu
Hi everyone,

Right, I'm currently trying to build my own website and have designed it to have this menu.

http://www.swishzone.com/index.php?a...d&link_id=2320.

Does anyone know the coding for it or know where i could find it as Im completely stuck, I've seen the link above but I can't get it to work. Thanks in advance for any help.

Matt

Spinning Menu Woes
Hey guys - having a serious problem with something here - I have a spinning carousel menu which I got from a tutorial at gotoandlearn.com.

I've got the menu to work prefectly, however I need to insert an object in the middle of the menu, so that it looks like the menu is spinning around this object.

Obviously, if I just put the object in there, then the whole menu stays on top of it. I would like to know if it's possible to make it so that the objects which are farthest at the back swap depths with the object I want them to spin around, so that they actually go behind it completely....... Anyone got any ideas? here is the code:


Code:
import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;

var numOfItems:Number;
var radiusX:Number = 300;
var radiusY:Number = 75;
var centerX:Number = Stage.width / 2;
var centerY:Number = Stage.height / 2;
var speed:Number = 0.05;
var perspective:Number = 130;
var home:MovieClip = this;
theText._alpha = 0;

var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
tooltip._alpha = 0;

var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
{
var nodes = this.firstChild.childNodes;
numOfItems = nodes.length;
for(var i=0;i<numOfItems;i++)
{
var t = home.attachMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.toolText = nodes[i].attributes.tooltip;
t.content = nodes[i].attributes.content;
t.icon.inner.loadMovie(nodes[i].attributes.image);
t.r.inner.loadMovie(nodes[i].attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
}
}

function over()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sover");
sou.start();

home.tooltip.tipText.text = this._parent.toolText;
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
home.tooltip._alpha = 100;
}

function out()
{
delete home.tooltip.onEnterFrame;
home.tooltip._alpha = 0;
}

function released()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sdown");
sou.start();

home.tooltip._alpha = 0;
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
t.xPos = t._x;
t.yPos = t._y;
t.theScale = t._xscale;
delete t.icon.onRollOver;
delete t.icon.onRollOut;
delete t.icon.onRelease;
delete t.onEnterFrame;
if(t != this._parent)
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
}
else
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,100,1,true);
var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,320,1,true);
var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
theText.text = t.content;
var s:Object = this;
tw.onMotionStopped = function()
{
s.onRelease = unReleased;
}
}
}
}

function unReleased()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sdown");
sou.start();

delete this.onRelease;
var tw:Tween = new Tween(theText,"_alpha",Strong.easeOut,100,0,0.5,true);
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
if(t != this._parent)
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
}
else
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,100,t.theScale,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
tw.onMotionStopped = function()
{
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
t.icon.onRollOver = Delegate.create(t.icon,over);
t.icon.onRollOut = Delegate.create(t.icon,out);
t.icon.onRelease = Delegate.create(t.icon,released);
t.onEnterFrame = mover;
}
}
}
}
}


function moveTip()
{
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
}

xml.load("icons.xml");

function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = (this._y - perspective) /(centerY+radiusY-perspective);
this._xscale = this._yscale = s*100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
}

this.onMouseMove = function()
{
speed = (this._xmouse-centerX)/5500;
}
Also, here is a link to the menu, direct from gotoandlearn.com:

www.gotoandlearn.com/files/carousel3.zip

Thanks in advance!

Spinning Menu Navigation How ?
I want to create a spinning circle - kind of like wheel of fortune or the new diesel experience site. Where if you mouse over the wheel spins or maybe you click and the wheel spins and stops on radom part then you click to go to that section? any tutorial on something similar?

thx

Need A Genius To Help With A Spinning Menu
Hey guys - having a serious problem with something here - I have a spinning carousel menu which I got from a tutorial at gotoandlearn.com.

I've got the menu to work prefectly, however I need to insert an object in the middle of the menu, so that it looks like the menu is spinning around this object.

Obviously, if I just put the object in there, then the whole menu stays on top of it. I would like to know if it's possible to make it so that the objects which are farthest at the back swap depths with the object I want them to spin around, so that they actually go behind it completely....... Anyone got any ideas? here is the code:


Code:
import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;

var numOfItems:Number;
var radiusX:Number = 300;
var radiusY:Number = 75;
var centerX:Number = Stage.width / 2;
var centerY:Number = Stage.height / 2;
var speed:Number = 0.05;
var perspective:Number = 130;
var home:MovieClip = this;
theText._alpha = 0;

var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
tooltip._alpha = 0;

var xml:XML = new XML();
xml.ignoreWhite = true;

xml.onLoad = function()
{
var nodes = this.firstChild.childNodes;
numOfItems = nodes.length;
for(var i=0;i<numOfItems;i++)
{
var t = home.attachMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.toolText = nodes[i].attributes.tooltip;
t.content = nodes[i].attributes.content;
t.icon.inner.loadMovie(nodes[i].attributes.image);
t.r.inner.loadMovie(nodes[i].attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
}
}

function over()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sover");
sou.start();

home.tooltip.tipText.text = this._parent.toolText;
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
home.tooltip._alpha = 100;
}

function out()
{
delete home.tooltip.onEnterFrame;
home.tooltip._alpha = 0;
}

function released()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sdown");
sou.start();

home.tooltip._alpha = 0;
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
t.xPos = t._x;
t.yPos = t._y;
t.theScale = t._xscale;
delete t.icon.onRollOver;
delete t.icon.onRollOut;
delete t.icon.onRelease;
delete t.onEnterFrame;
if(t != this._parent)
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
}
else
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,100,1,true);
var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,320,1,true);
var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
theText.text = t.content;
var s:Object = this;
tw.onMotionStopped = function()
{
s.onRelease = unReleased;
}
}
}
}

function unReleased()
{
//BONUS Section
var sou:Sound = new Sound();
sou.attachSound("sdown");
sou.start();

delete this.onRelease;
var tw:Tween = new Tween(theText,"_alpha",Strong.easeOut,100,0,0.5,true);
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
if(t != this._parent)
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
}
else
{
var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,100,t.theScale,1,true);
var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
tw.onMotionStopped = function()
{
for(var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i];
t.icon.onRollOver = Delegate.create(t.icon,over);
t.icon.onRollOut = Delegate.create(t.icon,out);
t.icon.onRelease = Delegate.create(t.icon,released);
t.onEnterFrame = mover;
}
}
}
}
}


function moveTip()
{
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
}

xml.load("icons.xml");

function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = (this._y - perspective) /(centerY+radiusY-perspective);
this._xscale = this._yscale = s*100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
}

this.onMouseMove = function()
{
speed = (this._xmouse-centerX)/5500;
}
Also, here is a link to the menu, direct from gotoandlearn.com:

www.gotoandlearn.com/files/carousel3.zip

Thanks in advance!

Help With Flash 3D Spinning Menu
url
http://avatarfashionpr.awardspace.com/rekasphotos.html

Hi there,
I'm pretty new to 3d in flash, and I'm working with a kirupa tutorial in the 'working with 3D in Flash' section, specifically, the 3d Spinning Menu. The issue I'm having is getting the Menu to display more than one Pane. I've created multiple movieclips to house the buttons for various photos, but the actionscript ignores all but the first movieclip. i.e., the menu displays and moves properly, but it only displays one slide (As you can see). What I want to do, obviously, is show all of the thumbnails (not seen, for obvious reasons) in this menu.

Here's the sourcecode, as it stands:

this.createEmptyMovieClip("theScene", 1);
theScene._x = 150;
theScene._y = 100;

objectsInScene = new Array();

focalLength = 500;
spin = 0;
displayPane = function(){
var angle = this.angle + spin;
var x = Math.cos(angle)*this.radius;
var z = Math.sin(angle)*this.radius;
var y = this.y;

var scaleRatio = focalLength/(focalLength + z);
this._x = x * scaleRatio;
this._y = y * scaleRatio;
this._xscale = this._yscale = 100 * scaleRatio;

this._xscale *= Math.sin(angle);
this.swapDepths(Math.round(-z));
};
angleStep = 2*Math.PI/8;
for (i=0; i < 8; i++){
attachedObj = theScene.attachMovie("pane", "pane"+i, i);
attachedObj.angle = angleStep * i;
attachedObj.radius = 100;
attachedObj.x = Math.cos(attachedObj.angle) * attachedObj.radius;
attachedObj.z = Math.sin(attachedObj.angle) * attachedObj.radius;
attachedObj.y = 40;
attachedObj.display = displayPane;
objectsInScene.push(attachedObj);
}
panCamera = function(){
spin -= this._xmouse/1000;
for (var i=0; i < objectsInScene.length; i++){
objectsInScene[i].display();
}
};
theScene.onEnterFrame = panCamera;
the version above is pretty unmodified from the kirupa source file (in fact, the source code above is cut and pasted from the tutorial. I had been working with the code and toying with the values and had it pretty decked out for the site, but when I got stuck on the display function, I made one too many modicfications and had to start over....

Attaching Link On End Of Spinning Menu
Hey,
I am trying to make a menu tree out of the attachment i have posted and need to figure out how to get links on the end of each limb.

The closest thing i can find to what i am trying to do can be found at http://muse.mu

Anyone have any ideas?

Can Someone Tewll Me How Do Achieve This Spinning Menu Please?
I want to use my own icons but I don't have lots of experience with actionscripting.. can anyone help please?
Thanks

sample is attached if someone cares to look!

Rotating Or Spinning Wheel Menu
I want to make a menu similar to the one used on this site: http://www.renaissance-movie.com/.
That's my personal goal for the day. I would love any tips, suggestions, or resources. Anyone?

I know it's going to use _rotation. The rest is not so clear.

Thanks for any help!

Actionscript 3 Random Spinning Wheel
Hello everyone,


I am new here and i am looking froward to learning a lot of AC3 from you all,
however i need some help i am trying to make a wheel of fortune type of game where when clicked it will randomly spin and land on whatever number. my problem is i have the code but its AS2 and i am only 3weaks into AS3 here is the code below can anyone convert it or write some new code? thank you in advance


Code:
function spinIt() {
var mc = this;
if (!mc.spinning) {
mc.spinning = true;
var easeType = mx.transitions.easing.Regular.easeOut;
var spinTime = Math.min(12.2, Math.max(2.12, ((getTimer() - mc.startTime) / 100)));
var endRot = Math.round((spinTime * 360) + (Math.random() * 360));
myTween = new mx.transitions.Tween(mc, "_rotation", easeType, mc._rotation, endRot, spinTime, true);
myTween.onMotionFinished = function() {
mc.spinning = false;
//trace("done");
};
}
}
wheel.spinning = false;
wheel.onPress = function() {
this.startTime = getTimer();
};
wheel.onRelease = spinIt;

Spinning Wheel In Actionscript And Stopping It Randomly
Hello everyone,

We are working on a project that involves a "wheel of fortune" type turning wheel. We got the wheel running off of a button, but you have to click the button to stop it. I would like to remove the button and have the wheel slow to a stop after maybe 8 seconds.

This script has been driving me crazy, and I would so appreciate somehelp. The script is below, and you can see an example of the flash here:

http://fscproductions.net/wheel/tester.htm

Thanks for the help in advance.

***The CODE***


stopFactor = .9;
startFactor = 1.1;
minSpeed = .1;
maxSpeed = 20;
speed = maxSpeed;
stopping = false;
//
function spin(){
this._rotation += speed;
}
function stopSpinning (){
stopping = true;
speed *= stopFactor;
this._rotation += speed;
if(speed < minSpeed){
speed = minSpeed;
delete this.onEnterFrame;
trace("stopped spinning");
}
}
function startSpinning (){
stopping = false;
speed *= startFactor;
this._rotation += speed;
if(speed > maxSpeed){
speed = maxSpeed;
this.onEnterFrame = spin;
trace("spinning at full speed");
}
}
//
// You need 2 clips on stage
// Spinner and MyButton
Spinner.onEnterFrame = spin;
MyButton.onRelease = function(){
if(stopping == false){
Spinner.onEnterFrame = stopSpinning;
}else{
if(speed<1) speed = 1;
Spinner.onEnterFrame = startSpinning;
}
}

Looping Background Without Timeline Tweening
You would think that this would be covered somewhere. I am trying to loop a clouds background without using any timeline tweening. All actionscript. Any tips?

Having Difficulties Trying To Change White Background Of Flash Menu Into Transparent Background
How would I best go about changing a Flash menu that currently has a white background into a Flash menu with a transparent background?

I want to take that menu (with a transparent background) and place it over a side-bar image that i've got in DW.

Any help/advice'd be greatly appreciated.

Vertical Menu W/ Tweening And Sub Menu
Can anyone point me towards any tutorials or source files with a menu like the one on this site - http://www.doberman.se ? Thanks!

Why Does My Menu Not Tweening?
i have this script:

this.onEnterFrame=function(){
_root.mcMenu._y -= 10;
if(_root.mcMenu._y >= -42){
_root.mcMenu._y = -42;
stop();
delete this.onEnterFrame;
}
};

it just jumps to the postiion _y = -42 but it it's not tweening

does somebody see the error ?

hope somebody can help me!

THNX ALREADY

Tweening With Actionscript?
Hi there,
I have made a movie that, when a button is in down posistion, it will tween a graphic 100 px to the right. And when rolled off of, it will tween it back to the original posistion. I can do this easly with tell targets and such, but after a while, it can really add up byte wise, so I'm trying it with Action script. Here is what i have so far

(in the button)

on (rollOver) {
setProperty ("_root.box", _x, "150");
}
on (rollOut) {
setProperty ("_root.box", _x, "50");
}

the thing is, I can only make it jump back and forth. I want it to actually tween over and tween back. Any ideas on how this can be accomplished. Remember that I am new to AS as well. Thanks
-MapexMitch

Actionscript Tweening...
Here's the situation...

I've got several movie clips, and upon a button push, the corresponding clip is supposed to slide to center stage... Only problem is, if I code any step value over 1, my clip just bounces around in the middle, since it never matches my center values...

Here's the important portion of my code from each movie's enterFrame event:

if (Math.round(_x)!=target_x || Math.round(_y)!=target_y) {
if (Math.round(_x)<target_x) { _x+=dx;
}
else if (Math.round(_x)>target_x) {
_x-=dx;
}
if (Math.round(_y)<target_y) {
_y+=dx;
}
else if (Math.round(_y)>target_y) {
_y-=dy;
}
}

*where target_y/target_x are my destination coordinates, and dx/dy is my increment speed...

Please let me know how I can clean this up...

Tweening With Actionscript ?
Is it possible to do a tweening with AS ?
Par Example a tween from _alpha=0 to to _alpha=100 .
Please help me.

Thanks a lot,


Flo

Tweening With Actionscript
Hey folks,
bit of a problem...does anyone know how to tween a MC up to a certain co-ordinate by clicking on a button while also moving another MC sideways to another co-ordinate by the same click?????

Is Actionscript Better At Tweening?
I've heard a few comments that using actionscript to have objects move may be smoother or less processor intense than using tweening? The BIG question, is that true?

IF it is true, how do I tell an object in frame 5 to move from x =100, y=100 to go to x=250, y=250 going from frame 5 to frame 10?


Thanks!

Tweening With Actionscript
I have a movieclip and a button. When the button is clicked, i execute a code that moves the MC down the height of the MC.

ex:

on(release) {

movieclip._y += movieclip._height;

}

This works but I want the movieclip to slide (tween) to the target location.

Is this possible? (it must be)

Thanks

Tony

Actionscript VS. Tweening...
I am new to Flash. But I have a basic understanding of OOP. My queestion is this: Is it better to have actionscript performing animation or motion tweening? Let's say I want to make a bogus equilizer where phoney bars move up and down to the sound of music that isn't playing. Is it better to make a MC where the bars are motion tweened or to use some elements in actionscript that can draw the lines and animate via code.

My guess is actionscript. It seems as though that would be better (more efficient) than using motion tweens. Is that correct? What do you guys think?

Does This Use Actionscript Or Is It Just Tweening?
Can someone tell me if the navagation system used on www.baltimoreravens.com is one that was done with a lot of tweening or is there an easier way using some scripting? The tweening just seems to be bulky and somewhat like overkill.

Actionscript Tweening?
Hi all. I am wondering how to do what must be a fairly simple effect. I have tried shape tweening and shape hints don't seem to be working for me. The effect looks kind of like origami or vector shapes unfolding into different shapes. Some of the trendier web designer page use this effect but I can't for the life of me think of one right now. Does anyone know what I am talking about?

Actionscript Tweening
can anybody give me the code to move something across the stage smoothly, and slow down as it reaches its end?? thanks in advance

Tweening Vs. Actionscript
i'm making an flash intro that uses a lot of simultaneous motion and alpha tweens. file size is not a problem, but the animation obviously slows down when more than 4 alpha tweens occur simultaneously on-screen.

can i avoid the slow down by using using actionscript to control the gradual alpha changes?

thanks!

Tweening With Actionscript
i'm making clouds go across the screen, but at the moment i'm using just using one movieclip with a huge timeline, like 2500 frames to do it. my movie runs at 25 frames per second but i want the clouds to be very slowly, unnoticed. i tried using a counter in actionscript and updating the x position of the cloud symbol, but this resulted in a jerky (stop start) movement rather than a smooth transition that tweening allows.

Tweening Using Actionscript...
Hi,

I recently downloaded tween.as script from http://www.yayhooray.com/thread/24683.html. This script will make it possible to change a property of a movie clip with one command. Here is a sample:

#include "tween.as"
MovieClip.tween("_alpha", 0, 3, undefined, 1);

But it does not work when I try to do multiple tweens for the same movie clip using the following code:

#include "tween.as"
MovieClip.tween("_alpha", 0, 3, undefined, 1);
MovieClip.tween("_alpha", 100, 3, undefined, 4);

Has anyone used this script before? If so, do you know how I could fix this problem...

thanks,

JG

Tweening Actionscript
what i have is an object moving back and forth in a tween(all in a movie clip) when the mc i clicked, i want the object to move up to the top of the screen. how would i do this so that the object tweens to the top? i do not know at what position the object would be at when tweened, so is there a way to get the xy coordinates or anything like that? thanks for your help

ie: fiahy swims back and forth in tank. when clicked, fishy floats to the top of the tanks, dead.

Actionscript Tweening
Hey all - I'm trying to tackle something I've never tackled before, and I would like some help. I have the plan of making a bunch of rollover movie clips, that when you rollover them they get larger and the others get smaller. Basically a menu with a bunch of buttons that are roll-over sensitive. However, this is basically impossible to get a smooth large-small tranform in the timeline for multiple buttons.

How would one approach this problem in actionscript? I've got 3 buttons, that I would like to slowly expand over one-two seconds when rolled over, and then go back to normal size when rolled-off. Thanks a lot!

Tweening With Actionscript.
I could use some help on how to tween a simple line with AS.

I have searched and found out how to make a line but i want it to tween from beeing a dot to becomming a line.

I´m using mx and if you could post some examples of script that would be great!

Tweening With ActionScript 2.0
How do I tell "btn_home" to move from point "a" to point "b" using actionscript instead of frame tweening?

Point "a" would be the initial position of the instance, and Point "b" would be the destination. Just a liner movement from the top of the stage to the middle of the stage ( or there about).

I've looked all over, but it appears the majority of the "gurus" have forgot how to keep it simple.

Thanks.

Scott.

Tweening With Actionscript.
Hi Everyone,

I have tried to do the following but i am having some problems......!

I want to tween a shape (using AS) by clicking on a button which is placed within a movie clip.
The code works only if the button is not placed within the movie clip.
I probably need an identifier like "parent", "root" or maybe "global" in order to make the button work even if it is within the MC.

I have attached the example that i am working on.

Any help appreciated.

Chris.

Tweening With Actionscript
Hey people,

I got this script from gotoandlearn.com (which is offline right now) but i cant figure out how to get it working the way i want... any help?

Im using flash 8 so sometimes its coming up with problems loading the mx easing/tween transitions in the script when i add my own graphics in

Im sure this is very simple but im not sure how to change it to suit an OnRollOver event... It was originally for onRelease

basically I'd like to have a button and on RollOver it to scale up with a bouce effect... and drop back down again on RollOut and also to add two more buttons too...

I'd also like to be able to change the effects too... by changing the values

can anybody please help as Ive spent aaaaages searching this forum for an answer....... Ive come across similar but not exactly what i need...

thanks

Gar

(see attached fla)

Actionscript Or Tweening
Hi,

I've been using flash for a while but i've always done my animation by tweening.

I'm now starting to use actionscript.

I can do simple stuff like moving an object from one place to another and I do like the smoothness you get with actionscripts.

My question is if you have different objects on the stage how do you get them to move at different times. Do i still need to use the timeline or is there other ways of doing this.

I hope my question is clear.

Tweening With Actionscript
I have a movieclip masked in a window, with about 10 button s on the bottom. I want the movieclip to move along the x axis based on the button clicked. So if I click on button 2, the mc will move slightly to the right. If I ckick all the way on button 10, the mc will scroll alll the way to the right, etc.

I think its pretty easy, I see it a lot with sites, just don't know how to do it.

Thanks,

Tweening With Actionscript
Hi

I have a button, 285 x 285 px in size. On pressing this button I would like it to 'expand' to 580 x 580 px, in an elastic manner, ie. As it gets nearer to its final size, I would like the tweening to slow down (ease out).

Any ideas on how I might do this - any help or suggestions most appreciated!

Tweening With Actionscript
I'm just full of questions today

I'm working on a site that has quite a few 'fancy' transitions.

Mainly mask tweens and shape tweens.

The problem is that this is slowing down some of the older machines at my work.

Is it possible to do this type of stuff with actionscript?

If so, would I be wiser to use actionscript for all of my tweens and masks instead of using the timeline?

Which method will be less likely to slow down machines with older processors?

Thanks a bunch

Tweening Via Actionscript
Hi All!

I understand the actionscript behind making simple tweens. However, a client of mine wants to have something similar to General Mills® center navigation incorporated into a page of their website. Can anyone point me in the right direction of a tutorial or something alike? I have no idea of how this is done?

http://www.generalmills.com


Thanks!

Tweening With Actionscript
I'm just full of questions today

I'm working on a site that has quite a few 'fancy' transitions.

Mainly mask tweens and shape tweens.

The problem is that this is slowing down some of the older machines at my work.

Is it possible to do this type of stuff with actionscript?

If so, would I be wiser to use actionscript for all of my tweens and masks instead of using the timeline?

Which method will be less likely to slow down machines with older processors?

Thanks a bunch

Tweening Via Actionscript
Hi All!

I understand the actionscript behind making simple tweens. However, a client of mine wants to have something similar to General Mills® center navigation incorporated into a page of their website. Can anyone point me in the right direction of a tutorial or something alike? I have no idea of how this is done?

http://www.generalmills.com


Thanks!

Actionscript Tweening
When an object does not have frames on the timeline, it doesn't exist in the movie as far as I understand it. However, if I tween the alpha to 0 for an object using actionscript, I assume it still exists in the movie and is thus being tracked by the the flash player on the veiwer's computer.

This is not a big issue with just a graphic but with a complicated component like a flash gallery, it could be. Does setting the visibility property to false remove the component from the movie so it does not tax the player's processor?

Tweening With Actionscript
Last edited by vibetec : 2004-05-12 at 00:38.
























Hello,

I have an account swf which I load into the
main movie's container_mc.

Account swf contains some tweening AS; I want
to use the mx.transitions.easing.Strong.easeOut class.

When I test the account movie through "test movie" it works, but when I test the account movie inside the main movie ( thus with loadMovie("") ) the tweening transition stops working.

Should I import the classes in my main movie to ?

This piece of code works fine, it stops working after I load account.swf inside my main movie.

ActionScript Code:
stop();
 
var y:Number;
 
function sliderTo(goal:Number){
        y = this._y;
        var easeType = mx.transitions.easing.Strong.easeOut;
        var begin = y;
        var end = goal;
        var time = .5;
        var mc = this;
        var ballTween = new mx.transitions.Tween(mc, "_y", easeType, begin, end, time, true);   
        ballTween.onMotionFinished = function() {
            //
        };
}
 
nexter.onRelease = function(){
    this._parent.sliderTo(250);
}


If I use the mc, that contains this slider code,
directly in my movie, it works like a charm.

The strange part is that the loaded swf does work inside a testSlider.swf ( testSlider is the main movie ) ...

Tweening With Actionscript
I have a movieclip and a button. When the button is clicked, i execute a code that moves the MC down the height of the MC.

ex:

on(release) {

movieclip._y += movieclip._height;

}

This works but I want the movieclip to slide (tween) to the target location.

Is this possible? (it must be)

Thanks

Tony

Tweening With Actionscript
I have a movieclip and a button. When the button is clicked, i execute a code that moves the MC down the height of the MC.

ex:

on(release) {

movieclip._y += movieclip._height;

}

This works but I want the movieclip to slide (tween) to the target location.

Is this possible? (it must be)

Thanks

Tony

ActionScript Vs Tweening
Hey everyone, its my first post - love the tutorials and the forums ace.

Hope some one could help me out, i am looking to make my Flash site more organised / optimised. At the moment i use the occasional tween of animation, mainly to create a flicker effect - from fully black graphic, to 20% alpha and backup again.

Is there a better way to do this with ActionScript?

Look forward to hearing from you. Ray.

Copyright © 2005-08 www.BigResource.com, All rights reserved