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




Tracking A Variable Change From C++



Hey all,

I have a listbox that needs to be populated when a variable is sent to my .swf. What happens is...if the variable is already passed a value before my .swf loads, then it works fine, but the variable will be passed after the .swf loads, so that leaves the listbox empty.

I would like for the listbox to populate when it notices the variable has been changed. I used object.watch, but it's not successful. Here's my code:

ActionScript Code:
stop();//Importing component classesimport mx.controls.*;mx.accessibility.ListAccImpl.enableAccessibility();//Variables for Listboxvar createVar_btn:Button;var listBox_lst:mx.controls.List;//Setting ListBox propertieslistBox_lst.hScrollPolicy = "off";listBox_lst.maxHPosition = 200;listBox_lst.iconField = "icon";//listBox_lst.setStyle("themeColor", "haloBlue");_path.watch("text", loadChecks());//Setting up XML file//var _pathUN = "Username_and_Password";var checksXML:XML = new XML();var _path:String = "";function loadChecks(property, oldVal, newVal){    checksXML.ignoreWhite = true;checksXML.load(checks.xml);//checksXML.load("checks.xml");checksXML.onLoad = function(pSuccess){    if(pSuccess)    {            _root.splash_mc.username_txt.text = _UN;                        //Populating ListBox with file in directory via XML            for(var i:Number = 0; i < checksXML.firstChild.childNodes.length; i++)            {                //Setting XML location to variable 'chk', then getting rid of the file extension to display in ListBox                var chk = checksXML.firstChild.childNodes[i].attributes.name;                chk = chk.substring(0, chk.length-4) + "";                listBox_lst.addItem(chk);            };//End of 'for' loop                       //End of 'rollButton_mc' function          };//End of 'if(success)' loop};//End of 'onLoad' function};useCheck_btn.onRelease = function(){   //Enter code to do something when an item is selected in the ListBox        var tVar = listBox_lst.selectedItem.label;    };


Any help is greatly appreciated.



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 04-04-2007, 11:47 AM


View Complete Forum Thread with Replies

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

Tracking A Variable Change From C++
Hey all,

I have a listbox that needs to be populated when a variable is sent to my .swf. What happens is...if the variable is already passed a value before my .swf loads, then it works fine, but the variable will be passed after the .swf loads, so that leaves the listbox empty.

I would like for the listbox to populate when it notices the variable has been changed. I used object.watch, but it's not successful. Here's my code:

ActionScript Code:
stop();
//Importing component classes
import mx.controls.*;
mx.accessibility.ListAccImpl.enableAccessibility();

//Variables for Listbox
var createVar_btn:Button;
var listBox_lst:mx.controls.List;

//Setting ListBox properties
listBox_lst.hScrollPolicy = "off";
listBox_lst.maxHPosition = 200;
listBox_lst.iconField = "icon";
//listBox_lst.setStyle("themeColor", "haloBlue");
_path.watch("text", loadChecks());
//Setting up XML file
//var _pathUN = "Username_and_Password";
var checksXML:XML = new XML();
var _path:String = "";

function loadChecks(property, oldVal, newVal){
   
checksXML.ignoreWhite = true;
checksXML.load(checks.xml);

//checksXML.load("checks.xml");
checksXML.onLoad = function(pSuccess)
{
    if(pSuccess)
    {
            _root.splash_mc.username_txt.text = _UN;
           
            //Populating ListBox with file in directory via XML
            for(var i:Number = 0; i < checksXML.firstChild.childNodes.length; i++)
            {
                //Setting XML location to variable 'chk', then getting rid of the file extension to display in ListBox
                var chk = checksXML.firstChild.childNodes[i].attributes.name;
                chk = chk.substring(0, chk.length-4) + "";
                listBox_lst.addItem(chk);
            };//End of 'for' loop               
        //End of 'rollButton_mc' function      
    };//End of 'if(success)' loop
};//End of 'onLoad' function
};

useCheck_btn.onRelease = function()
{   //Enter code to do something when an item is selected in the ListBox
        var tVar = listBox_lst.selectedItem.label;   
};

Any help is greatly appreciated.

Tracking A Variable From Html
Can we track a variable from html so that i can give the condition according to that variable or can u tell me how to control swf by html. If any example fla can be provided that will be a great help.

thanks
Ritesh

Formatting The Tracking Of A Variable Field?
HI,

I am using a basic counter that just increments. The only thing I need to get working is the text formatting of the dynamic text field for the variable. How can I increase the tracking so the numbers are further apart?? I know it can be done with static text, but when I make the field dynamic, it is grayed out.

