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




Question About Rotation Tween And Filters?



i have set up a rotation tween for a MC and it is working fine....

Then i set up some filters for the same object and they are not rotating with the object.

is ther any way to fix this so that both object and its filters are rotating??

thanks for any input



KirupaForum > Flash > ActionScript 3.0
Posted on: 09-18-2008, 03:33 AM


View Complete Forum Thread with Replies

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

Problem With Filters And Tween Rollovers
Hello,

I created some buttons that I want to scale via transistions.tween when rolled over.

They work fine until I apply a filter to them, at which point they skip and jitter.

Anyone have a solution?

For reference, here's the button code:


Code:
function rollpop(icons) {
icons.onRollOver = function() {
new mx.transitions.Tween(icons, "_width", mx.transitions.easing.Back.easeInOut, this._width, 100, 5, false);
new mx.transitions.Tween(icons, "_height", mx.transitions.easing.Back.easeInOut, this._height, 100, 5, false);
};
icons.onRollOut = function() {
new mx.transitions.Tween(icons, "_width", mx.transitions.easing.Back.easeIn, this._width, 75, 5, false);
new mx.transitions.Tween(icons, "_height", mx.transitions.easing.Back.easeIn, this._height, 75, 5, false);
};
}

rollpop(my_btn)
rollpop(my_btn2)
Thanks for any help on this.

-E

Glow Filters And Tween Class Does Not Work
hi!!!! this is my problem...

I have inserted on stage through attachmovie a mc and copied 6 times through the cycle for. . now through the class filter I have assigned for everyone the effect always through the cilo for, but I do not succeed to assign transition that is to the effect movement of the filter glow to all the mc

for all the rollOut and rollOver works (this is looked at from the small hand and trace) but the every time that step small hand on whichever only mc to a part the transition of the effect…

now i show the code of my fla files that is in first frame...


Code:
import flash.filters.GlowFilter;
/*import flash.filters.*;*/
import mx.transitions.Tween;
import mx.transitions.easing.*;

var gf:GlowFilter = new GlowFilter(0x000000, 100, 0, 0, 3, 3, false, false);
//dichiaro gli effetti e li imposto

var blurXTween:Tween = new Tween(gf, "blurX", Elastic.easeOut, 5, 5, 1, true);
var blurYTween:Tween = new Tween(gf, "blurY", Elastic.easeOut, 5, 5, 1, true);


//imposto le variabili posizione
var posX:Number = 80;
var posY:Number = 370;

//creo l'array di testo delle icone e del numero delle icone
var testoIco:Array = new Array ("VIDEO","MOTION GRAPHICS","WEB SITES","ILLUSTRATIONS","BRAND","PHOTO");


/*ciclo for per attaccare il simbolo item dalla libreria e per moltiplicarlo
sullo stage e dargli l'effetto*/
for(var i=0; i < testoIco.length; i++)
{
//attacco l'icona dalla libreria
var icon:MovieClip = this.attachMovie("icon","icon" + i, i+1);
icon.icona.testo.textButton = testoIco[i];
icon._x = (127*i) + posX;
icon._y = posY;
icon.ref.setMask(icon.mask);
icon.filters = [gf];
/*applico l'effetto alle icone rollOver rollOut*/
icon.onRollOver = function ()
{
blurXTween.continueTo(20, 2);
blurYTween.continueTo(20, 2);
}
icon.onRollOut = function ()
{
blurXTween.continueTo(5, 2);
blurYTween.continueTo(5, 2);
}
blurXTween.onMotionChanged = function ()
{
icon.filters = [gf];
}
}
i need help!!!
sorry for my bad english....

Glow Filters And Tween Class Does Not Work
hi!!!! this is my problem...

I have inserted on stage through attachmovie a mc and copied 6 times through the cycle for. . now through the class filter I have assigned for everyone the effect always through the cilo for, but I do not succeed to assign transition that is to the effect movement of the filter glow to all the mc

for all the rollOut and rollOver works (this is looked at from the small hand and trace) but the every time that step small hand on whichever only mc to a part the transition of the effect…

now i show the code of my fla files that is in first frame...

quote:
import flash.filters.GlowFilter;
/*import flash.filters.*;*/
import mx.transitions.Tween;
import mx.transitions.easing.*;


//imposto le variabili posizione
var posX:Number = 80;
var posY:Number = 370;

