Professional :: Transferring Color Variable Changes Its Value

Nov 23, 2010

I have two variables:
var defaultMainHexidec:Number = 0xFFFFFF;
var mainHexidec:Number;

If a value isn't assigned to mainHexidec I assign the default value as follows:
mainHexidec = defaultMainHexidec;
trace("mainHexidec = " + mainHexidec);

The trace returns the same value as the value returned when tracing the defualt value. But if I use mainHexidec as the fill for a rectangle, the color is black while the default value is white (or any other color). If I set the color using the default variable the fill appears correctly. If I set the number using the number traced in either defaultMainHexidec or mainHexidec (it traces the same number) the color is correct.

View 5 Replies


Similar Posts:


Professional :: Transferring CS5.5 To CS5?

May 25, 2011

I started this school project on a CS5.5 but my school only has CS5 not CS5.5 and i'm trying to transfer my files on CS5.5 to CS5. Is there any way to do that or is it just a lost cause?

View 4 Replies

Professional :: Create A Color Swatch Palette For End User To Select An Item Color On A Ecommerce Site

Jun 15, 2010

We are creating an ecommerce site for my business and am trying to create a flash file that will allow the end user to select a color from a palette of 64 different swatches that they would like their item to be so it processed it into the order. I only need to create the flash file so they can select the color.

View 4 Replies

Professional :: Get RGB Color Values Out Of The Color Picker Component?

Jan 28, 2010

How to get RGB color values out of the color picker component?
 
trace (cp.selectedColor);
returns something like:
16750950[code]....

I am looking for RGB, for example, 0.5 0.5 0.5, for a gray color.Is there a chance the RGB parameters are hidden somewhere or is there a conversion function at least?

View 5 Replies

ActionScript 3.0 :: Transferring Data From One SWF To Another

Nov 15, 2010

How I should go about coming up with a program in action script 3 that can transfer data keyed in one swf file to another. Basically all I want is to key in a name in the 'y.swf' file when it plays in the browser, and when I click on submit another swf (z.swf)opens in the browser saying 'You keyed in '***'. The value keyed in the 'y.swf' file should be tranfered and stored as a variable in 'z.swf'.

View 3 Replies

IDE :: Transferring Xml Data To Swf Across Domains?

Jun 21, 2009

I just recently created a news ticker using the tutorial on Kirupa; however, I have not been successful at getting my xml data to show up on the news ticker. I have my xml file stored on and my website will be stored on Savannah State University's server. I do not want to have my xml file on the same domain as my website because it will be on my school's server and they don't allow access to their server. I want to be able to update the news ticker freely.

View 5 Replies

Actionscript 3 :: Transferring A JPG Between Two Flash Files?

Nov 25, 2010

I haven't started work in this yet, however I intend to and would like to know the best method.There will be two screens,each powered by a separate machine.I want to be able to move the image off one screen and it appear on the other (machine 2).The image will be captured from a webcam on machine 1.The first idea I had was convert the image to a string, pass the string to the flash file on machine two, decode and display.Is this possible, or is there built in function in flash or as3 that would would recommend, or even a different method?

View 2 Replies

ActionScript 3.0 :: Transferring Elements From One Vector To Another

Oct 6, 2009

I have function that's used to transfer elements from one vector to another. The problem is that I need to use this function to transfer data from multiple pairs of vector with each pair having a different data type. I tried this but it came up with an error.

ActionScript Code:
function addToVector(dataType:Class, vect:Vector.<dataType>,
baseVect:Vector.<dataType>):void {
for (var i:int = 0, l:int = vect.length; i < l; i++)
baseVect.push(vect[i]);
}

I've also tried this, but then flex says it doesn't recognize the vector class.
ActionScript Code:
function addToVector(vect:Vector.<*>, baseVect:Vector.<*>):void {
for (var i:int = 0, l:int = vect.length; i < l; i++)
baseVect.push(vect[i]);
}