Example:

1234

want to display it as:
1 2 3 4

I am really stuck. The variable name is score, and it just loops using score=score+1.

Anyone know what I need to do to format the text? Your help is really appreaciated!


-Z

Tracking Impossible On Dynamic Text Field Variable
Help!

I am extremely stuck! I am trying to control the tracking on a dynamic text field (to increase the space between each number), and I have found no option to do that!

I tried a work around rig, using a mask, and dyanmic text field won't display using a mask!

This is frustrating and all the people I have asked don't think it can be done. What can I do??

Thanks!!

Change String Variable To A MovieClip Variable
Hi

I have been banging my head against a brick wall regarding the following problem which must be very simple to fix, just can't see the answer.

I have a class assigned to a movieclip called canvas. The class is called drawClass. I have called the instance of canvas on the stage 'drawingCanvas'.

When I trace "drawingCanvas" I get

[object drawClass]

which is fine. Tracing drawingCanvas.name gets me the instance name

'drawingCanvas'.

This is a String variable.

Basically what I am trying to do is pass the MovieClip name to another class. In my example the class 'toolBar', which can then interact with the MovieClip.

The problem is passing 'drawingCanvas.name' results in a String, so I get an error saying :

TypeError: Error #1034: Type Coercion failed: cannot convert "canvasArea" to flash.display.MovieClip.

I can't for love or money find a way to convert a String variable to a MovieClip variable! I have the name of the MovieClip, I just need to tell the toolbar class. But I can't find a way of doing this as the instance on stage is an object of drawingClass, not a MovieClip (unless MovieClips with attached classes are not treated as standard MovieClips?).

Any ideas are most welcome. I'm sure I am missing something obvious.

Thanks for looking

Change Variable
I've been searching the threads and reading tuts and still am having problems.

In the firstframe of my movie I assign a global var:
ang=1

In another frame on the main which calls an mc is the statement:

if (ang == 1) {
_root.angel1._visible = true;
} else {
_root.angel1._visible = false;
}

I know this part works because if I change the declaration in frame 1 to 2 the mc becomes invisible.

Now the action takes place in the swing2 mc.

maintimeline->clocks->swing2(frame13):

ifFrameLoaded (13) {
tellTarget (_root.angel1) {
ang=2;}
}
This statement does not work. When the action takes place in frame 13, how do I make it go back to the main and change the ang var to 2 so that the mc on the main becomes invisible?

Thanks
pkw

Change Variable
Hello,
I am trying to use a Scene witch contains a few form feilds in it multipule time. I am storing the information into a database and need each form feild to be different so i know what to put in certian areas of the DB.

So my question is can i change the variable of a form feild somehow off a release of a button ?
Or is there any other way to do this ?
I could make Multiple scenes but i want to limit the size of my document.

In need a help,

Drew

Change A Variable Name
Hello,

How can I change a variable name, into another variable name and visa versa, so I can use the same var under another name? For example:

_level0.thename = “a var”

will be

thename = “the same var as above”

I hope I made myself clear with my poor English.

Thanks

Name To Variable Change
Can someone tell me how to change name to a variable in otherwords I in essense want:

-------------------------------------------
rname0=Chad;
rname1=Jackie;
rname2=John;
rname3=Ann;

on (release){
randomH=random (4);
pick1="rname"+randomH;
y=pick1;
}
---------------------------------------------

Any help is appreciated!

Change Variable
Question:

I would like to use the 'this.' command in flash plus a number (e.g. this.1) The number changes in a loop. So I tried to do this:

text = "this.";
count = i;
item = text+count;

But this doesn't work because now flash doesn't recognize the this.
command. Is there a way to solve this?

Change A Variable
is there a way to change 1 variable in all movieclips?
thanks in advance

Change Which Variable ?
My code for the main movie has this

var i = 0;

this.createEmptyMovieClip("window", this.getNextHighestDepth());