//creo l'array di testo delle icone e del numero delle icone
var testoIco:Array = new Array ("VIDEO","MOTION GRAPHICS","WEB SITES","ILLUSTRATIONS","BRAND","PHOTO");

setUpButtons();

function setUpButtons()
{
var gf:GlowFilter = new GlowFilter(0x000000, 100, 0, 0, 3, 3, false, false);
//dichiaro gli effetti e li imposto
var blurXTween:Tween = new Tween(gf, "blurX", Elastic.easeOut, 5, 5, 1, true);
var blurYTween:Tween = new Tween(gf, "blurY", Elastic.easeOut, 5, 5, 1, true);
//imposto il valore btnCnt
var btnCnt = testoIco.length;
/*ciclo for per attaccare il simbolo item dalla libreria e per moltiplicarlo
sullo stage e dargli l'effetto*/
for(var i=0; i < btnCnt; i++)
{
//attacco l'icona dalla libreria
var icon:MovieClip = this.attachMovie("icon","icon" + i, i+1);
var temp = this["icon"+i];
temp.icona.testo.textButton = testoIco;
temp._x = (127*i) + posX;
temp._y = posY;
temp.ref.setMask(temp.mask);
var glow:Array = this["gf"+i];
temp.filters = [gf];
/*applico l'effetto alle icone rollOver rollOut*/
temp.onRollOver = function ()
{
blurXTween.continueTo(20, 2);
blurYTween.continueTo(20, 2);
}
temp.onRollOut = function ()
{
blurXTween.continueTo(5, 2);
blurYTween.continueTo(5, 2);
}
blurXTween.onMotionChanged = function ()
{
temp.filters = [gf];
}
}
}


i need help!!!
sorry for my bad english....

Glow Filters And Tween Class Does Not Work
hi!!!! this is my problem...

I have inserted on stage through attachmovie a mc and copied 6 times through the cycle for. . now through the class filter I have assigned for everyone the effect always through the cilo for, but I do not succeed to assign transition that is to the effect movement of the filter glow to all the mc

for all the rollOut and rollOver works (this is looked at from the small hand and trace) but the every time that step small hand on whichever only mc to a part the transition of the effect…

now i show the code of my fla files that is in first frame...

Code:
import flash.filters.GlowFilter;
/*import flash.filters.*;*/
import mx.transitions.Tween;
import mx.transitions.easing.*;


//imposto le variabili posizione
var posX:Number = 80;
var posY:Number = 370;

//creo l'array di testo delle icone e del numero delle icone
var testoIco:Array = new Array ("VIDEO","MOTION GRAPHICS","WEB SITES","ILLUSTRATIONS","BRAND","PHOTO");

setUpButtons();

function setUpButtons()
{
var gf:GlowFilter = new GlowFilter(0x000000, 100, 0, 0, 3, 3, false, false);
//dichiaro gli effetti e li imposto
var blurXTween:Tween = new Tween(gf, "blurX", Elastic.easeOut, 5, 5, 1, true);
var blurYTween:Tween = new Tween(gf, "blurY", Elastic.easeOut, 5, 5, 1, true);
//imposto il valore btnCnt
var btnCnt = testoIco.length;
/*ciclo for per attaccare il simbolo item dalla libreria e per moltiplicarlo
sullo stage e dargli l'effetto*/
for(var i=0; i < btnCnt; i++)
{
//attacco l'icona dalla libreria
var icon:MovieClip = this.attachMovie("icon","icon" + i, i+1);
var temp = this["icon"+i];
temp.icona.testo.textButton = testoIco[i];
temp._x = (127*i) + posX;
temp._y = posY;
temp.ref.setMask(temp.mask);
var glow:Array = this["gf"+i];
temp.filters = [gf];
/*applico l'effetto alle icone rollOver rollOut*/
temp.onRollOver = function ()
{
blurXTween.continueTo(20, 2);
blurYTween.continueTo(20, 2);
}
temp.onRollOut = function ()
{
blurXTween.continueTo(5, 2);
blurYTween.continueTo(5, 2);
}
blurXTween.onMotionChanged = function ()
{
temp.filters = [gf];
}
}
}
i need help!!!
sorry for my bad english....

Tween Rotation
i am trying to motion tween a symbol of a clock hand...how can i get the one end to stay in place, while the hand rotates around?..tween by a corner of the symbol somehow?....

thanks

im on a PC using MX

Tween Rotation Help
Hi everyone,