This failed too
ActionScript Code:
function addToVector(vect:Vector.<Object>, baseVect:Vector.<Object>):void {
for (var i:int = 0, l:int = vect.length; i < l; i++)
baseVect.push(vect[i]);
}

View 2 Replies

ActionScript 3.0 :: URLLoader Keeps Transferring Data

Sep 14, 2010

All Im trying to do is post firstname, lastname and emailaddress from a form inside my swf to a php file and then get that php file to return a result back to my swf.

First of all i tried using external interface to handle this because the server its going to run on doesnt support PHP.

I had the SWFgrab the data from the text fields, pass the data to JS through external interface, then the JS would use jquery AJAX to execute the php file, then the JS would grab the results from the AJAXd div, then pass the data back through to the SWF. It was a bit of a circle jerk but it worked.

However, the PHP script that needs to be executed in a different domain as the SWF. I forgot that this would cause an issue. I then tried to setup AJAX crossdomain policies, but this is going to be a reasonably high traffic site and i felt that the proxy options that i found were kind of slow.

I realised that what id been doing so far was probably over complicated anyway. So, i went back to basics and thought id try using the URLLoader to load in the php file as a string. I setup a crossdomain.xml file on my server that will be hosting the PHP and used the loader to grab the PHP file.

This works fine, all the PHP does is echo out 3 comma separated values which i then split into an array and use in my SWF. I get the values no problem. However, my status bar in firefox keeps saying that its still transferring.

Ive tried telling the PHP script to 'exit();' after its echo'd out my results. Ive tried telling the URLoader to .close(); when its grabbed the data, neither of which stop it from transferring. Im also using the web debugging proxy 'Charles' and that says that the connection opened and closed successfully, but firefox still says that its transferring.[code]...

View 3 Replies

ActionScript 2.0 :: Transferring One Flash File To Another?

Aug 3, 2010

I have baiccly made a dress up game , but i have kinda of done it backwards and i have made the 2nd scene the 1st one

The boy side of the dress up game wasin the 1st scene and i have made the intro screen the 2nd one so you can chooseif you want to dress the girl or the boy. the only thing is that the girl dress up is in a completely diffrent flash file/project. I thought of the intro screen at the last min, was just going to have to seprate games girl and boy.

Buti would like to transfere the girl one to the boy one, so i can do my as for my girl button, but i dont know how to do that as well as keeping all my as in all my converted symblos and everything

View 1 Replies

ActionScript 2.0 :: Transferring Data From One Page To Another?

Sep 27, 2002

I have 2 radio Buttons in a group called train1.

I am trying to carry the label of the selected radio button to a dynamic text field on another page(frame).

I have tried this

