Using The User's Time To Display A Message Or Change Colors
I'm trying to find some resources on how to use the user's time to display a message (such as good morning, afternoon, evening) and to change the color of a background to fit the time of day.
Any help would be greatly appreciated! Thanks for looking!
-drumkeyjw
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 09-15-2008, 04:36 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Display Message According To Time Of Day
Hi
this is probably super simple - but then so am I!
Does anyone know where I may find some actionscript code that will get the time froma user's computer and then display a message according to wether it is day or night
EG.
1am-11am = "Good morning"
12pm- 12am= "Good evening"
thanks in adavnce
Display Message According To Time Of Day
Hi
this is probably super simple - but then so am I!
Does anyone know where I may find some actionscript code that will get the time froma user's computer and then display a message according to wether it is day or night
EG.
1am-11am = "Good morning"
12pm- 12am= "Good evening"
thanks in adavnce
Configuring A Clock That User Can Change Time
i want to add a clock to my project that a person can change the time. for example, when the highlight the hour the time or minute they can either type the time they want or can use the up or down button to change the time.
Is there a tutorial for this or can someone tell me the best way to go about this??
Thanks for any suggestions!!!!
User Changes Colors Of My Site
Hi
I searched fot it on the foruns but found nothing related.
I have to make a Flash Site that lets the user changes it´s colors background, buttons, sections.... and so on. He has to change the color, of the entire site.
Could someone give some help or point some tut?
thanks
User Changes Colors Of My Site
Hi
I searched fot it on the foruns but found nothing related.
I have to make a Flash Site that lets the user changes it´s colors background, buttons, sections.... and so on. He has to change the color, of the entire site.
Could someone give some help or point some tut?
thanks
Diferent Display Colors On IE Vs Firefox
hello everyone,
I have a very strange thing here, more than words can say, see it for yourself:
http://www.souzaoliveira.com/ie_screen.JPG [this is the screenshot on Internet Explorer 6, very cool, nothing strange here]
http://www.souzaoliveira.com/firefox_screen.JPG [this is the screenshot taked from firefox 2, what is this???]
Some data to help us think:
I´m using Flash CS4, as3, publish the project with flash player version 9, the images i used from photoshop with some blendings options enabled like Multiply and Overlay
Display Message
Hi, I'm at a lost here. What I am trying to do is display a message of some sort if the user inputs an incorrect password into the form. I having difficuity with the fact that I only want to give them 2 tries. After the 2 attemps by the user display the message. "Please Contant the person who mangaes your server".? I'm at a total lost here....
Here is what I have so far...
Code:
import mx.controls.*;
// strict type instances on the Stage.
//var username_ti:TextInput;
//var password_ti:TextInput;
//import mx.controls.Alert;
class Product {
var status_lbl:Label;
var id:Number;
var ans:Number;
function Product (id:Number) {
_global._this = this;
//id = getID();
}
public function getId () :Number{
var userid=_root.id;
_global.ans=123;
//trace("your input is:"+ userid.toString());
mx.accessibility.AlertAccImpl.enableAccessibility();
_global.styles.Alert.setStyle("color", 0x4B8DEF);
_global.styles.Alert.setStyle("themeColor", "haloBlue");
var myGo = new Object;
Key.addListener(myGo)
myGo.onKeyUp = function(){
if (userid==_global.ans) {
Alert.show("Yes, You are Correct!");
_root.userid.text = "Neurochrome";
_root.userid.textColor = 0x696AC9;
_root.userid.backgroundColor = 0xFFCC33;
Selection.setFocus("_root.Name_txt");
_root.Name_txt.textColor = 0x696AC9;
_root.Name_txt.backgroundColor = 0xFFCC33;
}else{
_global.styles.Alert.setStyle("color", 0xE95252);
_global.styles.Alert.setStyle("themeColor", "haloOrange");
Alert.show("Incorrect!");
//Checks to see if incorrect 2 times to display error message!
if (userid.text. == incorrect>2) {
status_lbl.text = "<font color="#9A319B">Please contact the person who manages your server.</font>";
Selection.setFocus("_root.userid");
}
}
}
return userid;
}
}
Thank you all
Replacing The Gradient Colors In A Display Object
Hello everyone,
I have a question about replacing gradients.
Suppose I have a movieclip that is created in Flash CS3 with a gradient. For example a star with a radial gradient so the middle of the star is blue and it turns to green towards the outside. Notice this is a pre-made object, not something I can draw at runtime as it is too complex and it animates.
How can I replace those gradient colors in actionscript 3? For example, I want to change the middle of the star to red and the outside gradient color to yellow.
Is there any way to do this? It seems like the gradient colors should be something you can get access in a display object but I can't find any reference to them.
Thanks!
Display Message On Drag
My site isn't loaded yet but what i am after knowing is kind of at http://www.typographic56.co.uk where you drag on a little square button also results on the caption following the mouse at all times.
My caption appears on mouseover/out but not on drag:
//the buutton graphic called bit-sm
on (press) {
startDrag ("/bit-sm");
}
on (release) {
stopDrag ();
}
//call dynamic text in caption movie
on (rollOver) {
_root.caption(" This button", 5);
}
on (rollOut) {
_root.caption("This button", 10);
}
*************
somewhere there needs code to show the
caption following the mouse when being dragged
I have tried on (release, press) it must work on a different principle
Getting An Swf To Display My Message Board Text
infopop's "ultimate bulletin board" forum program has the ability to dynamically pull information from the message board and place it somewhere else. for example, you can display the 5 most recent posts on the board within a little table on your homepage.
i'd like to do something similar, except display the most recent posts within a flash movie on my homepage.
the message boards allow you to output the data in a few different ways:
ssi includes (html file)
javascript include (js file)
rss agent (xml file)
outputting the information dynamically is easy enough -- its just a setting inside the message board program that, when set properly, gives you the xml, html, or js file string that you can then take and enter somewhere else -- in my case, a flash file.
i just don't know what do do in flash once i have the above. i was hoping someone here could walk me through how i get the flash movie to display the information?
thanks
Display Message Upon Array Choice
I'm trying to display a message in a dynamic text box if the user types in a specific name in a search box, based upon an array. If the user types in "choice 3" for example, I want my "message" text box to display a message about the user's choice. Here's the code I'm using:
var choice:Array = [{label:"choice 1"}, {label:"choice 2"}, {label:"choice 3"}, {label:"choice 4"}, {label:"choice 5"}, {label:"choice 6"}, {label:"choice 7"}, {label:"choice 8"}, {label:"choice 9"}, {label:"choice 10"}, {label:"choice 11"}, {label:"choice 12"}, {label:"choice 13"}];
autoComplete.dataProvider = new DataProvider(choice);
if(choice = "choice 3") {
message = "choice 3 message text"
}
And here's are the error messages I'm getting:
1067: Implicit coercion of a value of type String to an unrelated type Array.
Any ideas?
How To Change Colors ?
I have some variables, which are set to 0x000000 for example.
how can you change that value, and then make the resulting change populate throughout the movie?
or do you specifically have to target all the objects that need to be colored?
Can you use a Listener ? any code examples or tutorials on this subject, it must be a reasonably useful thing to do.
Change Colors
hi!! i have more questions!!
see this site:
www.simonin.it - (great website)
and see the section COLORS........
how can i change the color of my mc´s: ?
i have much mc´s, is dificulty change 1 by 1 understand?
plis, sorry my english again, i not understand much of italian!!
Periodically Display Message According To Timer & Array
Hi everyone, i have a movie going at 12 FPS i built a timer countdown script.
Basically i want to have random elements pulled from an array at regular time intervals. My problem is figuring out how to calculate the interval at wich the element is sopposed to be pulled from the array based on the timer....
My code is
ActionScript Code:
var level1 = new Array();
#include "levels.as" // Contains the level1 array with 11 elements in it
seconds = 120;
time_left = seconds*12;
total_time = time_left;
function countdown() {
time_left--;
if (time_left<=0) {
// Action when script is done
}
minutesLeft = Math.floor(((time_left/12)/60));
secondsLeft = Math.floor(((time_left/12)%60));
if (secondsLeft<10) {
secondsLeft = "0"+secondsLeft;
}
_root.remaining.text = minutesLeft+":"+secondsLeft;
}
function dropInterval(levelX) {
levelLenght = levelX.length;
//timePrecent = Math.floor((time_left*100)/total_time);
//levelPrecent = Math.floor((total_time*100)/levelLenght);
//this is what i need help on.....
//my above formulas are useless.....
}
_root.onEnterFrame = function() {
countdown();
dropInterval(level1);
};
I really hope someone can help me....
thank you for your time
~Gabor Szauer
Display Message Based Upon Array Choice - Help
I'm trying to display a message in a dynamic text box if the user types in a specific name in a search box, based upon an array. If the user types in "choice 3" for example, I want my "message" text box to display a message about the user's choice. Here's the code I'm using:
var choice:Array = [{label:"choice 1"}, {label:"choice 2"}, {label:"choice 3"}, {label:"choice 4"}, {label:"choice 5"}, {label:"choice 6"}, {label:"choice 7"}, {label:"choice 8"}, {label:"choice 9"}, {label:"choice 10"}, {label:"choice 11"}, {label:"choice 12"}, {label:"choice 13"}];
autoComplete.dataProvider = new DataProvider(choice);
if(choice = "choice 3") {
message = "choice 3 message text"
}
And here's are the error messages I'm getting:
1067: Implicit coercion of a value of type String to an unrelated type Array.
Change Colors On Button ...?
how do you change the color of a button on a menu after you have clicked on it and come back to the menu? (in other words, i want the user to be able to see which buttons they have clicked on. ie: radial buttons in director)Would i use the "if" action? what would the condition be?
thanks in advance.
~openyoureye
Background Change Colors?
how do i get my background ot change colors? i have the mc made, and it is named background. now what?
How Do I Change The Colors Of My Scrollbar?
Hi,
I was hoping someone could help me.
I'm relatively new to Flash MX and I was wondering how I can change the color of my scrollbar within my scrollpane.
Any help would be appreciated!
Thx,
Moots
Change Colors From Html
hello to everybody, i'm spanish so I'll try to explain myself in english.
I'm building a site for a newspaper and I need to put a flash calendar with some information on it. Each page of the paper has a diferent colour and my bosses want the flash to has the same colour as the page it's on, so they want the movie to take the information from the html code...
I hope I'm explaining it ok.
Please, help me but anyway, thank you very much.
Greetings.
Ara
How Do I Change A Gradients Colors?
I have some gradients that need to be changed in flash. The files were originally created in Illustrator. It would be a real pain in the ass to have to go back and create a new .ai file, is there any way to change the gradient colors inside of Flash?
How Can I Change DateChooser Colors?
Hi,
What's the easiest way to change the colors of the dateChooser component in MX 2004....?
I know how to change the font & fontsizes with the basic:
my_comp.coloe
my_comp.fontFamily
But I can't change the color of the background. Or even better; get rid of the background....?
Help!
thanks in advance!
Change Layer Colors
I have a big group of layers that I'd like to make the same color. Is there a way to change them all at once. I tried to select them all and change the color of one, but it just changed the one and not all of them. I would think there would be an easy way of doing this.
Thanks.
ScrollPane Change Colors
Please help with the action script code to change the Color default on the Scroll Pane from the Componets window. Need to change it to a different color, I can only find code in CSS for HTML scroll bars but not for FLASH.
Thanks for your help
Denise
Change Object Colors
Hello i want to do something like this:
http://www.macromedia.com/support/fl...ect/index.html
BUT i want to be able to change the color of various parts.. let's imagina that i want to be able to change the coor of the t-shirt but also the color of the symbol in the middle? How can it be done? Anyone can help me please?
Thanks
Change MC Colors Based On XML?
is it possible to have a movieclip change its color based on XML data? basically im generating movieclips based on an XML file and i want certain MCs to be specifc colors based on the catagory they represent... i hope that makes sense.. ive been messing around a bit and im having no luck...
Change Colors And SharedObject
Hi all,
I have a quite difficult problem (well, for me it is). I mean, that I've got an attached mc from the library and it's duplicated with xml. Mc has a function of an button (getUrl). I need Mc to change a color when "rollOver" and "rollOut" and then when "on release" to change a color forever by using a SharedObject. For example there are about 60 of these mcs and only the one, which will be clicked, has to change the color.
Could someone please help to make a small sample for me? I would really appreciate it.
Time & Message Box
how to display time in flash5 & also a message box with the matching message such as if time is 12:00 in the afternoon then message says "good Afternoon"....plz .help me
How Do I Display An Error Message When A Log In And Password Are Left Blank?
The code I am currently using to do this works, but only when something is entered, and then is deleted, it tries to pass variables when nothing is typed in the box? thanks, KC
on (release, keyPress "<Enter>") {
var error = 0;
if (txtLoginId == "" && txtpassword == "") {
tellTarget ("_root.logerMOV") {
gotoAndPlay (2);
}
error = error+3;
}
if (txtLoginId == "") {
tellTarget ("_root.logerMOV") {
gotoAndPlay (2);
}
error = error+1;
}
if (txtpassword == "" ) {
tellTarget ("_root.paserMOV") {
gotoAndPlay (2);
}
error = error+1;
}
if (error == 0) {
getURL ("index.asp", "_self", "POST");
}
}
If Text File Does Not Load Display A Message To Screen
Hi,
I am currently using the code below to read from a text file and display it in a dynamic text box with a scroll bar in my movie.
When it can't load the text file an error message appears saying "undefined".
How can i modify the code so that it will print a error message of my choice to the screen. i.e. "text file not loaded"
Please help, i have tried but to no avail!
Thanks
Umark
--------------------------------------------------------------
loadVarsText = new LoadVars();
loadVarsText.load("4203-4.txt");
//assign a function which fires when the data is loaded:
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
//Now that we know the data is loaded,
//set the text content of the Text Field
//with the instance name "scroller" equal to the
//contents of the variable
scroller.text = this.var1;
} else {
trace("not loaded");
}
};
Error Function: Display Message And Stop Further Execution
How can I stop execution of Actionscript but without exiting the whole application (an AIR app)?
So far I have this function:
ActionScript Code:
function as_error(msg, obj_internal_info = false) {
var msgHTML = "<b><font color="FF0000">Sorry, an error occured:</font><br><br>"+ msg +"</b>";
if (typeof obj_internal_info == "object") {
msgHTML += "<br><br>Extra info:";
for (var i in obj_internal_info) {
msgHTML += "<br>"+ i +" : "+ obj_internal_info[i];
}
}
show_pagewide_msg(false, msgHTML);
throw new Error("An error occured.");
}
This shows a nice error message to the user and then I want it to stop executing any further actionscript until the next event triggers some code. I have managed to make this kind of function in both Javascript and PHP (PHP was simple - as always!) so I hope it can be done in AS as well.
The above example almost works, but I would like to not have it come up with the standard dialog box saying "An ActionScript error has occured: ...blablabla...". I would even like to be able to control if script should continue or not.
How would I do this in AS?
Allan
Change Colors Of Scrollpane Compenent
How do you change the colors of the scrollpane component in Flash MX? The Arrows, Scroll pane, and is there a way to make the default background of white a different color, or transparent?
Thanks!
Marquis
Change Other Buttons Colors On Mouse Over?
Hey guys,
I have very little flash experience so please bear with me.
I have 4 buttons in a row that are all different colors. I want to have it so when I mouse over / click one button, the other 4 change to the same color as it then return to their original states when the mouse moves off.
I tried just drawing the effect i wanted in the up,over,down frames for each button (and placing all the buttons in the same layer) but because of the arrangement only the front button works.
I would appreciate any help you can provide.
Making A MC Gradually Change Colors...
i have a MC that i can change colors, but i want it to happen gradually...
is there a tutorial out there that shows how that is done via actionsript...
-manny
Input, Change Fonts And Colors
Is there any tutorial links showing how to do something with flash that can let user to type in a TEXT, and font size, as well as the color as well. Please Help
Dynamically Change Bordercolor Up/over/down Colors
I am building a map of the US. Each state is a button with a black border and gray as the up color, red as the over color and pink as the down color. I am trying to use and XML file to allow me to dynamically change the bordercolor, up color over color and down color of the states depending on what site I want it to be on.
I have already made it dynamic on if each state button is enabled via xml. I know about the color object:
myColor = new Color (_root.WA);
myColor.setRGB = 0xFF0000;
but that turns the whole thing red. I just want to be able to access each individual part of the button. Is this possible? Thanks in advance.
MC Color Change With Thousands Of Colors
I came across a site (URL below) that uses a very large color palette to let the user pick the color for the movie clip. It looks and acts just like a standard color picker in Photoshop, but with click and drag functionality to change colors
Can anyone tell me how they did this? I've found many tutorials for doing this with a relatively small number of pre-defined color swatches. I find it hard to believe that the author actually manually defined each color pixel in the palette to accomplish this one. I am relatively new to AS, and have Flash 8 Pro at my disposal.
Here is the site: http://www.southernmotorcompany.com/ -- click Palette button on the left.
Any help would be appreciated!
Change Other Buttons Colors On Mouse Over?
Hey guys,
I have very little flash experience so please bear with me.
I have 4 buttons in a row that are all different colors. I want to have it so when I mouse over / click one button, the other 4 change to the same color as it then return to their original states when the mouse moves off.
I tried just drawing the effect i wanted in the up,over,down frames for each button (and placing all the buttons in the same layer) but because of the arrangement only the front button works.
I would appreciate any help you can provide.
Change Components Skin Colors?
Anyone know how to change the colors (skin) of the compenents in mx pro 2004?
Like the scroll bar or the mp3 player? I have the scroll bar that comes stock with mx on my site but I would like to be able to change the color of it..... www.techvector.com
Change DataGrid Scroll Colors
I'm using the MX04 DataGrid component and have managed to set all the other styles the way I want but have had trouble changing the colors used by the scrollbar.
So far I've been using code similar to this:
ActionScript Code:
////myDataGrid.setStyle("backgroundColor", 0xFF0000);////
Can anyone help me change the colors of MyDataGrid's scroll bar?
Thanks.
Change Colors Of Human/animals Example?
Hi,
I have found a website at: http://www.knapp.nu/index.aspx?ctrl=design
and would like to do something like that in flash. but as you see in the picture it is a circle-button but I would like to replace it with at human/animal where you can change the hairstyle, skincolor, haircolor, eyecolor, clothes color, motuh color and so on..
I bet that there are such examples but I cannot find them.
anyone who can guide me with this?
/thanx for your help, zilveer
Change Components Skin Colors?
Anyone know how to change the colors (skin) of the compenents in mx pro 2004?
Like the scroll bar or the mp3 player? I have the scroll bar that comes stock with mx on my site but I would like to be able to change the color of it..... www.techvector.com
Help With Change Colors Of Flash Button
I have a code that is set to work with a presaved flash movie, "button.swf" to create a flash button, through HTML. I simply insert the code into the HTML part of Frontpage and then it uses presaved "button.swf" to complete the flash button. I can change the color of all the buttons, however, I don't know how to make them different colors each. Can you help me out ?
"Button.swf" cam be downloaded at https://cms.psu.edu/AngelUploads/Files/aba124/button.swf
Dont worry, I aint no virus spreader, etc. lol
This is the code that works with the flash movie:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH=155 HEIGHT=240>
<PARAM NAME=movie VALUE="button.swf?tarframe=_self&exbackground=828282&makenavfield0=Members&makenavurl0=www.greeks.psu.edu/nphc/members.htm&makenavfield1=History&makenavurl1=www.greeks.psu.edu/nphc/history.htm&makenavfield2=Officers&makenavurl2=www.greeks.psu.edu/nphc/officers.htm&makenavfield3=News&makenavurl3=www.greeks.psu.edu/nphc/news.htm&makenavfield4=Calendar&makenavurl4=www.greeks.psu.edu/nphc/calendar.htm&makenavfield5=Spotlight&makenavurl5=www.greeks.psu.edu/nphc/spotlight.htm&makenavfield6=Pictures&makenavurl6=www.greeks.psu.edu/nphc/pics.htm&makenavfield7=Contact Us&makenavurl7=www.greeks.psu.edu/nphc/contact.htm">
<PARAM NAME=loop VALUE=0>
<PARAM NAME=menu VALUE=0>
<PARAM NAME=quality VALUE=High>
<PARAM NAME=scale VALUE=NoBorder>
<PARAM NAME=salign VALUE=LT>
<PARAM NAME=wmode VALUE=Transparent>
<PARAM NAME=bgcolor VALUE=000000>
<param name="_cx" value="4101">
<param name="_cy" value="6350">
<param name="FlashVars" value>
<param name="Src" value="button.swf?tarframe=_self&exbackground=828282&makenavfield0=Members&makenavurl0=www.greeks.psu.edu/nphc/members.htm&makenavfield1=History&makenavurl1=www.greeks.psu.edu/nphc/history.htm&makenavfield2=Officers&makenavurl2=www.greeks.psu.edu/nphc/officers.htm&makenavfield3=News&makenavurl3=www.greeks.psu.edu/nphc/news.htm&makenavfield4=Calendar&makenavurl4=www.greeks.psu.edu/nphc/calendar.htm&makenavfield5=Spotlight&makenavurl5=www.greeks.psu.edu/nphc/spotlight.htm&makenavfield6=Pictures&makenavurl6=www.greeks.psu.edu/nphc/pics.htm&makenavfield7=Contact Us&makenavurl7=www.greeks.psu.edu/nphc/contact.htm">
<param name="Play" value="0">
<param name="Base" value>
<param name="AllowScriptAccess" value="always">
<param name="DeviceFont" value="0">
<param name="EmbedMovie" value="0">
<param name="SWRemote" value>
<param name="MovieData" value>
<EMBED src="button.swf?tarframe=_self&exbackground=828282&makenavfield0=Members&makenavurl0=www.greeks.psu.edu/nphc/members.htm&makenavfield1=History&makenavurl1=www.greeks.psu.edu/nphc/history.htm&makenavfield2=Officers&makenavurl2=www.greeks.psu.edu/nphc/officers.htm&makenavfield3=News&makenavurl3=www.greeks.psu.edu/nphc/news.htm&makenavfield4=Calendar&makenavurl4=www.greeks.psu.edu/nphc/calendar.htm&makenavfield5=Spotlight&makenavurl5=www.greeks.psu.edu/nphc/spotlight.htm&makenavfield6=Pictures&makenavurl6=www.greeks.psu.edu/nphc/pics.htm&makenavfield7=Contact Us&makenavurl7=www.greeks.psu.edu/nphc/contact.htm" loop=false menu=false quality=high scale=noborder salign=LT wmode=transparent bgcolor=#000000 WIDTH=155 HEIGHT=240 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>
Please try to see if you can change the colors of the different buttons. Thank You
How Can I Change Colors To Black & White?
how can i change colors to black & white?
for example if i have like 10 movie clips and i want them in shades
of black & white how could i do this?
thanks in advance.
Random Colors Ever Time You Open A Movie
I was looking at my friend webpage and he has it so that everytime you open the site, the background is a different picture (it cycles through about 5) and the color scheme of the nav. menu is different. does anyone know how to do that?
|