The following code works -- almost...I was wondering if someone could help me out.

// Import classes for easier use
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;

function moveMe( target: DisplayObject, property:String, value:Number ):void {
var t:Tween = new Tween( target, property, Strong.easeIn, target[property], value, 1, true );
}
function rotateMeCCW( target: DisplayObject, property:String, value:Number ):void {
var rCCW:Tween = new Tween(target, property, Strong.easeIn, 0, 45, 1, true);
}
function rotateMeCW( target: DisplayObject, property:String, value:Number ):void {
var rCCW:Tween = new Tween(target, property, Strong.easeIn, 0, -45, 1, true);
}
function moveHighlight( event:MouseEvent ):void {
moveMe( menuHighlight_mc, "y", event.target.y );
//move the gear ccw or cw based on which button you are hovering over
if (menuHighlight_mc.y >= event.target.y) {
rotateMeCCW( gear1_mc, "rotation", event.target.rotation );
} else {
rotateMeCW( gear1_mc, "rotation", event.target.rotation );
}
}
// Set the Highlight to move behind about when you hover over button
about_btn.addEventListener(MouseEvent.MOUSE_OVER, moveHighlight);
// Set the Highlight to move behind Photography when you hover over button
photo_btn.addEventListener(MouseEvent.MOUSE_OVER, moveHighlight);

Like I said, it works, kind of.

var rCCW:Tween = new Tween(target, property, Strong.easeIn, 0, -45, 1, true);
}

I would like the rotation to start where it last finished off. right now, because I have the parameters 0, and -45, It always starts at 0 and rotates gear1_mc -45 degrees.

The next time the user hovers over a button, instead of resetting it to 0, I would like it to start where the last rotation left off.

Any help would be appreciated!
Thanks!
-Rich

Tween And Rotation
Hi there!

I have an issue, wich make me crazy!

i have a rectangle on my scene, 200x50 for example.
I'm using a tween on it to resize it into 500x50. That work well.

But if i rotate it (90 degrees with this.rotation += 90) , wich give me a 50x500 rectangle, and i want to get my original rectangle back (50x200) with a tween effect, it modify well the height, but the is modify witdh too (with a 1/5 ratio between width and height).

If anyone know why, i'll appreciate your suggestion.

Thancks

Better Rotation Tween?
I am currently working on a strategy game and the pathfiding code I will be using, but I am having some issues with rotation and tweening my rotation.


Currently a unit can only move in certain directions, mainly up down left right and the diagonals.

for example if a unit is moving up and to the right, its rotation should be -45 degrees, and if it is moving down and right its rotation should be 45 degrees. This appears to work pretty well but when a unit needs rotate from -135 degrees to 135 degrees it rotates too much. I tried changing all of the rotations to positive but that didnt work at all. Is there a better way to rotate from -degrees to +degrees?

You can see an example of what I am talking about here (just drag a unit or two on to the screen, then select them and click somewhere to have them move to that spot, and you shuold see the problem):

http://www.invulse.com/tests/StrategyGame/


Here is the code:


Code:
var a = PathFollower.Path[PathFollower.pIndex].x*nodeSize - PathFollower.x
var b = PathFollower.Path[PathFollower.pIndex].y*nodeSize - PathFollower.y
var radians = Math.atan(Math.abs(b)/Math.abs(a))
var degrees


if(a>0 && b < 0){
//up right
degrees = -45
//degrees = (180*radians)/Math.PI - 90
}
if(a == 0 && b < 0){
//up
degrees = -90
}
if(a < 0 && b < 0){
//up left
degrees = -135
}
if(a < 0 && b == 0){
//left
degrees = -180
}
if(a < 0 && b > 0){
//down left
degrees = 135
}
if(a==0 && b > 0){
//down
degrees = 90
}
if(a > 0 && b > 0){
//down right
degrees = 45
}
if(a>0 && b==0){
degrees = 0
}

//trace(degrees)
new Tween(PathFollower, "rotation", None.easeNone,PathFollower.rotation , degrees, .1, true);

if(PathFollower.rotation == degrees){
new Tween(PathFollower, "x", None.easeNone,PathFollower.x , PathFollower.Path[PathFollower.pIndex].x*nodeSize, .1, true);
new Tween(PathFollower, "y", None.easeNone,PathFollower.y , PathFollower.Path[PathFollower.pIndex].y*nodeSize, .1, true);
PathFollower.pIndex++;
}