btn_services.onRelease = function(){
getMovie("services");

function getMovie(movie){
//trace(movieName);
//trace(eval(_root.window.movieName._x));
movieName = window.createEmptyMovieClip("movieName"+i, window.getNextHighestDepth());
movieName.loadMovie("docs/"+movie+".swf",window.getNextHighestDepth());
i++;
//trace("i= "+i);
}

what part of this code would I have to change for it to work in a sub movie..


for instance the main movie has this code....its loads a submovie...now in that sub movies buttons, I want them to load the same way....basically so they keep going ontop of one another.

Thanks

Change A Variable's Value
If I want to change a variable's value, do I just reassign the variable later on the script?

[1]var hello = 1;

[32]var hello = 2;

thanks

Why Does My Variable Value Change?
I've declared a variable on Frame 0 as follows (all code is on the same timeline, just different frames):

var myVariable:Boolean = false;
stop();

Also on Frame 0, I have a button that takes my to Frame 5 on which I change myVariable value as follows:

myVariable = true;
stop();

Also on Frame 5, I have a button that takes me back to Frame 0. When I click this button and return to frame 0, why does myVariable value change back to "false" again? Haven't I assigned it a value of "true" on Frame 5? Is the variable declared again and reassigned its inital value of "false" each time I enter Frame 0?

How do I define this variable on Frame 0 so that when I change its value on Frame 5, the value remains changed when I return to Frame 0?

Thank you!

Variable Change
i know this should be very easy, i know i should know this already but here it goes.

how do i change this variable dynamically?


myvar = "www.kirupa.com"


all i need to do is change it

rL

Variable Change
i know this should be very easy, i know i should know this already but here it goes.

how do i change this variable dynamically?


myvar = "www.kirupa.com"


all i need to do is change it

rL

Change Variable Name
Is it possible to change the name of a variable dynamically using the text from an input field. We have been working on this all afternoon. My brain hurts.
Thanks

Change Variable From Within A Function
I want to change a variable's value from within a function, but the variable has to be itself a parameter of the function.
for example:

Code:
function myFunction(n) {
n = n-1;
trace(n);
}
x = 5;
_root.myButton.onRelease = function() {
myFunction(x);
};

Change The Name Of A Variable Depended On Another
Hi
I want to change a name in a ActionScript depended on a variable.
For example:

if (_root.ball.hitTest(_root.left1) == true) {
left1._x = 20
}

I want to change the left1 with another number depended on a variable i.
I mean that if i = 4 then this code will be:

if (_root.ball.hitTest(_root.left4) == true) {
left4._x = 20
}

if i = 6 then this cade will be:

if (_root.ball.hitTest(_root.left6) == true) {
left6._x = 20
}


If anybody can answer me please do it. It is very important.

Change Variable With Time
Hello

I am trying to change a variable every 5 seconds like this:

0 sec.: set1
5 sec.: set2
10 sec.: set3
15 sec.: set2
20 sec.: set1
then I need it to loop again to set1, set2 etc...
Any help/pointers would be great !

thanks

Listener For Change In Variable ?
Hi all,

I've encountered this problem, I hope someone can help me out:

If have the next code set in my 1-frame movie in the root at frame 1 on the timeline:


Code:
//===================================================
//CHECKING THE STATE OF THE MOUSEBUTTON (DOWN OR UP):
//===================================================

//SET VAR ONE TIME ONLY:
_global.givefocusallowed = "yes";

//LISTENER 1: DETECT MOUSE CLICK AND CHANGE GLOBAL VAR
MouseclickListener1 = new Object();
MouseclickListener1.onMouseDown = function () {
_global.givefocusallowed = "no";
};
Mouse.addListener(MouseclickListener1);

//LISTENER 2: DETECT MOUSE RELEASE AND CHANGE GLOBAL VAR
MouseclickListener2 = new Object();
MouseclickListener2.onMouseUp = function () {
_global.givefocusallowed = "yes";
};
Mouse.addListener(MouseclickListener2);
(I've added the comments as a guidance for myself but they are pretty handy now for explaining my code...)

Now, what I would like to accomplish is to create some kind of similiar Listener to detect a change in the value of the _global.givefocusallowed variable. I need to update another global variable depending on the value of the _global.givefocusallowed variable. This detection has to be active continuesly, and I'm not willing to create a 2-frame movieclip in which I set something like if _global.givefocus == "yes" then... etc.

Can this be accomplished by the use of actionscript in the same root frame without using other MCs to detect the _global.givefocusallowed value ?


Thnx in advance !!!!!!

Regards,
Roel

Variable Value Change Problem
With the attached file I simply want the draw color and size varibles to change when I click a new color or size. Thank you.

in the main timeline i have this:

color = 0x000000;
size = 1;

createEmptyMovieClip("line", 5);

line.lineStyle(size, color, 100);
onMouseDown = function () {
line.moveTo(_xmouse, _ymouse);
onMouseMove = function () { if (_root.draw.hitTest(_root._xmouse,_root._ymouse, true)) {line.lineTo(_xmouse, _ymouse);}};
}

onMouseUp = function () {
onMouseMove = null;
}


On the green clip I have this:

on (press) {
_root.color = 0x00ff00;
}

Change Variable In Different Scene
is it possible to change a variable in a different scene then the one you are in. or is it possible to pass a variable along with you when you change scenes?

Thanks in advance.

Variable Change Listener?
Hi All,

I'm just wondering if there is a way to listen to a variable for changes? I've seen that you can listen to a change in a component, but I've not found any examples of variables, is it possible?

This is what I have tried, to no avail....

Code:
var myVariable:Number = 0;

var myListener = new Object();
myListener.change = function(change) {
trace("variable changed");
};
myVariable.addEventListener("change", myListener);

I'm getting this error...

-------------------------------------------
**Error** Scene=Scene 1, layer=Layer 2, frame=1:Line 188: Syntax error.
myListener.change = function(change) {

Total ActionScript Errors: 1 Reported Errors: 1
-------------------------------------------

I have also tried .onChange instead of just .change but get the same results.

I'm a flash newbie and I could really do with you help, thanks in advance. Emlyn

Change The Variable Of A Textbox With AS
Anyone know how I can change/assign the variable of a textbox with a line of code?
I'm assuming I must give the box an instance name so it can be referenced, but how do I give it a variable useing code?

I tried:
_root.box.variable = "q"
_root.box.variable = q
_root.box.TextField.variable = "q"
_root.box.TextField.variable = q
_root.box = q
_root.box.TextField = q
_root.box.TextField = "q"

Nothing seems to work.
Any suggestions?

Change The Value Of Global Variable From Swf
Hi, I am building this program, Car.swf. Car.swf has a mc which will load Wheel.swf with ActionScript loadMovie.

I have created a global variable RPM in Car.swf.
Wheel.swf will try to change the value of this global RPM during runtime.
How do I target RPM from within Wheel.swf? Is it just by "_global.RPM = xxx"?
I have tried that but failed.
Thanks

UltramanRudi
...God will provide....

Variable Change Listener?
Hey guys, I have no idea how to approach this problem, I want things to be changed by variables, like what color something is. Well I put a button that will change that var, but now how do I get everything to actually change? I'm assuming I'd have to use a listener or something, I havent ever before, so I dont know how to make one, and also, are they processor intensive?

Change Value Of Variable On External Swf?
I have intialized a variable on the main timeline:

_root.currMC = emc1;

is their a special code that u need to use to set that variable on an external swf? I run some if statements on the external swf and will need to reset the variable to a different value. I am using this to reset it:

_root.currMC = emc2;

It seem that the maintimeline doesn't read the new value. Any ideas

Dynamic Variable Name Change
Hi, I have a varaibles called Stat0 to Stat11

I also have a variable called num which takes a value between 0 and 11 inclusive.

What is the actionscript I need to use to write:

"Stat"+num = 100; (this just makes the compiler complane at the moment!)

(I.e assume num =7 and I want Stat7 to take on the value of 100).

Cheers!
(using MX)

Can You Change CASE Of A Variable?
I have an input box, and the resulting text is the variable username which is used throughout my application.

_global.username = inputUser.text;

Sometimes users may enter their name as "richard" but I would like it to appear as "Richard". Is it possible to run actionscript to force the 'username' variable to make the first letter uppercase, or else format the input box so that the first letter is uppercase?

Thanks in advance

Detecting A Variable Change
Hi all,

I need to detect when a variable value is changed with AS..

ex: a trace statement everytime a variable changes saying the variable is changed

can this be done?

Thanks
Nameez

Change Variable Using Html?
hi all!


i have a text box that loads a .txt file into it. i can create a link to open a new window but what i want to know is how to change something in flash when i click it instead? for example, changing a variable?

im using this code atm, but it only opens a new window:

<a href="file:http://www.website.html">click here.</a>

thanks

Clicking Anywhere In A MC To Change A Variable Except For The MC
hi,
how can i make it so that by clicking anywhere except the MC will change a variable? So in my game i have a inventory. I click the item and a ring goes around it. Then there is a view item button but if you don't click that but instead click anywhere else the variable changes like _root.one -=1;

I thought by putting on (release) {
_root.one -=1;}

on the frame would work but maybe that was just stupid cos it didn't. Have you any useful ideas that could help me?.

How A Variable Can Change An Instance Name
I have a moovie clip with instancename 5
and need to acces pasing the variable

p1=5
"p1".gotoAndStop(Number(p1));**//not work!!!

or if i change the instance name to x5

p1=5
"x" add p1.gotoAndStop(Number(p1));**//not work!!!

How Change A Parent Variable
I have a variable called tres into symbol 1. I create a button and need that if the user clicks 3 times go to frame 140 in the symbol1.


in the frame action i put tres = 0

in the buton i put

on (release) {
_parent.tres = Number(tres)+1
if (_parent.tres = 3) _parent.gotoAndStop(140);


}

BUT NOT WORK!!!!

Variable Change Listener
How do I make a listener to trigger an action when the value of a variable has changed? Doesnt have to be with onEnterFrame right?.

Change Case Of Variable
I have:

ActionScript Code:
text1 = "This is my Headline Text";

I want to be able to change it using actionscipt in another part of my file.

I need all the text to be lowercase.

I know in ASP I can do this, is there a way in Actionscript?

I have searched this forum and googled but haven't found an answer.

This is obviously how it should come out:

ActionScript Code:
text1_low = "this is my headline text";

Change Variable Value With LoadMovie()
I have a main movie with the following script on frame 1:

var test:Number;
this.createEmptyMovieClip("test_mc",2);
test_mc.loadMovie("test.swf");
trace(test);

When I call in test.swf, I want the value of test to change to 1.

In the imported movie, test.swf, I have place the following script on frame 1:

this._parent.test=1;

...

I have also tried (on frame 1 of test.swf) ...

test=1;

_root.test=1;

this.onLoad=function() {
test=1;
};

...

And I've tried declaring test as a global variable using _global.test, but the value is not changing on the loadMovie() command (It returns as undefined).

I have tried all of the above declaring test as a string variable as well, to no avail.

This should be very simple, but for some reason it's not working.

Suggestions???

Thanks to all in advance -
sleepydad

How Do I Change Properties Of A Variable?
Hey there

ok so here's my problem. I think(hope) the solution is simple but for the life of me I can't figure it out. So here goes:

I have a bunch of buttons(actually they are movieclips but they function as buttons) which have their animation for rollOvers and rollOut controlled by actionscript.

What happens is that as you mouse over the button it's alpha increases(making it brighter) and then as you roll off of it it's alpha decreases. Now this all works swimmingly. Have a look at www.eggfilms.co.za/newsite to see what I mean(click on directors)

So here is the problem: I want the button I clicked on to remain in full alpha to indicate that it is selected but when I move over the other buttons then their rollOver functions trigger the alpha to another value.

So I thought that a way around this was to pass a variable(the name of the movieclip instance in this case) when you click on a button which then gets read by a function which then again changes the alpha to 100%. This function would be in a hollow rectangle outside of the button area so it would be triggered if the user were to move his mouse down o the rest of the site.

so in my actions layer I have this:

var butSel:MovieClip;
then if I mouseover a button I have a function which gives the variable it's instance name.

butSel = this._name;

NOW here is the problem, when I try and use the butSel variable to change the properties of the selected movie it just flat out doesn't work.

I tried:

butSel.alphaTo(100,2,easeOutInCubic,.1);

which doesn't work

also tried

[butSel].alphaTo(100,2,easeOutInCubic,.1);

so basically I don't know how to pass a command to a variable.

Anyone know how I would do this?

Thanks

Syllogism

Listen For Variable Change
I am trying to get my flash animation to do something when it detects a change in a variable (number) that is communicated to it from JavaScript. All I need to do is
if (variable changes){
do some stuff
}


Anyone know how I can do that?

Thanks.

How To Change An Url Image Into A Variable
hello guys, i need help to change the script below:

theLoader.loadClip("http://domain.com/App_Themes/back_header.gif", _root.tempMC);

into a variable, so if the url changed, the variable changing too.

for example i create

var img_link:BitmapData;

and i want the url to contain this data :

http://domain.com/App_Themes/back_header.gif,

but if the template skin changing to

http://domain.com/App_Themes//back_header.gif

then my variable img_link change to the updated link (or the active theme now).

thanks

LoadVars And Change A Variable
Hello all. I am trying to make a dynamic content flash site. I use PHP and MySQL.

I have 2 buttons on _root. They change a variable named sub. Action is:


Code:
on(press) {
_root.sub = 2;
}
In the main timeline i have the following script:

Code:
stop();
var c:LoadVars = new LoadVars();
c.cat = cat;
if (!sub) sub = 1;
c.sub = sub;
c.onLoad = function () {
var array:Array = new Array();
array = c.imagini.split("|");
for (i = 0; i < array.length; i++)
{
_root["placeHolder"+(i+1)].loadMovie(array[i]);
}
}
c.sendAndLoad("http://localhost/test.php",c,"POST");
My question how do i make a new request to the server when var sub changes?

Detecting A Variable Change, And Do Something
I'm guessing there's a real simple way of achieving this - I just have no idea. Something to do with listeners maybe?

When a variable changes, I want to run a function.

I want to avoid using onEnterFrame to detect the change

Ideas?

Change Value Of Variable Through Reference
Hi,

I am writing a Console class, of which one specification is that the user can modify variable values.

In the Console I keep track of a list of items, which represent possible commands. An item looks like this

Code:
// Item.as
package {
public class Item {
public var name:String;
public var description:String;
public var type:uint;
public var any:*;
}
}

// Console.as
package {
public class Console {
private var mItems:Array;
public function Console() {
mItems = new Array();
}
public function addItem(item:Item):void {
mItems[item.name] = item;
}
public function parseCommandLine(commandLine:String):void {
var args:Array = commandLine.split(" ");

// Checking code omitted

var item:Item = Item(mItems[args[0]]);
if (item.type is String) {
if (args.length == 1) {
// Read
trace(String(item.any));
} else {
// Write
// This sets only item.any to the given args[1],
// but not the value of the variable item.any should
// reference
item.any = args[1];
}
}
}
}
}

Code:
var username:String = "";

var console:Console = new Console();
console.addItem(new Item("username"), "Name of the user currently in the session", 1, username);
The user gives a command as follows

Code:
username John
What this command should do is setting 'username' to 'John', but the code above only sets item.any to 'John'. It seems pass by value is used in the case of uint, int, Number, Boolean, String. How can I set the username variable to the given value (which would be the case if pase by reference would have been used)?

Cheers!
Jorrit

AddEventListener To Change Variable?
Hello.

Is it possible to use an addEventListner(MouseEvent.MOUSE_DOWN... to change an integer in a variable without using a function? So, you could have:

myMC.addEventListener(MouseEvent.MOUSE_DOWN, myVAR = 1); etc?

Obviously I've tried, but I get implicit failures. Is this possible?

Take care, A.

How Do I Use A Variable To Change A Color?
Hi Folks!
I want to set a color with the operation
setRGB
and as log as I use the direct Hexadecimalstring is everzthing perfect, ilke
setRGB (0xFF0000);
But I want to use a variable instead of the string and there is my Problem.
The variable is set with getData from a Radiobutton and I tried to set it like this
RGB=0xFF0000
but then I don't know how to use the Variable, I tried it like that
setRGB (RGB) or setRGB ([RGB]) --> its not correct

In the example in the manual they use (given that the adressed mc contains my color)
RGB=myMc.getRGB.toString (16);
but if I do that and trace RGB, the Trace is [type function] and not a HExadecimalstring like they say.
Here is the code I work on:

PHP Code:



RGB = cor1.getData (); //gets the string 0xFF0000
trace (RGB);
_root.myColor.setRGB (RGB); // doesn't work
// just to test how it is working
_root.corMalha.setRGB (0xFF0000);
rgb=_root.corMalha.getRGB (); //if I add .toString trace returns [type Function]
trace (rgb) 




the trace is:
0xFF0000
16711680 //which is the decimalnumber for FF0000 in Hexadecimal

I am

Pls help

Thanxx in advance

Listen For A Variable To Change?
Hello, I have a movieclip in my main timeline and in it a variable is specified on a frame and used to load the correct color image in a loader.

example://
color = "blue";
paintloader.load(color+ ".png");

In my main timeline on frames this variable is changed (color = "red";) When the main timeline changes to a different location a new color is set. How do I make the movie clip listen for the color variable to change?

PLEASE HELP!!! I am desperate!
Thanks!

Change Value Of Variable In Array
I'm working with a prebuilt form component that uses several other components on the stage to pass values to a php page. The problem I'm having is I need to pass a couple of values to a prebuilt array that is comprised of variables. How do I set the value of a variable that is already in an array?

Change GetURL With A Variable
quote:I have a movie clip with instance name "launch". I created a global variable with:

_global.launchwebsite = "";

I have a scrolling menu with thumbnail images. I want each thumbnail to dynamically change the URL of the launchwebsite variable. I tried putting this code on one of the menu items:

launchwebsite = "

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