Still Having Trouble W/ Basic Color Tween
ok. i have flash mx
frame one i create a circele with one color
click on frame 10, cpress f6(to create an identical keyframe to frame one, right)
by doing this the new objest is highlighted so i go to the properties window and change the color....
next i click on any frame between 1 and 10 and creat a motion tween from insert menu..
it still does not work.
the motion tween is dotted ... i know its supposed to be a solid line.
if i click on tframe 10 and create tween it change the objects to the same color.... what in tarnations is goin on here?!
please help. thank you
FlashKit > Flash Help > Flash MX
Posted on: 10-01-2004, 04:10 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Basic Color Tween
hi.
im trying to create a basic color tween in flashMX.
i was told to change the tint in my properties bar, but i cant find it .
when i open my properties window nothing shows tint.. what am i doing wrong?
please help.
thank you
Basic Flash CS4 Trouble Color And Tool Selection
I'm a new Flash user, but not a new computer user by any stretch. However, even though I'm getting animations to work, I can't get a couple of simple things to work or work consistently.
1) When I try to select a color, and it doesn't matter if it's for the stage or stroke or fill or what, sometimes I get the color I click and sometimes I get variations of gray, black and white. Is there some trick to selecting a color besides point-and-click?
2) When I try to move off the Rectable tool to anything else, it just stays there stubbornly saying Rectangle. I've tried everything I can think of and no luck.
Any help would be appreciated.
Tween Color Class Not The Color I Expected
Here is the code for a gallery slide show I'm working on.
What I'm wanting is the background to change color with each gallery. To tween over a few seconds. I have not included the gallery images. Sorry
I don't understand why the colors are so different from the what the hexadecimal colors I intended.
B2C3D0
598479
D16546
You have to go to the gallery button to see what I'm getting at.
Thanks for your help
kiwiupover
http://www.missionadventures.co.nz/k...er/gallery.fla
babyPic.onRelease = function() {
_parent._parent._parent.gotoAndPlay("galleryBaby") ;
var colour:Color = new Color(_parent._parent._parent.galleryBack);
colour.getRGB(_parent._parent._parent.galleryBack) ;
var trans:Object = colour.getTransform();
var rb:Tween = new Tween(trans, "rb", Strong.easeOut, trans.rb, 0xB2, 3, true);
var gb:Tween = new Tween(trans, "gb", Strong.easeOut, trans.gb, 0xC3, 3, true);
var bb:Tween = new Tween(trans, "bb", Strong.easeOut, trans.bb, 0xD0, 3, true);
rb.onMotionChanged = function():Void {
colour.setTransform(trans)
};
};
VERY Basic Tween Question
I just almost succeeded in doing my first tween, which was almost very satisfying. However, I have problem.
What I want is for the shape in the first frame to expand out to the shape in the last frame of the tween. Instead, it seems to disappear into nothing and then the image comes up.
Hopefully the attached file shows the problem. I want the triangle to appear gradually rather than the original shape disappear only for the triangle to appear suddenly at the end.
If there are any suggestions I would be very grateful
Basic AS 3.0 Tween Problem
hey i'm new to as3.0 just like this guy was (http://www.kirupa.com/forum/showthre...=280037&page=1) and i was trying to do the same thing. however, i WAS starting out w/ a movie clip called picMC.
I asked this question earlier and someone told me to write this to make sure the picMC was one the stage when the code was called.
they suggested this:
Code:
var picMC:PicMC = new PicMC();
addChild(picMC);
I put that code into my actions panel and my library only has a movie clip in it.
that being said when i export the movie i DON'T get any error messages but my movie clip still doesn't appear on the stage. The class name in my linkage window is called PicMC and the base class is flash.display.MovieClip.
what's wrong? why isn't the movie clip in my library not showing up on the stage?
here's my code now:
Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
var outTween:Tween;
var picMC:PicMC = new PicMC();
addChild(picMC);
picMC.addEventListener(MouseEvent.MOUSE_OVER, fadeOut);
function fadeOut(event:MouseEvent):void
{
outTween = new Tween(picMC, "alpha", None.easeNone,1,0,1,true);
}
also, why isn't the datatype in the example a MovieClip or something
why write
Code:
var picMC:PicMC = new PicMC();
and not
Code:
var picMC:MovieClip = new MovieClip();
and as a rule in AS 3.0 does every tween i make need to be put in its own variable??
also, on my earlier post i saw people talk about tweening engines and i had no clue what that meant but i had general idea. that being said, what are the benefits of a tweening engine? some practical uses? can anyone offer some links or reading about what tween engines do and such?
thanks !!!
Basic Tween Question
Hi guys, i'm very new to flash and was working on a tween simple effect. I have a cartoon guys mouth that I want to open, it kind of works but the right side of his face looks like its melting when the mouth opens. I'd like it to be a smooth transition from closed to open with just his jaw stretching down and nothing changing on the rest of his head.
I posted it here www.connectedelements.com
anyone have any idea what I'm doing wrong?
thanks, mike
Basic Motion Tween Help
Okay, I haven't done flash in probably 5 years and I am now trying to get back into. However the easiest thing is absolutely killing me. I'm just trying to do basic motion tweens and shape changes etc and got stuck on something with flash cs3. I can make a shape into a symbol and make the gradation change over 20 frames, from clear to black. I hit enter and boom and boom it does what I want, gradually appears over 20 frames the last frame being black. Now, from what I under stand there is a symbol editing mode, where you can essentially make an animation inside tha main animation, by animating the symbol it self. So I make the sqaure, turn it into a symbol, and then go into the symbol editing mod. In the fris frame the color is black and alpha is 0%, I press f6 on frame twenty and change the alpha back to 100% (black). I set it to motion tween, and hit enter. So the first 19 frames its invisible, then on twenty it goes black. There is no gradation between the 20 layers. Shouldnt this be possible or am I just really bad at this?
Also what what any of you recommend for re-teaching myself flash? LAst time I did it there was no actionscript and I have little experience with programming. I am a photographer and want to make a unique flash site for myself but its looking like flash has gotten A LOT harder. I am a pro with Photoshop so I figured I would pick it up fast since I understand layers and stuff like that, apparently not. Any help, book recommendations or web sites would be great. Thanks!
Basic AS 3.0 Tween Problem
hey i'm new to as3.0 just like this guy was (http://www.kirupa.com/forum/showthre...=280037&page=1) and i was trying to do the same thing. however, i WAS starting out w/ a movie clip called picMC.
I asked this question earlier and someone told me to write this to make sure the picMC was one the stage when the code was called.
they suggested this:
Code:
var picMC:PicMC = new PicMC();
addChild(picMC);
I put that code into my actions panel and my library only has a movie clip in it.
that being said when i export the movie i DON'T get any error messages but my movie clip still doesn't appear on the stage. The class name in my linkage window is called PicMC and the base class is flash.display.MovieClip.
what's wrong? why isn't the movie clip in my library not showing up on the stage?
here's my code now:
Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
var outTween:Tween;
var picMC:PicMC = new PicMC();
addChild(picMC);
picMC.addEventListener(MouseEvent.MOUSE_OVER, fadeOut);
function fadeOut(event:MouseEvent):void
{
outTween = new Tween(picMC, "alpha", None.easeNone,1,0,1,true);
}
also, why isn't the datatype in the example a MovieClip or something
why write
Code:
var picMC:PicMC = new PicMC();
and not
var picMC:MovieClip = new MovieClip();
and as a rule in AS 3.0 does every tween i make need to be put in its own variable??
also, on my earlier post i saw people talk about tweening engines and i had no clue what that meant but i had general idea. that being said, what are the benefits of a tweening engine? some practical uses? can anyone offer some links or reading about what tween engines do and such?
thanks !!!
Basic Action Tween
hi there.
i need to learn how to do a basic action tween in actionscript 2.
I can only find tutorials on AS3 ones or AS2 ones with easing, i dont want easing.
i want it so when someone clicks somewhere on the stage the "character" moves to the position that was clicked.
thanks!
Having Trouble With Basic Actionscript
I am making a navigation panel for a project. The mouse clicks the symbol, and the symbol changes, slides over, and a panel fades in. When the user clicks again, the symbol changes again. However, the last command will not work. Any suggestions?
Basic Actionscript Trouble In CS3
In MX, and in Flash 8 I had no problems with making buttons and putting some basic actionscipt on it. In CS3 for some reason when I make a button, look in the properties window and the button windows there (which tells me I'm on the buttons layer) but when I go to put the actionscipt in, it doesnt allow it. It says "Cannot add actionscript because blah blah". It only allows it with the frame, not the button if that makes any sence. Why is this?
Having Trouble With Basic Code
Hi
I have just started using logical operators and require some guidance. Basically Im trying to generate some values, not in an array though just variables.
This is basically what Im trying to do
Code:
a=3
_global.Y1=2;
_global.Y2=4;
_global.Y3=6;
for(i=0;i<=a;i++) {
x[i]=(some formula)*Y[i]
}
Then what I want to happen is the following calculations to take place and variable created;
x1=(some formula)*Y1
x2=(some formula)*Y2
x3=(some formula)*Y3
Can anyone provide assistance on my problem Im not sure where to start.
Thanks
New To AC3 Having Trouble With Some Basic Principals.
I`m an C++ and php coder trying to break into AC3 and flash. The coding side of ac3 is straightforward enough its the flash intergration that i`m having trouble with.
For instance I`ve been trying to get the example code at the bottom to work.
I save it out as main.as in my working folder.
I add a movie clip to my main layer with the instance name of ship_mc
then on the first frame of my actions layer I add the following code
Code:
import main;
var mainloop:Mainloop3 = new Mainloop3();
addChild(mainloop);
flash kicks out the error:
Code:
1046: Type was not found or was not a compile-time constant: Mainloop3.
1180: Call to a possibly undefined method Mainloop3.
I know im missing something simple, I dont have a problem with the code itself, its getting flash to behave itself. If I put the code in the timeline it doesnt work as then the packages are nested.
If I try the method where I make main.as the document class for the stage it kicks out even more errors.
I get the feeling the code needs to be attached to ship_mc somehow but I cant find how to do that in the flash interface...
If someone could point out the obvious error for me I`d appreciate it. Thanks
example code:
Code:
package {
import flash.display.MovieClip;
import flash.events.*;
public class Mainloop3 extends MovieClip {
static const RIGHT = 37;
static const LEFT = 39;
static const UP = 38;
private var keyPressedRight:Boolean;
private var keyPressedLeft:Boolean;
private var keyPressedUp:Boolean;
private var shipIncrement:int=0;
public function Mainloop3() {
addEventListener(Event.ENTER_FRAME, run);
stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDownListener);
stage.addEventListener(KeyboardEvent.KEY_UP,keyUpListener);
ship_mc.nextrotation=ship_mc.rotation;
ship_mc.dx=0;
ship_mc.dy=0;
ship_mc.speed=.2;
ship_mc.nextx=ship_mc.x;
ship_mc.nexty=ship_mc.y;
}
function run(e:Event):void {
getKeys();
moveObjectsInMemory();
render();
}
function keyDownListener(e:KeyboardEvent):void {
switch (e.keyCode) {
case LEFT:
keyPressedRight=true;
break;
case RIGHT:
keyPressedLeft=true;
break;
case UP:
keyPressedUp=true;
break;
}
}
function keyUpListener(e:KeyboardEvent):void {
switch (e.keyCode) {
case LEFT:
keyPressedRight=false;
break;
case RIGHT:
keyPressedLeft=false;
break;
case UP:
keyPressedUp=false;
break;
}
}
function getKeys() {
shipIncrement=0;
if (keyPressedRight) {
shipIncrement=5;
}else if(keyPressedLeft) {
shipIncrement=-5;
}
if (keyPressedUp) {
ship_mc.dx=ship_mc.dx+ship_mc.speed*(Math.cos(2.0*Math.PI*(ship_mc.rotation-90)/360.0))
ship_mc.dy=ship_mc.dy+ship_mc.speed*(Math.sin(2.0*Math.PI*(ship_mc.rotation-90)/360.0))
}
}
function moveObjectsInMemory() {
ship_mc.nextrotation=ship_mc.rotation+shipIncrement;
ship_mc.nextx=ship_mc.x+ship_mc.dx;
ship_mc.nexty=ship_mc.y+ship_mc.dy;
if (ship_mc.nextx < 0) ship_mc.nextx=300;
if (ship_mc.nextx > 300) ship_mc.nextx=0;
if (ship_mc.nexty < 0) ship_mc.nexty=300;
if (ship_mc.nexty > 300) ship_mc.nexty=0;
}
function render() {
ship_mc.rotation=ship_mc.nextrotation;
ship_mc.x=ship_mc.nextx;
ship_mc.y=ship_mc.nexty;
}
}
}
Trouble Using MX In Visual Basic 6
What a wonderful website and forum !
I upgraded my Flash 5 to Flash MX. I am having trouble using the ActiveX control (flash.ocx) in my Visual Basic application. I am using Windows XP.
Tried uninstalling swflash.ocx and flash.ocx as instructed in the Macromedia site. The moment I delete from the Registry and these files, they automatically are reinstalled.
Anyone, throw some light on me. I am in total darkness.
Thanks
Bayravin
Basic Motion Tween, Bad Transition
I'm creating some basic motion tweens of a few different objects. The sequence seems to tween smoothly until the second to the last frame where it jumps to it's final/destination position. Whereas flash should calculate the transition evenly between the start and end points. This is rare but not the first time I've encountered inconsistent tweening results. Anyone know what causes it, how to fix it, or how to work around it? I've tried adding frames and adding keyframes to fill in the missing transition points, but the error seems to evolve with my changes. I'm attaching fla sample. Thanks!
Basic Tween Problem For AS3.0 Beginner
hey i'm new to as3.0 just like this guy was (http://www.kirupa.com/forum/showthre...=280037&page=1) and i was trying to do the same thing. however, i WAS starting out w/ a movie clip. the original mc was called us_mc and then i gave it an instance name of pic_mc
Problem is i keep getting the following error message from flash cs3:
Error Message:
1120: Access of undefined property pic_mc.
For Source:
outTween = new Tween(pic_mc, "alpha", None.easeNone,1,0,1,true);
and
pic_mc.addEventListener(MouseEvent.MOUSE_OVER, fadeOut);
here's my code:
Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.Tween;
import fl.transitions.easing.*;
var outTween:Tween;
pic_mc.addEventListener(MouseEvent.MOUSE_OVER, fadeOut);
function fadeOut(event:MouseEvent):void
{
outTween = new Tween(pic_mc, "alpha", None.easeNone,1,0,1,true);
}
what am i doing wrong?!?!?! i'm very new to AS3.0, and any help would be greatly appreciated b/c this is really frustrating
Basic Calling Variable Trouble
I also posted this in the Communication Server forum
http://board.flashkit.com/board/show...hreadid=352871
but I think this is really an actionscript error...
I am trying to publish and recieve video streams using a variable.
The following code uses "Bobby" instead of a variable and works great...
**********************
nc = new NetConnection();
nc.connect("rtmp:/my_app/room_01");
usrStream = new NetStream(nc);
usrStream.publish("Bobby", "live");
usrStream.attachVideo(Camera.get());
lsrStream = new NetStream(nc);
User_video.attachVideo(lsrStream);
lsrStream.play("Bobby");
**********************
This code replaces Bobby with the variable _root.user and doesn't work...
**********************
nc = new NetConnection();
nc.connect("rtmp:/my_app/room_01");
usrStream = new NetStream(nc);
usrStream.publish(_root.user, "live");
usrStream.attachVideo(Camera.get());
lsrStream = new NetStream(nc);
User_video.attachVideo(lsrStream);
lsrStream.play(_root.user);
**********************
I set the variable _root.user before I execute the above script, and I display the variable in a dynamic text box (just for testing) and it displays the correct data... "Bobby"
My assumption is that I am not calling the variable correctly, maybe a + is missing or something.
Any insight would be greatly appreciated.
Thanks
I'm Having Trouble With The Most Basic Aspect Of Flash
Ever since I got flash back in June.
I haven't been able to create!
I'm still oblivious as to how the keyframe stuff REALLY works...
Sure I can operate it and navigate a bit through the interface...But I'm doing so blindly and aimlessly.
I cannot properly animate anything!
Here's a simple scenario. (example! I wouldn't use stick figures)
1.) I open flash, draw a circle, add arms and a body.
2.) I put a keyframe on '30' and while on '30', I position the arms and legs in to a different angle.
3.) I randomly right click on the time-line and insert a tween. (I don't know if it's siginificant as to where you right click and insert the tween)
4.) I press 'play' and I expect to see the arms and legs move into the position I put them in...Instead a blue outline of a square forms around the stick figure and moves the whole drawing to the right...
5.) and sometimes when inserting a tween onto the timeline, it will insert the run-of-the-mill dashed line across it..But leaves the keyframe at the end empty...Thus making me manually insert a tween into that empty frame, to make the dotted line whole...
SUMMARY: I'm having lot's of trouble using basic tweens..
BTW, when would one use 'Frame by frame' instead of Tweening?
And IF I ever do create a simple animation (like an Eye blinking), how would I loop it so It independantly "blinks"...As opposed to copy&pasting the same frames over and over again.
I hope I haven't confused you
Basic Flash Remoting Trouble
OK, this is the first remoting i have ever done in flash, and no success.
Heres my actionscript code on a button:
Code:
on(release){
myVars = new LoadVars();
myVars.action = "test";
myVars.onLoad = function(success){
if(success){
trace(this.go)
if(this.go = "yes"){
msg = this.msg;
}
} else {
trace("Error reading the php page");
}
}
myVars.SendAndLoad("mypath/test.php", myVars, "POST");
}
and here is my php code:
PHP Code:
<?PHP
if($POST['action'] == "test"){
echo "go=yes&msg=woohoo";
}
?>
I want the msg assigned to go into my dynamic text box named msg. Nothing is happening when i click the button
Any help is appreciated.
e39m5
[F8] Basic Trouble With Score Counter And Variables. Please Help
Hey guys I'm Sy, and I'm new here. Looks like a great site! Anyways.....
See I'm not completely new to Flash, but I'm pretty new. I've watched some tutorials on newgrounds.com to sorta get the hang of it, but i still have trouble with AS......and when I ask NG about my troubles they don't seem as friendly as here So......here's my problem.
Actually this is too complicated to explain in words, so i'll offer up the fla file. Its not like a big game that i care if people steal anyway. Its just one in a series of small "training projects" i'm doing to try to understand AS better.
Stuff about the game:
Anyways the concept's simple, you hit go and the number increases 30 times per second (cause thats my fps), then you got this other green number you're to match it to, to win. You hit the stop button when it matches the green number, which is random, and set to be in between 0 - 600. It's basically like a lightstopper type game with numbers. Or an normal day at the local gas station
What to know flashwise:
There are 4 keyframes. All have the timeline actions stop in them and nothing else.
1st frame has the go button and rising number and stop. All of the symbols except stop button have scripts.
2nd frame has the counter (now skyrocketing), a new green number called "devotion" (you'll soon find i really gotta start using logical variable names XD) which is what to match it to, and the stop button, now having a script.
3rd frame has the counter stopped at whatever you stopped it at, the green number is idle, and red text has appeared (a MC), reflecting the variable "gowoof" (which is basically the winning or losing message, great names huh?)
It also determines that variable, as well as variables for other symbols in that frame. It's important to check that out so please do!
Also in that frame is a black box that has absolutely no text due to laziness, but clicking it brings you back to the beginning of the timeline (to try again)
Also theres 2 MCs, one of a X and one of a checkmark, the X plays if the failing message is there, and the checkmark plays if the correct message is there.
Also theres a number under both the X and checkmark. These are what I'm here for......particularly the X one.
4th frame: Not important, when you win/lose by getting 7 right/wrong you go to that screen, however the score counters broken so this isnt the problem right now.
Problem: I've tried everything i could think of, for about a day, but i cant get the score counters to record how many wins/losses!!!!! The closest I've gotten to it keeping track was adding a 1 to 0. So it was like....
0
01
011
0111
But then that file got lost, and in the version i offer whoever's helping (thanks!) it turns from 0 to 1 and ONLY 1!
I have no idea why........
Please help with this......thanks in advance!
Oh also if its not too much trouble please dont just give me a fixed fla file? I want to learn so i'd rather AS code and what i did wrong/ need to improve, please....thanks!
Trouble With Downstate For Button (very Basic Stuff)
heres what i've got so far, its from lee's OOP tutorial. i've only added the red lines. there is four buttons, when pressed, i want the button to go to and remain in the rollover state , until another button is pressed. i know that i have to postpone the onRollOut within this function until another button is pressed but i'm a complete novice.. can someone offer a helping hand?
the buttons have instance names b1, b2, b3, b4
on each button, i have a gotoAndStop (frame) action: example below for b1
on(release) {
_root.Main_mc.gotoAndStop(171);
}
external .as file
class ButtonClass extends MovieClip {
public function ButtonClass() {
this.onRollOver = this.over;
this.onRollOut = this.out;
this.onPress = this.down;
}
private function over() {
this.gotoAndPlay(2);
}
private function out() {
this.gotoAndPlay(6);
}
private function down() {
this.gotoAndStop(5);
}
}
_x Tween Trouble
I am unable to tween into a specific position. Here is the code that I am using.
if (_root.arrow._x>330) {
_root.arrow._x-=70;
gotoAndPlay("loop");
} else{
gotoAndStop(1);
}
When I replace "-=70" with "--" I can hit the exact spot that I am going for, but it does not move fast enough.
Any suggestions would be greatly appreciated.
Thanks
Color Tween...
hey flashers..
im trying to create a color tween, from one to the next based off which button was clicked.
example.
BTN 1 | BTN 2 | BTN 3
when button 1 is clicked the current color fades to blue.
when button 2 is clicked the current color fades to red.
when button 3 is clicked the current color fades to green.
but i need a script that can know which color it currently is on.
say if its green and button 1 is clicked.. then the green fades to blue... or green to red if 2 is clicked.
make sense?
B&W To Color Tween
is it necessary to have 2 pix to tween a pic from b&w to color?
thanx
austin
Tween Color Help
I have been trying to use the interpolateTransform method and I cant get it to work.
Does anyone know of a good tutorial or can describe how they tween color with actionscript 3??
i pass the old this.transform.ColorTransform and the new color and .05 as the 3rd variable and i never see a blending tween!
please help me!!!
Color Tween
Hi all
I want Color Tween effect on Movie Clip with a button press.
e.g:
quote:on (release) {
var my_color:Color = new Color(my_mc);
my_color.setRGB(0xFF0000);
}
it set color but I want tween effect in it. I want a tween effect to my Movie Clip with a button press.
Edited: 06/07/2007 at 05:54:31 AM by artifical intelligen
Color Tween
Hi all
I want Color Tween effect on Movie Clip with a button press.
e.g:
quote:on (release) {
var my_color:Color = new Color(my_mc);
my_color.setRGB(0xFF0000);
}
it set color but I want tween effect in it. I want a tween effect to my Movie Clip with a button press.
Tween Color?
Anybody knows how to change the color in the "flop" mode? Would like the "backside" to be grey and I want this to animate aswell. Thank you.
The code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
box.onRelease = function() {
if(this._xscale > -50) {
flip(this);
}
else {
flop(this);
}
}
function flip(who) {
var tw:Tween = new Tween(who,"_xscale",Bounce.easeOut,100,-100,1,true);
}
function flop(who) {
var tw:Tween = new Tween(who,"_xscale",Bounce.easeOut,-100,100,1,true);
}
Color Tween
Ok, I have been searching around this forum for a few days and have discovered a few threads on different methods of tweening mc colors in actionscript. My ultimate goal is to write a function that you pass a target color and the function then tweens the movie clip from its current color to the designated target color. I know i'm not very close...and that it doesnt even work but in the attached fla is what I have. I appreciate your help very much
Color Tween
i'm having a movie clip, and i'm setting it's background through XML differently for every image. how can i create a color tween effect between one colour and another when next or previous buttons are pressed?
4 Color Tween
Lets say I have 4 boxes that are each of different color, and that I have 4 buttons that represent each colored box. So that when each button is clicked the colored boxes change color based upon the tween between the two of them. I know how to tween, but I'm not sure how to use AS3 to make this simple and efficient.
Any help would be appreciated.
Two Way Color Tween
Hi, I have a movieclip and I would like to give it a smooth color animation from dark grey to blue when it is being hovered over and the reverse when you move the mouse out, like what you would expect from making a shape tween in the timeline and then use
nextFrame() and prevFrame() to make it smooth and responsive.
So far I can sharply change the color but I'm pretty stuck.
Any suggestions would be really appreciated
Code:
import fl.motion.Color;
var colorInfo:ColorTransform = item.transform.colorTransform;
item.addEventListener(MouseEvent.MOUSE_OVER, tweenToBlue);
function tweenToBlue(e:MouseEvent):void
{
colorInfo.color = Color.interpolateColor(0x333333, 0x0033CC, 1);
item.transform.colorTransform = colorInfo;
}
Color Trouble
Hello, I have a file in Illustrator CS, and whenever I bring it into Flash, the colors aren't right. I tried to go from illustrator to photoshop, then to Flash, but the colors are off. I also tried Illustrator to Flash. Still no luch.
The image is rather complicated and I can't change the color in Flash.
Any ideas?
thanks
Color Trouble...
Hello hello,
I'm having trouble with some scripting.
I have 2 butons...im using variables...and... on rollover...the buttons fades to magenta... on rollout... the buttons fades beack to white. What I want to do is...if you click one button...that one stays magenta...while the other one stays white... if you click the other button... the firtst button turns back to it's original state.
I've tried using only the movies but I can't get it to work...So I tried using setRGB...but... isn't it possible that... in the IF - part...I can say something as: go to original color ... or... disable the part setRGB???
Below you can see the script of one button. I'm not so good at explaning so I hope i'm not rambling here.
on (rollOver) {
but2.gotoAndPlay("magenta");
}
on (rollOut) {
but2.gotoAndPlay("white");
}
on (release, releaseOutside) {
stopxback = -1481.2;
stopxfront = 494.9;
_root.back.gotoItem(this);
_root.front.gotoItem(this);
myColorObject = new Color(_root.front.but2);
myColorObject.setRGB(0xFF0099);
_root.var2 = 1;
if (_root.var1 == 1) {
myColorObject = new Color(_root.front.but1);
myColorObject.setRGB(0xFFFFFF);
_root.var1 = 0;
}
I hope someone can help me?
greetz...
}
Color Trouble...
Hello hello,
I'm having trouble with some scripting.
I have 2 butons...im using variables...and... on rollover...the buttons fades to magenta... on rollout... the buttons fades beack to white. What I want to do is...if you click one button...that one stays magenta...while the other one stays white... if you click the other button... the firtst button turns back to it's original state.
I've tried using only the movies but I can't get it to work...So I tried using setRGB...but... isn't it possible that... in the IF - part...I can say something as: go to original color ... or... disable the part setRGB???
Below you can see the script of one button. I'm not so good at explaning so I hope i'm not rambling here.
on (rollOver) {
but2.gotoAndPlay("magenta");
}
on (rollOut) {
but2.gotoAndPlay("white");
}
on (release, releaseOutside) {
stopxback = -1481.2;
stopxfront = 494.9;
_root.back.gotoItem(this);
_root.front.gotoItem(this);
myColorObject = new Color(_root.front.but2);
myColorObject.setRGB(0xFF0099);
_root.var2 = 1;
if (_root.var1 == 1) {
myColorObject = new Color(_root.front.but1);
myColorObject.setRGB(0xFFFFFF);
_root.var1 = 0;
}
I hope someone can help me?
greetz...
}
Multiple Tween Trouble
Ok are you sopposed to have more then 1 dif. kind of tweens on 1 layer....or are u sopposed to make a seperate layer 4 a seperate tween
thx alot 4 the help
this ? is bothering me
Fade In Tween Trouble...
maybe i'm completely crazy... i'm trying to tween a mc symbol... just a simple alpha fade... on the main timeline of a swf... he symbol is made of dynamic text embeded... but of two different text boxes... converted to grapic symbols... on two different layers... in the mc symbol... is there something wrong with me...? it wont tween... i've tried it with one layer... i've tried it grouping them... i need the fonts to be two different sizes in the one symbol...
help... it's probably something silly...
[FCS3] Tween Trouble In CS3
My Flash experience is in using Flash8, and I'm currently using CS3 for the first time. I am however using AS2.0, not 3.0.
I'm using several motion tweens between various keyframes in a layer of a movieclip. Each tween is from a keyframe with a symbol instance set at color: Alpha, 0% and the same symbol with color: Alpha, 100%. These appear to be functioning properly. Below that layer I have a layer with almost identical "static" symbols. The intended effect being part of the swf "fades in."
However, by the second frame as the alpha starts to tween in, the entire image (including the normal static layer) is washed out as if the tween layer has 100% opacity over the static fill layer.
I've done the exact same thing in the past using Flash8, so maybe I'm just forgetting something. Thanks for any help!
Tween Class Trouble
An swf is worth a thousand words, so....
Please go to http://www.datapixel.eu/datapixel.htm
and watch yourself. When you click on "Apri Menu" (Open Menu in english) an animation made with the Tween class shows.
It should enlarge the green panel in order to show the buttons. And IT DOES! .... sometimes.
Instead sometimes the animation stops prematurely and the menu is not correctly viewed. Do you know what's happening?
Thanks.
Trouble With The Tween Class
I'm having trouble with this code, it's for tweening Thumbnails in a photo gallery application I'm building:
Code:
var tween:Tween = new Tween(Thumbnails[Thumbnails.cur_thumbnail], "_alpha", mx.transitions.easing.Strong.easeIn, 40, 100, 1, true);
Thumbnails.cur_thumbnail = new_thumbnail;
What happens is while the tween variable is tweening the value of Thumbnails.cur_thumbnail changes therefore cutting off the tween before it gets started or at least I'm assuming this is what's happening.
How do I get around this? Thanks.
Tween Class Trouble
Well, firstly, excuse my poor english... I guess its not so good, but I hope you can understand me.
Well, I have imported the tween class at my .fla file with:
-------
import mx.transitions.Tween;
import mx.transitions.easing.*;
-------
as everywhere says it must be done. Later, I use:
-------
ROLLOVER:
var tw:Tween=new Tween(plano_mc, "_xscale", mx.transitions.easing.Elastic.easeOut,40, 100, 40, false);
var tw2:Tween=new Tween(plano_mc, "_yscale", mx.transitions.easing.Elastic.easeOut,40, 100, 50, false);
-------
inside a function that i call on the rollover method for the movieClip I want to tween.
The trouble comes in the rollOut method, where I have this code:
-------
ROLLOUT:
var tw:Tween=new Tween(plano_mc, "_xscale", mx.transitions.easing.Elastic.easeOut, 100,40, 1, true);
var tw2:Tween=new Tween(plano_mc, "_yscale", mx.transitions.easing.Elastic.easeOut, 100,40, 1, true);
-------
After the user rolls out, and even after the rollOut tween is well done, it resizes to the 100%, even if I'm out of the hitArea for the rollOver. All this instead of staying at the 40% of _xscale and _yscale, that is what I wanted the class to do (you can see it in the parameters of the tween).
It only happens in the rollOut method, because the rollOver doesn't get resized after is called as well as the rollOut... It should be logical if it should happen at both methods, but it just happens at RollOut, and even, each time I rollOut, is just one (or both sometimes) property which gets resized (sometimes the _yscale, other times the _xscale....). Is there any explanation for this???
I want to erase this error, that I can't find why happens. My only explanation is that Robert Penner did a bad class, but I don't really trust it because he is a Flash master and I'm just a beginner, so, please
pleeeeeaaaase!, anybody help me!
Thank you very much!
Tween Class Trouble
I have 2 tweens. I want my first one to be around 50% completed to start my second one. How do I do that ?
Code:
var Tween_right:Tween = new Tween(_root.mc_holder.mc_backgroundBlue, "_x", Strong.easeOut, 0, 525, 1, true);
var AlphaUp:Tween = new Tween(obj, "_alpha", Regular.easeOut, 0, 100, 1, true);
AlphaUp.stop();
Trouble With HitTestPoint And Tween
Hi guys,
I'm having a trouble with hitTestPoint and tween. Well, if you look at the code you will understand what I am trying to archive here.
---------------------
var action:Tween;
target01.alpha = 0.6;
target01.addEventListener(Event.ENTER_FRAME, transition01);
function transition01(event:Event):void {
if (target01.hitTestPoint(mouseX, mouseY, true)) {
action = new Tween(target01, "alpha", Strong.easeOut,0.6, 1, 1, true);
} else {
action = new Tween(target01, "alpha", Strong.easeOut,1, 0.6, 1, true);
}
}
---------------------
Yes, that's right. I'm trying to make the movie clip 'target01' to fade in once the mouse pointer roll-overs, and fades out when roll-out. But tween actions don't work...
Yes, I did MouseEvents instead, but it is not the way I want it.. Please help me outta here guys.
Trouble With A Shape Tween
Howdy guys,
I got this problem with a shape tween in my project. Its basically a CBt type of deal. But the problem is when u click on a button and go to the page, a shape tween of a semi-transparent box betting bigger is supposed to happen, it is also a movie clip. It happens inside of it. It happens in the flash file, but when I export it it goes all wierd. The box is supposed to come from the top left and go to the right bottom. But when it plays it only shows the right side line.
Are both the timelines supposed to be the same amount. There both 10 frames. Any kind of help will be greatly appericated.
thanks
Tween Class Trouble
I don't use Tween class often, so don't scold me if this is an obvious question.
When I set up a simple Tween, it works if I assign a specific object's instance name as the object to tween. But when doing it inside a for loop, it doesn't work. Yet everything else within the for loop works. I've tested every variable, and it's the object name that doesn't work. Here is a simplified version of the code. Someone please tell me what I've done wrong.
Attach Code
import mx.transitions.Tween;
import mx.transitions.easing.*;
for (var k:Number = 1; k<15; k++) {
var dakine = this["letter"+k];
dakine.onPress = function() {
this._xscale = this._yscale=90;
this.startX = this._x;
this.startY = this._y;
startDrag(this);
};
dakine.onRelease = dakine.onReleaseOutside=function () {
stopDrag();
this._xscale = this._yscale=100;
var letterUp:Tween = new Tween(this, "_x", Bounce.easeOut, this._x, this.startX, 2000);
};
}
Color Tween W/actionscript
hi.
i have got the following problem:
i made a navigation menu w/ 7 elements. the menu bar is in monochromatic (so it consists i.e. of 3 different blues(lite,mid,dark) to give an overall impression of blue...)
i want to morph the colors whenever the user clicks on one of the navigation elements so that every meun area has its own color.
ok, if i had 3 menu elements i would simply create the color tweens by hand - but the problem is w/ 7 elements i would have to make 7*7-7= 42 morphs! thats just mpossible! therefore i would like to make this w/ action script.
a color tween w/actionscript.
how to do this?
thx
inuit (ttaggg@mail.ru)
Problems W/color Tween
hi.
i have a problem w/ an actionscript color tween.
the following script is attached to a button
dr = 134; dg = 0; db = 91;fw = 30; // those are the color values of this particular button
_root.waves.dark.rStart=_root.DRS;_root.waves.dark .gStart=_root.DGS;_root.waves.dark.bStart=_root.DB S; //_root.DRS is the actual color value
_root.waves.dark.rEnd = dr;_root.waves.dark.gEnd = dg;_root.waves.dark.bEnd = db;
_root.waves.dark.frames = fw;_root.waves.dark.xDo = _root.waves.dark.colorSetUp;
_root.DRS = this.dr; _root.DGS = this.dg; _root.DBS = this.db; // this saves the color values for the next morph
_root.MRS = this.mr; _root.MGS = this.mg; _root.MBS = this.mb;
_root.LRS = this.lr; _root.LGS = this.lg; _root.LBS = this.lb;
|