Tween Rotation
I have an movie clip that I want to rotate in its center pivot. How can I do that by using a tween class?

Rotation, Like A Tween, That Slows Down When It's Done.
I have a simulation I'm working on, and on this display I have a needle that needs to rotate when a button is pressed. The good thing is, the button is a toggle, so the needle only ends up in 2 places: it either rotates to -55 or to 90, depending on what the toggle is set on.

Well I got it to "snap" to the position, that was simple, but my boss wants it to ROTATE somewhat slowly to the position instead, and I'm trying to use actionscript to get it to work. I modified some code that I have been using for another part of the simulation but that is just moving the _x so it's totally different. Anyway I am having trouble mostly with the speed, I have been playing with it for ever and have simplified it and am closer but still can't control it totally and I need some HELP, PLEASE

Here's what I have on the movieClip instance that I'm rotating (it's called "TACAN") and the toggle button is called "FwdAftMC1"

onClipEvent(enterFrame){
///here's my variables for use up in here///
var Rot1; /// the current rotation degree of the tacan needle
Rot1= this._rotation;

var speed1; /// um, speed
speed1 =2; /// speed value

///sets the rotation to the toggle button///
if(_root.topPanel.FwdAftMC1._currentframe==1){
this, _rotation = (this._rotation-55)/speed1;
}
if(_root.topPanel.FwdAftMC1._currentframe==2){
this, _rotation = (this._rotation+90)/speed1;
}
}

It might be easier to just associate the movement with the toggle button instead of on the MC itself, but I tried that in the beginning and for some reason this seemed to work better.

Tween Rotation Question
I was wondering how to get rid of the irritating (if minor) jag that occurs when I want something like the hands on a clock to rotate indefinitely. The first and last frames in the tween are the result because they're the same, but if I slightly alter one or the other to compensate the whole rotation messes up. Any help would be greatly appreciated.

Ease On A Rotation Tween
I am very new to actionscript... and I want to make an object rotate 360degrees. I could do it with keyframes, but I want the rotation to ease in. I _KNOW_ it's possible to set up the object to rotate with an ease using actionscript... I just can't figure out how. I am sure its simple... could someone help me out?

Thanks!

Tween Loop And Scripted Rotation
okay, what i'm trying to do is create something similar to a planetary orbit. the final result should be a rotating object following an elliptic path.
When click on a object, that object should move along the elliptic path to a specified focus point(which is on the path also).The challenging part is that all the object have to be dynamic retrieving from database.

What i have done is i store the coordinate of the object and i calculate the distance in between the onclick object with the focus point and tween it. Well, it is working but the result is not satisfy. What they want is a smooth elliptic path but what i have done is not elliptic enough.

Attach is my code. Anyone have any idea to improve my code or a new way to achieving the elliptic tweening is more than welcome. I been googling but cannot find any solutions yet. Thankz in advance.

Rotation Shift With Alpha Tween
So,
When I am using a motion tween to adjust an _alpha property, it seems like the first frame of the tween tweaks the rotation of the movie clip a bit. I have removed the the tween, the movie clip, and everything, but it still seems to happen. Any ideas? This is CS3 on a PC.

Rotation Tween Class Problem
Hey there all, I usually wouldnt post help on
Actionscript anymore since I have gained some
skill in it but...

I cannot seem to find the logic. I know it's a math
problem but i cannot seem to figure that problem.

Here is the code


Code:
//############# Breaking Edge Band Website ##############
// Created by Sam Wood. Note that everything written after
// after a "//" indicates that I am commenting on
// the codes underneath it.
//############# Page Variables ##############
// These variables will change each time a
// user clicks on a button. These will be used
// to check what page the user is on. If they
// are not a page, then the page that they are
// on will return TRUE while the others are FALSE.
main = true;
downloads = false;
homepage = false;
upcoming = false;
gallery = false;
links = false;
music = false;
history = false;
about = false;
upcoming = false;
//############# Position Variable ##############
// posX and posY will record each position of the
// main scene each time a button is pressed.
// mainX and mainY will record the main position
// of the scene once, so that if a user presses a
// button that requires them to go back to the main
// view (with the buttons all around) then this
// command will be used.
// rota1 however records the rotation of the scene.
// please not that the scene is a MOVIECLIP.
posX = scene._x
posY = scene._y
mainX = scene._x
mainY = scene._y
rot1 = scene._rotation
//############# Tween Class ##############
// This enables the movement of movieclips
// using actionscript. In this case it is
// the main scene.
import mx.transitions.Tween;
import mx.transitions.easing.*;
//############# Buttons ##############
// These are controls for each button.
// Each time a button is pressed, the
// function will cause something to happen.
// In this case it is to move the scene
// around.
scene.homepage_btn.onRelease = function()
{
posX = scene._x
posY = scene._y
rot1 = scene._rotation

if (main == true && homepage == false)
{
main = false
homepage = true
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 600, 7, true)
}
else

if (main == false && homepage == true)
{
main = true
homepage = false
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, mainY, 7, true)
}
else

if (main == false && homepage == false && (upcoming == true))
{
main = false
homepage = true
upcoming = false
downloads = false
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 250, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 0, 3, true);
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 600, 7, true)
}
else

if (main == false && downloads == true)
{
main = false
homepage = true
upcoming = false
downloads = false
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 247, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 0, 3, true);
}
}

scene.downloads_btn.onRelease = function()
{
posX = scene._x
posY = scene._y
rot1 = scene._rotation

if (main == true && downloads == false)
{
main = false
downloads = true
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 600, 7, true)
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 370, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 45, 3, true);
}
else

if (main == false && downloads == true)
{
main = true
downloads = false
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, mainY, 7, true)
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, mainX, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 0, 3, true);
}
else

if (homepage == true && main == false)
{
main = false
downloads = true
homepage = false
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 370, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 45, 3, true);
}
else

if (gallery == true && main == false)
{
main = false
downloads = true
gallery = false
homepage = false
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 600, 7, true)
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 370, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 45, 3, true);
}
}

scene.upcoming_btn.onRelease = function()
{
posX = scene._x
posY = scene._y
rot1 = scene._rotation

if (main == true && upcoming == false)
{
main = false
upcoming = true
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 670, 7, true)
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 150, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, -45, 3, true)
}
else

if (main == false && upcoming == true)
{
main = true
upcoming = false
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, mainY, 7, true)
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, mainX, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 0, 3, true)
}
else

if (homepage == true && main == false)
{
upcoming = true
main = false
homepage = false
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 150, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 670, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, -45, 3, true)
}
}

scene.gallery_btn.onRelease = function()
{
posX = scene._x
posY = scene._y
rot1 = scene._rotation

if (main == true && gallery == false)
{
main = false
gallery = true
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 450, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 700, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 90, 3, true);
}
else
if (main == false && gallery == true)
{
main = true
gallery = false
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, mainX, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, mainY, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 0, 3, true);
}
else

if (main == false && downloads == true)
{
main = false
gallery = true
downloads = false
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 450, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 700, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 90, 3, true);
}
else
if (main == false && links == true)
{
main = false
gallery = true
links = false
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 450, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 700, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 90, 3, true);
}
}

scene.links_btn.onPress = function()
{
posX = scene._x
posY = scene._y
rot1 = scene._rotation

if (main == true && links == false)
{
main = false
links = true
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 448, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 800, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 135, 3, true);
}
else

if (main == false && links == true)
{
main = true
links = false
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, mainX, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, mainY, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 0, 3, true);
}
else

if (gallery == true && main == false)
{
gallery = false
main = false
links = true
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 448, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 800, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 135, 3, true);
}
else

if (music == true && main == false)
{
music = false
main = false
links = true
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 448, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 800, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 135, 3, true);
}
}

scene.music_btn.onPress = function()
{
posX = scene._x
posY = scene._y
rot1 = scene._rotation

if (music == false && main == true)
{
music = true
main = false
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 350, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 900, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 180, 3, true);
}
else

if (music == true && main == false)
{
music = false
main = true
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, mainX, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, mainY, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 0, 3, true);
}
else

if (links == true && main == false)
{
main = false
links = false
music = true
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 350, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 900, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 180, 3, true);
}
else

if (history == true && main == false)
{
main = false
history = false
music = true
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 350, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 900, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, -180, 3, true);
}
}

scene.history_btn.onPress = function()
{
posX = scene._x
posY = scene._y
rot1 = scene._rotation

if (main == true && history == false)
{
main = false
history = true
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 235, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 880, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, -135, 3, true);
}
else

if (main == false && history == true)
{
main = true
history = false
var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, mainX, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, mainY, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 0, 3, true);
}

if (music == true && main == false)
{
main = false
music = false
history = true

var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 235, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 880, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, ++rot1, 225, 3, true);
}
}
And this is the code I am having a problem with.


Code:
if (music == true && main == false)
{
main = false
music = false
history = true

var myTween:Tween = new Tween(scene, "_x", Strong.easeOut, posX, 235, 7, true)
var myTween:Tween = new Tween(scene, "_y", Strong.easeOut, posY, 880, 7, true)
var myTween:Tween = new Tween(scene, "_rotation", Strong.easeOut, rot1, 225, 3, true);
}
As you can probably guess i am making a rotated menu system. It all works fine except the code above.

Basically what happens is that when I click the "MUSIC" button, then the "HISTORY" button, then to the "MUSIC" button and finally the "HISTORY" button, it seems to do the opposite clockwise direction to what it did the first time i click on it.....

Can someone help me please?

p.s. Please do not steal my code anyone. Ask me first, then again I dont see if its very useful to anyone.

edit: Oh and by the way this is for college.

Gah Shape Tween Adds Arbitrary Rotation
I am doing a **very** simple motion tween, simply going from a rectangle and then stretching out two of the points to make a trapezoid. But when I does this, I don't only get the shape change, I also get a 90 degree rotation....! I have not done anything to indicate that a 90 degree rotation should be done.

And even more strange, using shape hints does not solve the problem...it still rotates. Anyone have any ideas as to why this is happening?

Rotation Tween On Dynamic Text Problem
i can't seem to get this to work, width and positon tween ok but with rotation it just disappears and appears again at the end. Is this a known issue?

Blur Tween Of Text Vanishes Upon Rotation
I have a movieclip with a text property inside it ( as a child ). I applied normal blur tween to the text. It works fine. But when I try to rotate the movieclip, the result vanishes. Can someone please explain why?


Thanks in advance.

Rotation Tween Stutters When Mouse Moves?
Hey whaddup?

I wanna make a rotating record (1 rotation), but when I use a simple tween it doesnt rotate smooth , it only does if I hold mouse still. Check it out here (press button in the middle of the record to make it spin)

http://homepages.svc.fcj.hvu.nl/1127456/plaat.swf

http://homepages.svc.fcj.hvu.nl/1127456/plaat.fla

how can this be fixed? Preload or something?



-one-

Stopping A Rotation And Returning Slowly To Start Mid Tween
Hi all,

I am a newbie here so treat me gently.

I have a movieclip (a record stylus to be exact) and have it rotating slowly across a record, using a motion tween, after it is clicked to start it.

What I want to be able to do is click the stylus again, at any point in the tween, and have it return to its original poition but in a smooth and fairly slow manner (1 second?).

I can use gotoAndStop to get it to return easily but I want it to take place over several frames.

Can anyone help me?

Rotation Script - Smooth Rotation
I have created a speedometer and on clicking a speed, I can get the needle to rotate around to the speed clicked, using _rotation.

However, the movement is very 'jumpy' and I would like to make it smoother, or better still accelerate/decelerate.

I have tried the following


Quote:




on (release) {
rotation_speed = 0.1;
if (speedo._rotation > -40)
{
do {
rotation_speed = rotation_speed * 1.1;
speedo._rotation = speedo._rotation - rotation_speed;
} while (speedo._rotation > -40);
}
else {
do {
rotation_speed = rotation_speed * 1.1;
speedo._rotation = speedo._rotation + rotation_speed;
} while (speedo._rotation < -40);
}
}




I want to get the needle round to -40, so whilst it is greater rotate is backwards, otherwise rotate forwards, starting with a small rotation and increasing (accelerate).

I found that this was still jumpy. Trying a negative causes Flash warning about script running for too long.
Rotating forwards (else) also overshoots the end position of -40

Any ideas on how to get the needle moving smoothly and finishing on the correct spot??

[F8] Filters
Please help. I just installed Studio 8. I am trying to use flash filters. But the filters tab is missing. Is there a way to turn it on? Did I install wrong? I know it's supposed to be there.

ronhvb03

Box Around Filters?
Why do I see a transparent white box around filters in flash? I see it both in Flash 8 Professional, and in swfs embedded in web pages.
I attached a picture of what I see for a simple swf with a circle with a red glow filter.
Here's the swf:
http://img46.imageshack.us/my.php?im....swf&width=320