function onClick(btn) {
if (btn == submit_btn) {
getResults();

[Code].....

View 1 Replies

Actionscript 3 :: Transferring Flash Project From Mac To Windows

Dec 9, 2010

I have a .fla on my Mac that I created in Flash cs5. I saved it as a cs4 file and sent it to a friend who has a Windows machine.

I have a symbol linked to an AS class which has symbols inside of it which have instance names. The constructor of the class refers to these instance names. When I compile, everything works as expected. When my friend compiles, he gets compiler errors telling him that the instances mentioned above are undefined.

Checked to make sure that we had the same source path Made sure that the symbol in the Flash IDE has the correct linkage Tried compiling the .fla with cs4 on my machine. It works, which is what makes me think it's a Mac/Windows issue.

View 1 Replies

ActionScript 3.0 :: Transferring Values From One Class To Another Via DispatchEvent?

Nov 9, 2009

transferring values from one class to another via dispatchEvent.

main.fla
code/main.as (Doc class)
code/game/card.as
code/game/board.as

I can communicate an event between any of them fine using a dispatchEvent and addEventListener, and I can get values from the card & board actionscript files into main.as using e.target.*

However for some reason I just cannot get a value to send from main.as to the card or board classes using this same method. And I'm literally stumped as to why.

View 6 Replies

ActionScript 3.0 :: Flash: Transferring Loaded Object From One Class To Another

Feb 27, 2010

I'm using flashDevelop for an avatar creation engine. I have a movieclip(class) called body_view which is structures like this : body_view -> 10 visual body components -> each component needs to have a jpeg loaded Then there is a body_model class which is extended from the body_view class and is responsible for all loads/saves/interactions now body_model class is as follows: body_models -> variables holding (values) -> populateView (function)

Now through the populateView function I need to populate the components of body_view but the issue is if I load a jpeg/swf on a function it comes on stage. I do not want it on stage I want it in its perticular place in the body_view

View 3 Replies

Actionscript 3 :: Flash: Transferring Loaded Object From One Class To Another?

Feb 27, 2010

I'm using flashDevelop for an avatar creation engine. I have a movieclip(class) called body_view which is structures like this :

body_view -> 10 visual body components -> each component needs to have a jpeg loaded

Then there is a body_model class which is extended from the body_view class and is responsible for all loads/saves/interactions now body_model class is as follows:

body_models -> variables holding (values) -> populateView (function)

Now through the populateView function I need to populate the components of body_view but the issue is if I load a jpeg/swf on a function it comes on stage. I do not want it on stage I want it in its perticular place in the body_view

View 2 Replies

Banner Ads - ClickTag And Transferring Variables In Query String

May 4, 2010

Is there a standard way to send variables through a banner ad? A client wants a banner that lets the user enter his mobile number, then receives a code by sms, and then enters the code into the banner. If the code then validates, the user is sent to a page with a login form with the phone number and code filled in. It must be possible to add the phone number and code as parameters to the clickTag somehow? I found that Adform supports using ";cppar=1&" and then variable=value pairs, but is this a standard, or a special feature of Adform?

View 1 Replies

ActionScript 2.0 :: Transferring Data From Domain At Bottom Of Browser?

Jan 16, 2009

I am using the loadVariable method of the MovieClip class to load some data. I have a question about the "transfering data from domain" message I see at the bottom of firefox for a page that has this swf loaded in. The load variables call obviously complete very quickly (the output is just h=1&d=1, or something as short as that) but the transfering data remains the entire time the page is in the browser (like half an hour later, etc).

View 1 Replies

Actionscript 3.0 :: Zend AMF Call Isn't Transferring To Client Server

May 7, 2010

I have a client that I am going live with so I am transferring their website from my web server to their web server. Using Zend AMF, I am calling a database that reads perfectly when I point to it from my server but it doesn't work when I call the database from the client's server. In both instances, I am pointing to the same absolute path to my boot strap (on my web server). I don't understand what the difference would be.

View 2 Replies

ActionScript 2.0 :: Get Color Value Through Variable?

Dec 23, 2004

how can i get the value of a color from a variable. if i click the button, some rgb value should be stored in a variable and through some function i should get it. i wrote the function something like this:

------
on (press) {
var colorful = new Color("_root.shapes");
colorful.setRGB(myVariable);
}
-------

but it's not working.

View 1 Replies

ActionScript 2.0 :: How To Get Color Value Through Variable

Dec 23, 2004

I read the tutorial on this site about changing the color values of an object, or of a movie clip. My question is: How can I get the value of a color from a variable. If I click the button, some rgb value should be stored in a variable and through some function I should get it. I wrote the function something like this:
on (press) {
var colorful = new Color("_root.shapes");
colorful.setRGB(myVariable);
}
But it's not working.

View 1 Replies

ActionScript 3.0 :: Use A Variable To Set The Color Of Text?

Aug 1, 2009

I want to use a variable to set the color of text and graphics input by the user. I use the following code to set the variable:
 
var setColor:String;setColor = "0xff0000";
strokeColorBtn_mc.addEventListener(MouseEvent.MOUSE_UP, setStrokeColor);
function setStrokeColor(event:MouseEvent):void {    setColor = "0xCCCCCC";    trace ("the new color is " + setColor);}
 
This works, and I am able to use the variable to set the color of type in a text field:

textFormat.color = setColor;
 
But when I try and use the variable to set the color of a graphic element:

designContainer.graphics.beginFill(setColor, 0.1);
 
I get the following error:

1067: Implicit coercion of a value of type String to and unrelated type uint.
 
So I thought that I might have to cast the String as a uint, so I tried the following:
 
designContainer.graphics.beginFill(setColor as uint, 0.1);
 
That eliminated the error message, but it does not change the color.

View 13 Replies

ActionScript 2.0 :: Way To Pass Color Variable From Xml To MC?

Oct 31, 2008

I have an XML file that is passing the color that is needed on a movie clip.I can make the color variable in the XML the actual HEX number and that works fine.Example:

Code:
//XML
<ColorData>

[code].....

View 2 Replies

ActionScript 2.0 :: Make A Variable That Will Store The Color?

Mar 21, 2007

The fill function that I made works as long as you only need one color. How do I make a variable that will store the color? flash keeps giving me an error for trying to do it the way I am doing it.

Code:
fillit = function (d, e, f, g, color) {
color2 = "0x"+color
_root.lineStyle(1, 0x666666)

[Code]...

View 3 Replies

ActionScript 2.0 :: Set Color From Loaded Variable In Textfile?

Jan 19, 2005

I have a text file that set's some color values I would like to use in my flash movie. basically its a configure file for movieclips rollovers(set's the colors)[code]...

View 2 Replies

Professional :: Change The Another Color Using "format.color=c;"?

Jan 1, 2011

I saw AS3 code which is used for changing the color. How to modify it to change another color say, Red, Green or Yellow.
 
format.color=c;

View 1 Replies

ActionScript 1/2 :: Changing The Color Of A Movieclip With A Variable Sent From Javascript?

Jan 11, 2010

I'm trying to change the colour of a movieclip.I want to send a variable from Javascript within the html that the swf will be embeded in.I'm not quite sure where to start with this but this is my code:
 
[code]...

View 3 Replies

ActionScript 2.0 :: Setting Color From Loaded Variable In Textfile?

Jan 19, 2005

I have a text file that set's some color values I would like to use in my flash movie.bascially its a config file for movieclips rollovers(set's the colors)my textfile reads as follow

Code:
textOut=0x3F6075&baseOut=0xFFFFFF&outLineOut=0xE19C14
My Flash is as follows:

[code].....

View 2 Replies

ActionScript 3.0 :: Flash Change String / Variable Color (textfield)?

Jul 21, 2011

I am building a project where I got XML text displayed on a textfield. How can I change a specific word's color through actionscript 3 instead of doing it on XML? I though of creating a String variable for my word and then using that variable in my textfield.text, it works but is it possible to set a color for that variable?

View 3 Replies

ActionScript 3.0 :: Color Parameter Passing - Assigning A Color To Its Color Field

Feb 6, 2010

i have a button, with instance name lightblue_color. I am assigning a color to its color field like this: lightblue_color.transform.colorTransform.color = 0x65ffff; then i am adding an eventlistener to the button like this: lightblue_color.addEventListener(MouseEvent.CLICK, ChangeColor); Then, in the function: public function ChangeColor(evnt:MouseEvent):void {trace(evnt.target.transform.colorTransform.color);} It prints 0. Why is that? Shouldn't it print 0x65ffff or do i need to do some type conversions?

View 2 Replies

Professional :: Adding A Variable To A Variable Name?

Mar 21, 2010

I have the following code: Can the following code:
globals.data.goal = globals.data.player1/5 be converted to something like: globals.data.goal = globals.data.player(globals.data.clk)/5

[code].....

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved