RGP(custom Character) Contoling Color = Help
Hi, I have a MC that has 2 layers: one has the outline and the other the shape. Then I have two buttons that chance the color of the MC. I want only want the "shape" layer to chance color. And because I want to able to make many more shapes in the MC, I donīt wanīt to have to make a MC out of each and every one.... (see fla. for details)Can anyone help me? This is the button code i am using. Code: on (press) {tellTarget ("/hair") {color = new Color(_root.hair); color.setRGB(0xF0520F); }
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 06-23-2006, 08:43 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
RGP(custom Character) Contoling Color
Hi, I have a MC that has 2 layers: one has the outline and the other the shape. Then I have two buttons that chance the color of the MC. I want only want the "shape" layer to chance color. And because I want to able to make many more shapes in the MC, I donīt wanīt to have to make a MC out of each and every one....
Can anyone help me?
This is the button code i am using.
Code:
on (press) {
tellTarget ("/hair") {
color = new Color(_root.hair);
color.setRGB(0xF0520F);
}
Game Help: Custom Character Color MC
Hello, I am making a custom character menu. I have a color code that works and all my buttons work. The buttons work by going to an MC that has "hairoptions" and selecting a frame(with the wanted hair..for example: short). But my problem is that I want my ColorPicker to always apply color to the object you just selected. So I donīt have to make a Color-Picker to each and every option ...
So my question is: How to select an MC and have the color picker only be applied to that MC, and when I select another one, the color picker would only be applied to that MC and so on ...?
Can anyone help?
Code:
This is my button code:
hairshortb.onPress = function () {
optionsmenu.gotoAndStop("hairshortb");
}
This is my color code:
Code:
function red() {
var my_color:Color = new Color(what to write here?);
var myTransform:Object = my_color.getTransform();
myTransform = { ra: 228, ga: 73, ba: 35};
my_color.setTransform(myTransform);
}
Help With Custom Character Menu Multi MC Control
Hi. Iīve been making a custom character menu, and I ran into a problem... I have an MC called "hair", and another one called "beard". These MCīs have buttons that tell the MC to gotoAndPlay() a frame label. There I have my options on for example "short hair", "long hair". Then I have a Coloring Box, that chances the color of the options MC.(see fla. and swf. for more details) But My problem is: How can I make the ColorPicker/Box, be applied to the option that was selected and then chance to the next option when another one is selected?
Is there a way to do something like when this button is pressed: "Activate ColorPicker on target that is selected" and then when you select another button/option, the same thing will happen and so on ...?.
I know that I can do this by making a function for each color and MC over and over again. But that will take far to long to do, but Im sure there must me more efficient way to this ...
Can anyone help me?
Example of my Color Code:
Code:
function red() {
var my_color:Color = new Color(//not sure what to write here, because I need multible targets....);
var myTransform:Object = my_color.getTransform();
myTransform = { ra: 228, ga: 73, ba: 35};
my_color.setTransform(myTransform);
}
Changing Color Of Particular Character
i wanted to Change the the color of particular character in textfield.The below code changes the whole textfield color to red Completely.
myTextFormat = new TextFormat(this);
myTextFormat.Color = "0xFF0000";
Mytext.setTextFormat(myTextFormat);
here Mytext refers to a name of Dynamic text field.
How do i change color of particular characters in textfield by having an input where user can enter any character number in textfield?
Contoling MC Time Line Externaly
Hi,
I need to know how to control a movie clips time line externally. So for example how would I tell an MC to play x frame when the mouse is over it?
Thanks
Contoling Loaded SWFs From Within A Component (AS3)
Hi,
I have an SWF that consists of a datagrid that opens and closes behind a titlebar when clicking on the titlebar. it workd fine and here is the code for it.
import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.events.MouseEvent;
var expandStatus = 0;
root.addEventListener(MouseEvent.CLICK, expand);
function expand(e:MouseEvent):void{
//trace ("Click");
if (expandStatus == 1){
this.Titlebar.Expander.rotation = 0;
var tContract:Tween = new Tween(this.Totalbar, "y", Strong.easeOut, 260, 20, .5, true);
var sContract:Tween = new Tween(this.Expanded, "y", Strong.easeOut, 20, -240, .5, true);
expandStatus = 0;
}else{
this.Titlebar.Expander.rotation = 90;
var tExpand:Tween = new Tween(this.Totalbar, "y", Strong.easeOut, 20, 260, .5, true);
var sExpand:Tween = new Tween(this.Expanded, "y", Strong.easeOut, -240, 20, .5, true);
expandStatus = 1;
}
}
BUT!!! when i load this SWF into a list component it displays but the interaction is lost.
I imagine it has something to do with the referencing being lost but i can't quite pin it down.
Thanks for any help.
Custom Color Mixer
Hi;
I'm wondering how to make a color mixer just like the one that Flash o Photoshop have.
It's possible since I saw one working in a logo design site and now I need my own for a design tool that I'm making to put in my site.
But really don't have any idea how to make one.
Any ideas would greatly be appreciated!
Custom Color Effect
Hi. We have a client that wants an effect similar to the one found in
the link below. In all honesty I don't even know what I would search
under in flashkit. We are fairly new to Flash and have done nice movies
involving image transitions but never attempted anything like this.
Would anyone have advice as to where I can find a tutorial or a basic
idea how to accomplish this? We are using Flash CS3.
Here is the link of the sample:
http://ustile.com/dabPreload.html
Thanks for any input.
Fred
Is There Some Way To Create Custom Color Variable?
I'm creating a fairly complex animation frame-by-frame, but I would like to be able to change the color of certain parts of it dynamically. The only approach I can think of is changing each section into a movieclip, putting them all into an array and then looping through the array and assigning a color. However, the animation is long and since the colored shapes constantly change, I would end up with more than a hundred MCs.
A better option, if possible, would be to create a custom variable that I assign as a color in the color picker. So, instead of choosing a value like "#CCCCCC", I would be able to assign a name like "customColor", then I would dynamically change the value of "customColor" in AS3. Is that at all possible? Do you know of any extensions that add that functionallity?
Is There Some Way To Create Custom Color Variable?
I'm creating a fairly complex animation frame-by-frame, but I would like to be able to change the color of certain parts of it dynamically. The only approach I can think of is changing each section into a movieclip, putting them all into an array and then looping through the array and assigning a color. However, the animation is long and since the colored shapes constantly change, I would end up with more than a hundred MCs.
A better option, if possible, would be to create a custom variable that I assign as a color in the color picker. So, instead of choosing a value like "#CCCCCC", I would be able to assign a name like "customColor", then I would dynamically change the value of "customColor" in AS3. Is that at all possible? Do you know of any extensions that add that functionallity?
Is There Some Way To Create Custom Color Variable?
I'm creating a fairly complex animation frame-by-frame, but I would like to be able to change the color of certain parts of it dynamically. The only approach I can think of is changing each section into a movieclip, putting them all into an array and then looping through the array and assigning a color. However, the animation is long and since the colored shapes constantly change, I would end up with more than a hundred MCs.
A better option, if possible, would be to create a custom variable that I assign as a color in the color picker. So, instead of choosing a value like "#CCCCCC", I would be able to assign a name like "customColor", then I would dynamically change the value of "customColor" in AS3. Is that at all possible? Do you know of any extensions that add that functionallity?
Is There Some Way To Create Custom Color Variable?
I'm creating a fairly complex animation frame-by-frame, but I would like to be able to change the color of certain parts of it dynamically. The only approach I can think of is changing each section into a movieclip, putting them all into an array and then looping through the array and assigning a color. However, the animation is long and since the colored shapes constantly change, I would end up with more than a hundred MCs.
A better option, if possible, would be to create a custom variable that I assign as a color in the color picker. So, instead of choosing a value like "#CCCCCC", I would be able to assign a name like "customColor", then I would dynamically change the value of "customColor" in AS3. Is that at all possible? Do you know of any extensions that add that functionality?
Custom Imported Color Swatch Pallets
I want to scan construction paper and import those files as color swatches so when i make my next movie it will have a texture that plain colors cant establish. But given i can import jpgs or gifs as a color swatch, if you use the current multi color swatches it will scale to the shape. So my questions are 1) is it possible to import a picture and have it act like a color and how, and 2) if i can do that how do i disable the automatic scaliing of the picture?
Thanx
Custom DataGrid Cell Color Is Not Transparent
Hello,
I have a DataGrid that looks like this (http://www.kancelarijahatipovic.com/images/dataGridProb.jpg). Howevery, when I try to change the color of it via CSS Styles, I change the color, like a nice blue to match the background of my application, but this blue is not transparent like the default green that comes with the DataGrid component.
Is there a way to make a custom DataGrid Cell Color transparent?
Regards,
Mirza
Actionscript 2.0: Custom Color Transform Class
Forum,
I've never used actionscript 2.0, but I found the link to the custom color transform class and would like to see what it does. Could anyone provide me an example? I was able to follow the tutorial but was stuck when it came to what I needed to put on my movieclip, and I did not do it right. :-(
Custom Color Blinking Cursor For Form Fields? Is It Possible?
This question has been asked a few times here but I never saw much of a response so here goes again. I've seen a light-colored cursor in forms fields that are in dark colored movies. How the heck.....? The last time I saw it I think was at Oringe. Any info appreciated....thnx.
Custom Dynamic Text Field .changing The BG Color?
i need to make a dynamic text box with a transparent BG....here is my code. also i would like any other code to help customize it..thanks!
Code:
loadText = new LoadVars();
loadText.load("http://www.akmphoto.net/images/example.txt");
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.exampletext;
};
The & Character In Flash...how To Use URLs That Contain The & Character...
I am loading in an array or urls from my database via php into my flash movie.
the output of my script looks like this:
quote:
--------------------------------------------------------------------------------
&id=1,&imagelist=1.jpg,&urls=http://www.homemade.ch/shop/100/conliste.asp?langext=&katno=8|&titles=Silence|&com ments=Silence, a painting by Bea Fehr|
--------------------------------------------------------------------------------
problem is that the url contains the '&' character, which Flash uses to seperate the variables....
ex:
http://www.homemade.ch/shop/100/con...angext=&katno=8
but problem is that it is being read into flash as this:
http://www.homemade.ch/shop/100/con_liste.asp?langext=
becuase Flash cuts it off when he see the '&' sign.
How can I workaround this problem, has to be a common issue I would guess since lots of URLs have this format....?
Do I need to write some parsing code?
Are There Any Tutorials About Creating A Live Preview And Custom Icon For Custom Flash Components
Hi
I need tutorials about the custom components and how to make a live preview for them and also custom Icons,
basically I want to know if we can put an swf in the live preview field and when we are in the design view of the component that I can interact with the swf like click it and show a copyright message (all at design time not run time of the component)?
and about the custom Icons, flash asks for Fireworks PNG and when I put mine it does not show in the library???
thanks.
Custom Tabbed Menu Needing Custom Event?
Hi everyone,
I managed to solve my flash asset problem I was having last week and successfully created a for loop to loop through an array and make me my animated tabbed menu.
A brief explanation of what's happening... I have built an animated tab (animated with AS3 tweening) so when a user rolls mouse over it makes the tab image pop up from below the text then on roll out it makes the tab image drop back down again.
What I'm trying to achieve is when user clicks on tab it will keep the tab image behind it, but when the user clicks another tab it runs the animation that drops the currently selected and maintains the one just clicked.
current creation code is below.
Code:
// create main menu tab components
for (var i:int = 0; i < menuArray.length; i++)
{
var menuTab:MainMenuTab = new MainMenuTab();
tabContainer.addChild(menuTab);
menuTab.x = i * 106;
menuTab.setLabelText(menuArray[i]);
// event listeners
menuTab.addEventListener(MouseEvent.CLICK, tabClickHandler);
What is happening is I make an instance of menuTab then add it to the 'tabContainer' which is a standard flex canvas on the stage, it then obviously assigns the spacing, sets the label (public function inside flash swc). The click handler is then added which runs a public function inside the flash symbol to get the tab to stick to the top and not drop down.
Now I really can't get my head around how to get the tabs I'm not clicking on to respond to the click. I can obviously get the one I am clicking on to repond no problem by going through 'event.currentTarget' but I need to also tell the rest of them to check to see if they are currently selected, if they are then to drop down so I don't have more than one tab selected at a time.
I have tried having a public var that acts as the selectedIndex and sending that to the flash component, but again the problem is getting the other tabs that aren't being clicked the data and to do something and I have no idea how to reference them?!
Anyone please help? Is there some way I can loop through the children of the flex canvas or something?
Custom Cloting Design (Custom Tailor Store)
Hello ,
i want to develop a project for designing custom Dress Shirts.
like there will be different objects (buttons, half sleeve , full sleeve , etc)
clicking the objects or drag them to working Area , will make the full shirt ,
Like custom Tailor Store ,
Is there any thing similar any body has seen ? (any open source)
if not then how can i make it .
Any help will be really Appreciated ,
Regards.
Custom Cursor + Custom Scrollbar = Problem
Ok, this is the thing: I made a scrollbar in flash, just like I made a cursor. the cursor only works when I set the settings to flash < 6 and as soon as I use the scrollbar while also using the cursor, it stops working. i suck at AS-ing and any help would be greatly appreciated.
~YF220
PS: .fla included.
Custom TreeItemRenderer Removes Custom Component
Hello,
I have created custom TreeItemRenderer in which i am trying to draw colored Hbox bar at each node except root. Intially when i click on root node it opens first child node with bar but when i open leaf node it does not showing bar and removing existing bard from other few child nodes. Its calling itemrenderer on mouseonver eventhough i have disabled. I am attaching code would please any one help me to resolve this issue.
Attaching Code here
package Adodbe.renderers
{
import flash.display.DisplayObject;
import flash.events.Event;
import flash.events.MouseEvent;
import mx.collections.*;
import mx.containers.HBox;
import mx.controls.Label;
import mx.controls.TextInput;
import mx.controls.treeClasses.*;
import mx.core.UITextField;
public class PercentCorrectTreeRenderer extends TreeItemRenderer
{
private var hBox:HBox;
private var barHBox:HBox;
private var itemLabel:Label;
private var textBar:Label;
private var fillBar:TextInput;
// Define the constructor.
public function PercentCorrectTreeRenderer()
{
super();
}
override public function set data(value:Object):void
{
super.data = value;
var treeItem:Object = TreeListData(super.listData).item;
if(!treeItem) return;
if(treeItem.Element && treeItem.Element == "Root")
{
this.setStyle("styleName", "percentCorrectTreeSection");
}
else
{
this.setStyle("styleName", "percentCorrectTreeSectionItem");
}
}
override protected function createChildren():void
{
super.createChildren();
label.addEventListener(MouseEvent.CLICK, onLabelClick);
label.addEventListener(MouseEvent.MOUSE_OVER, onLabelMouseOver);
barHBox = new HBox();
fillBar = new TextInput();
textBar = new Label();
fillBar.editable = false;
fillBar.styleName = "barStrengths";
barHBox.addChild(fillBar);
barHBox.addChild(textBar);
barHBox.setStyle("paddingLeft",200)
this.addChild(barHBox);
}
override protected function measure():void
{
super.measure();
var w:Number = data ? ( listData as TreeListData ).indent : 0;
if ( disclosureIcon )
w += disclosureIcon.width;
if ( icon )
w += icon.measuredWidth;
if ( label.width < 4 || label.height < 4 )
{
label.width = 4;
label.height = 16;
}
if ( isNaN( explicitWidth ) )
{
w += label.getExplicitOrMeasuredWidth( );
w += barHBox.getExplicitOrMeasuredWidth( );
measuredWidth = w;
measuredHeight = Math.max( barHBox.getExplicitOrMeasuredHeight( ), label.getExplicitOrMeasuredHeight( ) );
}
else
{
label.width = Math.max(explicitWidth - ( w + barHBox.getExplicitOrMeasuredWidth( ) ), 4 );
measuredHeight = Math.max( barHBox.getExplicitOrMeasuredHeight( ), label.getExplicitOrMeasuredHeight( ) );
if ( icon && icon.measuredHeight > measuredHeight )
measuredHeight = icon.measuredHeight;
}
}
override protected function commitProperties( ): void
{
super.commitProperties( );
}
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
barHBox.setActualSize(barHBox.getExplicitOrMeasure dWidth(),barHBox.getExplicitOrMeasuredHeight());
if (icon)
icon.y = (unscaledHeight - icon.height) / 2;
if (disclosureIcon)
disclosureIcon.y = (unscaledHeight - disclosureIcon.height) / 2;
var treeItem:Object = TreeListData(super.listData).item;
if(!treeItem) return;
if(treeItem.Element && treeItem.Element == "Root")
{
this.label.text = treeItem.Title +" - "+treeItem.NumberCorrect +" correct ("+treeItem.PercentCorrect+"%)";
barHBox.visible = false;
fillBar.setStyle("borderStyle","none");
}
else
{
if(treeItem.children.length > 0)
{
this.label.text = treeItem.Title +" "+treeItem.NumberCorrect;
fillBar.width = Math.round((200 * Number(treeItem.PercentCorrect))/100);
fillBar.height = 15;
textBar.text = treeItem.PercentCorrect + "%";
fillBar.styleName = "barStrengths";
barHBox.y = disclosureIcon.y - 5
}
else if(treeItem.children.length == 0)
{
disclosureIcon.visible = false;
this.label.text = treeItem.Title +" "+treeItem.NumberCorrect;
fillBar.width = Math.round((200 * Number(treeItem.PercentCorrect))/100);
fillBar.height = 15;
textBar.text = treeItem.PercentCorrect + "%";
fillBar.styleName = "barStrengths";
barHBox.y = disclosureIcon.y - 5
}
}
}
private function onLabelClick(event:Event):void
{
var obj:Object = event.target;
}
private function onLabelMouseOver(event:Event):void
{
var obj:Object = event.target;
}
}
}
Any help would much appriciated.
Thanks
How To Change MovieClip RollOver Color(NOT Single Color, But Gradient) Dynamically ?
hi
I have created this for single color.But how to change when it is a gradient color.
for single color rollover code.
Code:
rollcolor = "0xFF0000";
normalcolor = "0x339900";
my_color = new Color(my_mc);
my_mc.onRollOver = function() {
my_color.setRGB(rollcolor);
};
my_mc.onRollOut = function() {
my_color.setRGB(normalcolor);
};
Thanks in advance
How To Change MovieClip RollOver Color(NOT Single Color, But Gradient) Dynamically ?
hi
I have created this for single color.But how to change when it is a gradient color.
for single color rollover code.
ActionScript Code:
rollcolor = "0xFF0000";
normalcolor = "0x339900";
my_color = new Color(my_mc);
my_mc.onRollOver = function() {
my_color.setRGB(rollcolor);
};
my_mc.onRollOut = function() {
my_color.setRGB(normalcolor);
};
Thanks in advance
Changing Fill Color And Line Color Dynamicly And Seperately
Hi community,
In this case, I am going to load a swf with a looping animation colored in black and white only. I want to change the color of the animation dynamicly so that I could have different color at each time. Here is my code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import flash.display.*;
import flash.net.URLRequest;
private function init():void{
myCan.addEventListener(Event.ENTER_FRAME,capMotion);
}
private function capMotion(event:Event):void{
var bmd1:BitmapData = new BitmapData(mySwf.width, mySwf.height, true, 0x00CCCCCC);
bmd1.draw(mySwf);
var bitmap1:Bitmap = new Bitmap(bmd1);
bitmap1.x = 0;
bitmap1.name="org";
if (map.getChildByName("org") != null){
map.removeChild(map.getChildByName("org"));
}
map.addChild(bitmap1);
var bmd2:BitmapData = new BitmapData(mySwf.width, mySwf.height, true, 0xFFFFFFFF);
var pt:Point = new Point(0, 0);
var rect:Rectangle = new Rectangle(0, 0, mySwf.width, mySwf.height);
var threshold:uint = 0xFF999999;
var color:uint = 0xFFFFFF00;
var maskColor:uint = 0x00FF0000;
bmd2.threshold(bmd1, rect, pt, ">=", threshold, color, maskColor, true);
var bmd3:BitmapData = new BitmapData(mySwf.width, mySwf.height, true, 0xFFFFFFFF);
threshold = 0xFF000000;
color = 0xFF00CCCC;
maskColor = 0xFFFFFF00;
bmd3.threshold(bmd2, rect, pt, "==", threshold, color, maskColor, true);
var bitmap2:Bitmap = new Bitmap(bmd3);
bitmap2.name="dup";
bitmap2.x = bitmap1.x + bitmap1.width + 10;
if (map.getChildByName("dup") != null){
map.removeChild(map.getChildByName("dup"));
}
map.addChild(bitmap2);
}
]]>
</mx:Script>
<mx:Canvas id="myCan" x="10" y="10" width="650" height="603">
<mx:SWFLoader id="mySwf" width="100" height="250" horizontalCenter="0" verticalCenter="-7.5" source="dance.swf" complete="init()" scaleContent="false" autoLoad="true"/>
<mx:Image x="61" y="320" width="550" height="152" id="map"/>
</mx:Canvas>
</mx:Application>
It works quite fine but I afraid that it's quite resource consuming using enterframe and bitmap drawing. Is there any better method?
Thanks for help.
How Would I Go Changing Lots Of Movieclips Color And Border Color Seperatly?
I am in the making of a isometric level editor, and I have about 15 movie clips with more to come.
I want to let people change the color of tiles to what they want from a list of colors, so how can I let them change the color of a tile dinamicly with actionscript so that it changes a tile's color while preserving changes of "shadows"?
I mean I have let's say a cube and to make it look 3D I need to change each face to make a feeling of 3D and not a flat one.
thanks.
Custom Events For Custom Classes
So what I'm trying to build is a custom class wich connects to a php socket server using an XML socket.
I don't know how I can broadcast an event so I can write something like the code below. Anyone can help ?
Attach Code
myClass= new myOwnClass();
myClass.onConnect=connectionHandler;
function connectionHandler{
//do something;
}
Keeping Character On Stage Plus Keeping Moving Background With Character On Stage
Im in the process of creating a superman game.. and i right now have him in walking mode .. i created him which is superman_mc . which has his waking animations etc.. inside and i have created a background mc which is level1_mc which basicly moves along with superman as he walks. .the problem i am getting is keeping the back ground from moving off the stage and superman from going off the stage i can keep superman on the stage and in one place on the stage with the code i have now but the background still moves off.. here is the code i have :
stop();
//Superman walk & flying movements
fly = "off";
_root.onEnterframe = function() {
if (Key.isDown(70)) {
_root.superman_mc.gotoAndPlay(4);
_root.superman_mc._y -= 17;
fly = "on";
}
if (_root.superman_mc, hitTest(_root.right_mc)) {
_root.superman_mc._x = 700;
}
//moves superman right
if (Key.isDown(39) & fly == "off") {
_root.superman_mc.gotoAndPlay(3);
_root.superman_mc._x += 17;
_root.level1_mc._x -= 17;
direction = "center";
//makes superman face foward
} else if (direction == "center") {
_root.superman_mc.gotoAndStop(1);
}
//moves superman left
if (Key.isDown(37) & fly == "off") {
_root.superman_mc.gotoAndPlay(2);
_root.superman_mc._x -= 17;
_root.level1_mc._x += 17;
direction = "left";
} else if (direction == "left") {
_root.superman_mc.gotoAndStop(1);
}
};
whats happening is that the background keeps going but since i have it setup to move along with superman .. if anyone can help thank you alot..
-rob-
Keeping Character On Stage Plus Keeping Moving Background With Character On Stage
Im in the process of creating a superman game.. and i right now have him in walking mode .. i created him which is superman_mc . which has his waking animations etc.. inside and i have created a background mc which is level1_mc which basicly moves along with superman as he walks. .the problem i am getting is keeping the back ground from moving off the stage and superman from going off the stage i can keep superman on the stage and in one place on the stage with the code i have now but the background still moves off.. here is the code i have :
stop();
//Superman walk & flying movements
fly = "off";
_root.onEnterframe = function() {
if (Key.isDown(70)) {
_root.superman_mc.gotoAndPlay(4);
_root.superman_mc._y -= 17;
fly = "on";
}
if (_root.superman_mc, hitTest(_root.right_mc)) {
_root.superman_mc._x = 700;
}
//moves superman right
if (Key.isDown(39) & fly == "off") {
_root.superman_mc.gotoAndPlay(3);
_root.superman_mc._x += 17;
_root.level1_mc._x -= 17;
direction = "center";
//makes superman face foward
} else if (direction == "center") {
_root.superman_mc.gotoAndStop(1);
}
//moves superman left
if (Key.isDown(37) & fly == "off") {
_root.superman_mc.gotoAndPlay(2);
_root.superman_mc._x -= 17;
_root.level1_mc._x += 17;
direction = "left";
} else if (direction == "left") {
_root.superman_mc.gotoAndStop(1);
}
};
whats happening is that the background keeps going but since i have it setup to move along with superman .. if anyone can help thank you alot..
-rob-
Text Color And Background Color Setting Dynamically
How would I go about setting the background color of a flash movie as well as the text color of a text box based an external variable?
I want to pass in both of these colors in the <object> tag
myfile.swf?bgcolor=red&textcolor=white
Please advise.
Thanks
Robert
Changing Color On RollOut Then Back To Color After 2 Seconds
I am using the code below to make a shape turn color using on rollOver, then on rollOut is changes to a differant color(blue), then I want it to change back to the first color(white), either on another rollover or I perfer to make it change back to the fist color after a 2 seconds,
on (rollOver) {
var colorful = new Color("_root.shapes");
colorful.setRGB(0x006699);
}
on (rollOut) {
var colorful = new Color("_root.shapes");
colorful.setRGB(0x006688);
I want to be able to rollOver change color, onRollOut Change color again, then back to the first static color after 2 seconds.
Anyhelp would be great Thanks
Drag And Drop Color Swatches To Color Target
Hi there,
Need some help with this. I want to have color swatches that can be individually dragged onto a target MC and have that target MC take the color of the color swatch that has been dragged onto it. This procedure should be able to be done over and over again so a new color can replace the old one. I am working in Flash MX 6. Any help would really be appreciated.
Thanks so much.
Hex Color Code To Change Movie Clip Color
Hi all, Sorry real quick,
i've got a text box with the text with a hex code from a color picker which reads say "FF0000" how do i use that hex code(FF0000) to change a movie clips color.
simple (me stupid)....
thxs for any help
jon
[CS3] Changing Color (and Opacity Of That Color) Of Movie Clip
Hi. I have a pretty large movie clip filled with pngs. It's a sprite for a game and I want to change it's color. The setRGB method works, but I can't figure out how to set the opacity of the color. I don't want to change the alpha of the movie clip itself, just the color I'm applying to it so that it's just a shade over the normal images.
Is there any way to do this?
Assign Color To New Sprite In Order Of Color Wheel?
Is there a way to know the offset from one color to the next?
For example, I would like to create Sprite Balls, and have each be assigned a new color. But, I don't want it to be completely random color. I'd like it to be in order of the color chart slightly.
So if the first color is Red lets say, the next color would be a Yellow, then Green, then Aqua, then Blue, then Magenta, and back to Red. They don't need to be the absolute color, but in the general vicinity. Is this possible to do dynamically? What would the multiplier need to be to get to the next grouping of colors?
Drag And Drop Color Swatches To Color Target
Hi,
I am trying to have color swatches that can be individually dragged onto a colorless mc and have the mc adopt that color. This should be able to be replaced over and over again with new colors and reset to start again. I have only been able to find information on swopping mc's.
PLEASE HELP WITH THIS AS I AM STUMPED.http://www.jupiter.co.za/smart.jpg
THANKS SO MUCH
Fill Color And Stroke Color Option Not Working...
I am a faculty member at American River College who needs a word or two on how Flash CS3 works.
Specifically, how do I get back the option to add fill color to an oval drawing that I have made in Flash CS3? It appears that I have flipped a setting that makes that seemingly simple option unavailable.
I have several other documents where I have added fill color without a problem; however, as of this morning CS3 will not allow me do add such. When I open Flash, I draw on the Stage, the outline color is usually green, no matter what color I select for as Stroke Color and Flash will not allow me to change the Fill Color. I make a selection and nothing happens (just moments ago I opted for red as the Fill Color and the Fill remains white).
Is there a setting in Flash, that a rookie like yours truly could activated by accident?
Please help.
MacBrowne
Return MC To Original Color After Dynamic Color Change
How is it done? All I've seen on the web is how to change the color. Well how about going back. I'm talking about a MC with many colors. I can't just change back to a single hexadecimal color.
I can accomplish the change as it passes over a frame, but I can't get it to change back.
In the frame is this:
ActionScript Code:
cHurtColor = new Color(_root.compMC);cHurtColor.setRGB(0x00FF33);
Trying to keep this simple....
Return MC To Original Color After Dynamic Color Change
How is it done? All I've seen on the web is how to change the color. Well how about going back. I'm talking about a MC with many colors. I can't just change back to a single hexadecimal color.
I can accomplish the change as it passes over a frame, but I can't get it to change back.
In the frame is this:
ActionScript Code:
cHurtColor = new Color(_root.compMC);cHurtColor.setRGB(0x00FF33);
Trying to keep this simple....
Color.setTransform(colorTransf) >>> Color Question
These are the codes Iīm using on my mc (target)
onClipEvent (load) {
color = new Color(this);
colorTransf = new Object();
colorTransf.ra = 0;
colorTransf.ga = 0;
colorTransf.ba = 0;
}
onClipEvent (enterFrame) {
Rdif += red - colorTransf.rb;
Gdif += green - colorTransf.gb;
Bdif += blue - colorTransf.bb;
colorTransf.rb += Rdif / 4;
colorTransf.gb += Gdif / 4;
colorTransf.bb += Bdif / 4;
color.setTransform(colorTransf);
}
Iīm trying to understand it...
1.0 I canīt get the "new Object()" What am I doing with this???
2.0 Why I set on (load) ra; ga; ba and then on (enterFrame) I use rb; gb; bb???
3.0 What exactly does the setTransform() do?
The rest I understand well...
Hope itīs not complex for explain.
Thanks!
Dynamic Color Slider Or Color Wheel ?
can someone help, or direct me to a tuttorial on
Ĩ user input to adjust/select color
- must be RGB sliders, or colorwheel/color bar to choos from
I need the user to be able to change the background color of a graphic, without them knowing anythign about color.
so it would be best if they could just adjust RGB sliders or pick from a color wheel would be even bettter. . .
thanks
Darin
P.S.
I could make a bunch of buttons with a few basic predefined colors, however this would be limmiting in selection.
Matching Bg Color To Surrounding Jpeg Color
I'm putting a flash movie into a space that's surrounded by a deep blue gif color. Nothing fancy - no gradient - just a plain, old, single color that matches out to a hex value of 333399.
When I set the Flash movie's background to 333399 and place it within HTML page, the colors don't match. I've fooled around with different hex combinations in flash and have finally found a combination that matches the blue gif background almost exactly (#294099) - but man, what a hassle!
There must be a better way to match a flash movie's background to a background that it will be placed within...isn't there? Please advise if there is...
Thanks to all in advance.
Hummm...one more thought, is there a way to export a movie with a transparent background???
|