Does this happen to anyone else? This just started happening recently, before filters worked fine.

Filters
Hello everyone,
I have a movieclip with a glow filter added through the filters window, but I want to be able to simply decrease the strength and blur of it with actionscript without creating a completely new filter.
Thank you!

Filters Tab
I just loaded studio 8. I am trying to use filters in Flash 8 Pro. But the filters tab does not seem to be present. Can anybody help?

Filters
I draw for example a square and then convert it to symbol.
Then I apply a shadow filter and i don't know for which reason it get's like very defocused on the stage, but then when i play it, it looks good again.

Is this normal or am i doing anything wrong?


Thxs!

Colo(u)r Filters
For an image effect, I would like to screen out the primary light colo(u)rs individually.

I know that it is possible to do this in other programs, but that would leave me with four of the same picture (red, green, blue, normal)

Is is possible to screen out all but one colo(u)r in flash.

I tried with little success by using semi-transparent rectangles of the wanted colo(u)r over the picture.

-Z

Filters : Blur
Could anyone quickly give me a run down on how i would apply a blur filter to a movie clip in only the y direction? I've only found a few tutorials related to the bitmapdata class. With action script that is.

Effect Using AS Anf Filters
Hi can anybody help me out. i want to achieve a similar effect to ScreenVader. i'm using flash 8 and understand it has something to do with the new filters. can anyone help?
thanks,
Sam

Filters And Setmask
Hi,

i am loading movies into a container that is masked off using setMask(), however when i apply a filter (blur) the blur is visible outside the masked area.. anyone know a fix?

cheers,
Gareth

[F8] Delete Filters
Hi folks, I'm trying to remove the filters (in fact there is only one) that are applied to a Movieclip. I used the following coes but none of these worked. What would you suggest ?


PHP Code:



myMC.filters.shift();





PHP Code:



myMC.filters = [];





PHP Code:



myMC.filters = null;

Flash Filters
I can find the filters tab when I use flash. How can i make it appear? I just installed Studio 8. Before that I had the trial version. The trial version did not have the filters tab either.

Thanks
ronhvb03

Dynamic Filters
What are the conditions that need to be met for a MovieClip/Sprite to work with filters? I have some object that I am dynamically using the BlurFilter. Some object are blurring, and others are not.

Any ideas?

Thanks.

[CS3] I Can't Find The Filters Tab
I'm ****ing retarted. I know the filters tab should be in the property inspector, but I can't find it anywhere. This is driving me insane.ck I

Ah, ****. There's a newbies forum. **** I am so dumb

[CS3] I Can't Find The Filters Tab
In the properties inspector I see a parameters tab, I see a properties tab. I don't see a filters tab. What the **** am I doing?

Problem With Filters
Hi Guys!
I have an animation with explosion helicopters going around, and in the explosions i have applyed blurs etc... and after this the movie start to slow...
Why that?

[CS3] Buttons & Filters
I am definitely new to flash. I have some experience with a few of the other CS3 programs, like Photoshop, Fireworks, and Dreamweaver; but I am finding myself quite stuck on what seems to be a very simple operation.

I have designed a homepage layout with photoshop, and I have imported all of the layers into Flash.

The problem I am having is that when I select the layer, and object, that will eventually be one of the links on the home page, I cannot add a filter to it.
It gives me the "Filters are applicable to text, movie clips, and buttons only.

I have selected the object in question, converted to symbol - Button, double clicked to get into the button, and it still will not allow me to apply a filter.

I am currently in the process of going through all the "Lynda.com" tutorials, and I have already completed the "Getting Started Essentials," yet I cannot locate anything that addresses this problem.

Any help you can offer is greatly appreciated.

Extra Filters?
are there other filters available for flash cs4? thrid party or otherwise?

Importing Filters?
Im running through a tutorial on blurring effects, and it first says to use this:

import flash.filters.BlurFilter;


when I compile the actionscript it says something is wrong with that line of code. Im using Flash MX.


thanks

Tweening Filters
Hi all!
I found some time ago a very helpful extention for flash: tweening by Zigo.
It works fine but i canno understand the way to use theese libraries with the filters e.g. Dropshadow, blur etc.
Can anyone help me?

thx in advance

Flame With Filters
so I've got a flame effect using displacement and some feedback going on.. how does this run on your system? I know it's horrible on mac.

http://www.ututu.com/~magronbass/fla...placenoise.swf

ya know, these filter effects are cool but I'm just not too sure if they're practical because of the emmense overhead... I'm planning on downsampling the effect for this one to optimise, but still, I'm not too sure if it'll help much in a real life context..

Printing With Filters
quick question.
I wrote a print job function for which i have parts of the script that use addPage

example:
Code:
pj.addPage(_root, {xMin:0,xMax:1024,yMin:0,yMax:768},{printAsBitmap:true},null);
i added the "{printAsBitmap;true} after realizing that my filters (aka shadows etc) were not showing up in the prints. after adding that it certainly took longer to add each page i designated but it still not showing the filters. i am assuming that the printAsBitmap just handles transparency and color effects and not movieclip filter parimiters.. is this true?

Filters In AS2.0 Class
Hi, I have a ButtonClass linked to a MovieClip symbol in my library. I'm trying to add a blur effect to the onRollOver using filters. However when I roll over the clip the Blur gets applied for an instance and then gets reset. I think it has to do with the way I'm applying the filter (this.filters = [this.gf]. Any ideas?

Here's my class so far:


Code:

import flash.filters.*;

class ButtonClass extends MovieClip
{

private var gf:GlowFilter;

public function ButtonClass()
{
this.onRollOver = this.over;
this.onRollOut = this.onDragOut = this.out;
}

private function over():Void
{
this.gf = new GlowFilter(0xFFFFFF, 0, 10, 10, 3, 3, false, false);
this.filters = [this.gf];
this.onEnterFrame = function()
{
this.gf.alpha += (25 - this.gf.alpha) / 5;
this.gf.blurX += (100 - this.gf.blurX) / 5;
this.gf.blurY = this.gf.blurX;
this.filters = [this.gf];
if(this.gf.blurX >= 100)
{
delete this.onEnterFrame;
}
}
}
}

Dynamic Mc Filters
Hi! I´ve been reading all over the net looking for info about changing the movie clip filters dynamically but it´s really dificult to find.

What I need is to change the saturation of a Mc with AS. I heard that it has to be done with the Color Matrix Filter but I don´t understand the way I have to do it.
Besides, what I want isn´t too much, just tranform any image loaded into that mc into a grey scale picture, so the saturation must goes (in the flash menu at least) from 0 to -100.

Any extra hand from any flash wise?

Bye!

Filters And Zooming
When you right-click the stage, and click "Zoom-In" the filters get "de-applied" for certain instances of movieclips. Why is this?

Example: http://www.sheezyart.com/view/1710045/ (Zoom in during the menu, the both blue ovals will lose its blur when you zoom. But when you view the flash file one or none of the movieclips lose their blurs.)

Filters Assist
Hello, I wanted to share a tool on which I am working on my spare time.
The tool is aimed to assist the usage of filters in Actionscript 3 .

http://filters-assist.webklan.com/

With this tool you can compose the filters effects visually and get the source code to apply it in AS3.
I appreciate feedback and suggestions.

Mask + Filters
I don't know if there's a way to do this, but I have an image that is being masked so only a small portion of it is showing. I would like to add a drop shadow or bevel or some kind of filter to the visible part of the image, but since the edges of the original image are masked out, this doesn't seem to work. I've tried adding the filter to the image and to the mask and it didn't work either way. I have a feeling this isn't the last time I'll face this issue, so any help would be greatly appreciated.

Filters Panel
hey guys were can i make the filter panle show?

i have been looking for the filters for an 1hour now..lol
flash 8

thx

Text Cut Off If Filters Are Used
Please excuse me if this is old news...
I've run into a bug where text (static or dynamic) is cut off when filters are applied.
For example, I can create a static text object on the stage with a common font (Arial) and put some text into it, and it displays just fine. I'm putting a tween on it to gently fade it in from invisible (alpha=0%) to full (alpha=100%) and back to invisible. At this point, the text looks just fine.
The trouble starts when I add a filter, like drop shadow for example. Once the filter is applied, the last character is cut off. For example, if the last word ends with an 'e', the 'e' character is lopped off vertically so only the left two thirds of the 'e' displays and the rightmost remaining third is not visible.
I've tried quite a bit of adjusting things to fix this... adding multiple extra spaces at the end, increasing the size of the text box, several different fonts... nothing works except taking the filter back off.
This is on the Mac version of Flash, by the way.

Anyone have an idea of what's going on, or what to try?
Thanks in advance.

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