Drawing A Real Room In Flash?[CS3]
Hi, I tried to create a realistic looking room, just for practice really. I tried to upload the fla, but it is too big. The html is at: http://www2.hawaii.edu/~johnbarr/adobe.html
the fla is at: http://www2.hawaii.edu/~johnbarr/adobe.fla
basically, I just used the rectangle tool to create the floor, but I am wondering if somebody has a better way to make a floor, and wall that looks pretty real. I tried to look at a flash drawing tutorial but couldn't find one.
Thanks so much, Johnny`-`
FlashKit > Flash Help > Flash Newbies
Posted on: 12-29-2008, 02:24 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Flash Zoom Effect From Room To Room?
I want to make flash create a zoom effect from one room to another. In other words, I want the zoom to go from outside a building, into the door, down a hallway, into another room. Can this be done by just creating several graphic images and put the zoom blur on it and import them as graphics? Would it take more space up if I just tweened one graphic upwards? Either way I see a deterioration of the graphic image. How can I increase the size of the image without destroying the integrity of the photo's pixels?
The effect I want can be found on the following pages.
Thanks for your help.
http://agencynet.com/
http://www.fullsail.com/
Using Drawing API To Draw On Screen And Then Having Flash Redraw In "real Time"
Hi,
I am about to attempt to create a Flash movie that would eventually become a screensaver in Screentime. What this is going to consist of is a customized control panel (as per the Screentime API specs) in which the user can draw on screen with the built in drawing methods and the actual screensaver in which the user's drawing is recreated, line by line, in simulated "real time" in a scaled up full screen version.
What I'm asking here is basically what the best approach would be for me to accomplish this. I don't necessarily need a step by step tutorial, as I have a pretty good grasp of Actionscript at this point. The drawing interface part is simple, what I really am trying to figure out is the best approach to capturing each vector point in sequence and assigning it a time stamp as well, so that it can be "played back" in at least an approximation of how the user drew it.
So far what I am thinking is that I should store each point in the drawing as a new object in an array, with all the various properties of the vertor point including it's time stamp as properties of that object. What I can't really figure out so far is what is the best way to script the intervals in which my recording script captures this vectors and pushes them into the array.
Any advice at all would be much appreciated.
Thanks,
Brian
Real Time Drawing?
hi,
i dont know if this is a general question, but ive been seeing a lot of sites that have "real time drawing", were it seems as if flash is daring everything out. i have tried to use motion and shape to get the same affect but it dosent work.
a good example is http://www.kx2web.com/
i really want to get this, anything would help.
thanks
Card Game (turn-based) - Lobby Room And Game Room, Maintain State
Hi all, I´m new in this forum, since now i appreciate for any help.
I´m developing a turn-based card game in Flash 8 (multiplayer), using the concepts of lobby and room. In this case when the user login de game, he always see the lobby, where he can choice the games, then the user selects a game in a dataGrid and enter the game.
Inside the game (that resides in another frame in my .fla), there is a button that when clicked brings de users to the main lobby ( gotoAndStop(“lobby”) ) so that the user can visualize the lobby with the game running in background with the others users.
The problem is when the user return to the game ( gotoAndStop(“game”) ), the images, cards, players name and chat history text disappear, all the game object disappear, remaining only the original graphics (movie clips) to the game room.
In fact, I need a solution to maintain the state of the game when the user decide to visualize the lobby (with the game running) and after return to the game.
Thanks for any help.
Regards,
Luiz Filipe (CURURU)
Os: Sorry for my bad english -
Drawing Real-time During Play Time
It's kind of hard to explain, but what I want to happen is make the movie look like I'm drawing the shapes and lines during playtime. So say if I've got a character, I want it to look like he's being drawn line by line like an old Looney Tunes cartoon or such.
Any help is much appreciated!
Drawing An Outline Of An Object In Flash And Then Animating The Drawing?
I wish to draw an outline of an object in flash? bit by bit a piece of the outline is drawn until the outline is completed, once this has finished then object then appears and the outline disppears (this part I can manage).
I do not know where to begin? So may need a lot of direction on this one.
Flash Chat Room
I really want to understand how to build a flash chatroom. As far as i know the flash part is the EZ part, its the CGI that has me a little nervous, and then integrating the two.....is there any resources that I could start to study, or someone willing to provide a quick walk through of the concept? I would greatly appreciate any input in helping me in this adventure.
Chat Room In Flash Using ASP
Hey:
I wanna make a chatting room in flash using ASP!!
Any example files..tutorials..etc??
plz help ..i need it fast
!!!
thanx in advance
Flash Chat Room
Does anybody know how to make a chat room in Flash 5? Cause I am making a fan site and I don't know how to make a chat room in flash. Thanks!
HELP FLASH CHAT ROOM ?
I am currently working on a project that will involde server side but i dont know a thing about server side and it will involve a flash chatroom could someone please help me make one please?
thanks in advance
Flash Chat Room
Is it possible to make a Flash Chat Room? If so, does anyone have a Fla or Zip so I can see how it works? Thanks.
Chat Room In Flash Mx
does any 1 kno how to make a chat room in flash mx if they do please send me a fla file to adilzaheer@msn.com or a turotial please -e-mail be that to or give me a link to wher the tutorial is thanks
Flash Chat Room
Thats right I want to script a chat room in my flash MX game. I know, you gotta have a server, well i do...and a website for it also at www.street-warz.com If anyone has any idea how to add a chat room to a flash game PLEASE PLEASE show me. Thank you for your time.
Flash Chat Room
Does anyone know how to build a chatroom like the one on this website :: www.fernandovargas.com ::
Flash Chat Room
Can anyone help me make a flash chat room using java or perl. Or give me a url 2 a site which helps you make a flash chat room.
Thanks
Need A Flash Poker Room
anyone know where i can find a flash poker room that you can use play money with? or does someone know who could make me one?
Flash/PHP Chat Room
Hi there!
I want to make a really-really basic chat program integrate in my site; however I need a tutorial since I'm not that good at PHP and whatnot.
I searched these forums, tried some tutorials, but couldn't get them to work
This one was mentioned several times:
http://www.sephiroth.it/tutorials/flashPHP/flash_chat/
Seems decent, but can't get it to work.
So. Do any of you know any good tutorials?
Thanks in advance!
Chat Room In Flash Mx
Hi
can any one help to develop or give sample with fla file that how to develop a chat room in Flash, i need idea to comnicate via server side that how can i share message to all client's , i need it for my site www.cmxd.com , you need Msie with 17" monitor or 1023 by 768 screen resolution to view site exactly as i develop.
__________________
Regards
Sajjad
CMXD.studios - CodeMasters & xTreme deZinerz
http://www.cmxd.com
Chat Room In Flash 5?
Does anyone know how to make a chat room in Macromedia Flash 5? It may require php? If you do, can anyone tell me how or give me a website that does? Thx.
Flash Chat Room
I've been working on a flash chat room for the past couple of weeks. The only thing I can't figure out is how to make flash display who is online, and keep this list refreshed..
Anyone got any Ideas. It's made with flash and php
Help With Flash Chat Room.
this is a cry for help for any one who has suffered defeat time and time again at gettign somethign to work.
----------
flash chat rooms i dont get it.
ive dipped my hand in everything. from digital arts, to C++ to advance photoshop filters, to 3ds max, to html and lingo and ofcourse acctionscript.
but i just dont get it.
i have been trying to make a basic online flash cat room for over a year now (by that i mean i trued doing one a year ago, failed and never tried it again until a few days ago)
but as any of you know a few days trying to make somethign work is hugly frustrating.
a few days ago, i never understood mysql (im no master now) but as soon as (with the users help on this fine forum) i made a mysql database work. i got the concept.
and i kinda get the concept of this flash chat.
now the bottom line is, i am absolutly sick and absolutly tired of trying to get this to work (anyone who has been in a similar situation im sure feels my pain, of constant frustration, confussion and failure).
--------
so to what i am asking for.
<a href="http://www.gotoandplay.it/_articles/2003/12/xmlSocket.php">http://www.gotoandplay.it/_articles/2003/12/xmlSocket.php</a>
thats the tutorial i am doing.
my server is on freehostia.com
so, what am i meant to put on my server. what am i meant to change in the code. i understand the local host should be changed, but i would of thought my localhost would be my website
peaphil.freehostia.com
but that doesnt work.
ive looked at everything, and ive read everything. and i simply dont get it. by everythign, i mean on flash chat rooms and servers, not everything ever concieved or written.
i just want to know exactly what to do, then when it finially works, i can take that information and expand it.
also, i dont know if its my host? does it allow socket connections? it doesnt say. so trying ages to get it to work of freehostia, could only lead to more frustration.
please help me, im very very much comtimplating giving up and never looking in to online interaction and communication (and as a designer i think its becoming more and more important).
Flash Chat Room
I've been working on a flash chat room for the past couple of weeks. The only thing I can't figure out is how to make flash display who is online, and keep this list refreshed..
Anyone got any Ideas. It's made with flash and php
Flash Chat Room
I have been searching the net for tutorials on how to create a chat room in flash, but i cant find anything.
Is there any tutorial you guys have found online? if you have could you give me a URL. Also do you need the Flash communication server to run one?
Thanks
Jason
Best Flash Chat Room?
Hello,
I'm looking to add a flash based chat room to a web site, as I've heard there are some real nice ones available. Googling was a little overwhelming... I can't really tell the good from the bad (or even if there is a big difference).
Can anyone point me towards the more popular flash chat rooms if you know of any?
(server is LAMP)
or maybe you can buy them hosted... I don't even know
thanks a lot for any tips.
Making A Flash Chat Room
I am wanting my site to have a chat room,
I need to know how to get flash to with xml or somthing
Any web sites with examples or any peroson that can help me?
thanks
Im Looking For A Flash Chat Room Thing.
I can t find one anywhere!
I need it to be a chat that connects from running it from your desktop. If I ran the chat it would connect to the files it needs on my server.
I need the chat to have these things:
Everyone I tried on this site have either not worked or u have to run it on your web site.
Thanx please help
Kirk
Simle Flash Chat Room?
Hey everyone I know there are some posts and resources on this but I have gone through quite a few of them and still havn't found something that is working properely.
I just need a simple chat solution that I can put inside an existing flash website. All it needs to do is have a user choose a username without registration, log in and display the current users online. I'm looking for something that is flash + php.
Like I said I'm looking for something pretty simple it is for a radio station website so people can interact directly with requests and such.
Thank you
My Flash Chat Room (long)
I have programmed the beginnings of a flash chat room, which uses a MySQL database and PHP for the connection. I realize some people use XML for SQL connections but I haven't learned that method since it seemed more complicated.
I am putting this out there for anyone to look at, and possibly give some advice on future ideas that I will post at the bottom.
Until then, here is what I have accomplished so far.
1 database table
2 php pages (one writes messages to SQL, one gets messages from SQL)
Flash App that talks to the php pages.
Some info about the application
# When you send a message, it sends it to a PHP page, and inserts the info into a chatroom table in SQL.
# Every 3 seconds, it retrieves the last 5 messages in the SQL table, and if any of them are new, it posts the new ones.
# It pulls 5 because there could be a few new messages in the 3 second time period since last checking.
# As of now, the Users list will only display your name, not other people's names, because I haven't finished the AS3 code and php/sql table for Users. I have some info about it at the bottom of this post.
MySQL Database Table:
Tablename: ChatRoom
id - int(11) - Not Null - Auto Increment - Primary Key
Time - text - Null
User - text - Null
Message - text - Null
dataLayer.php
PHP Code:
<?php$dbh=mysql_connect ("localhost", "<DATABASE USERNAME>","<DATABASE PASSWORD>") or die('Cannot connect to the database because: ' . mysql_error());mysql_select_db ("<DATABASE NAME>");$sessionTime = $_POST['Time'];$sessionUser = $_POST['User'];$sessionMessage = $_POST['Message'];$sqladd = mysql_query("INSERT INTO ChatRoom (Time, User, Message) VALUES ('$sessionTime', '$sessionUser', '$sessionMessage')");?>
displayPost.php
PHP Code:
<?$dbh=mysql_connect ("localhost", "<DATABASE USERNAME>","<DATABASE PASSWORD>") or die('Cannot connect to the database because: ' . mysql_error());mysql_select_db ("<DATABASE NAME>");if (!function_exists('http_build_query')) { function http_build_query($data, $prefix='', $sep='', $key='') { $ret = array(); foreach ((array)$data as $k => $v) { if (is_int($k) && $prefix != null) $k = urlencode($prefix . $k); if (!empty($key)) $k = $key.'['.urlencode($k).']'; if (is_array($v) || is_object($v)) array_push($ret, http_build_query($v, '', $sep, $k)); else array_push($ret, $k.'='.urlencode($v)); } if (empty($sep)) $sep = ini_get('arg_separator.output'); return implode($sep, $ret); }}$query = "SELECT * FROM `ChatRoom` ORDER BY `id` DESC LIMIT 5";$result = @mysql_query($query);$queryCount = @mysql_num_rows($result);$output = "queryCount=$queryCount";for($count=0; $count< @mysql_num_rows($result); $count++){ $myRow = mysql_fetch_array($result); $arrayID = $myRow['id']; $arrayTime = $myRow['Time']; $arrayUser = $myRow['User']; $arrayMessage = $myRow['Message']; $output .= "&aE" . $count ."=". $arrayUser ." (". $arrayTime ."): ". $arrayMessage;}echo $output;?>
Flash Frame 1 (Enter username)
1 text field (input text) named "UsernameInput"
1 text field (dynamic text) named "errorText"
1 button named "Enter_btn"
AS3 code-
ActionScript Code:
stop();
Enter_btn.addEventListener(MouseEvent.CLICK, submitUsernameClick);
stage.addEventListener(KeyboardEvent.KEY_DOWN, submitUsernameEnter);
var myTimer:Timer = new Timer(3000, 0);
var userName:String;
UsernameInput.maxChars = 14;
UsernameInput.stage.focus = UsernameInput;
errorText.visible = false;
function submitUsernameEnter(event:KeyboardEvent):void {
if (event.keyCode == Keyboard.ENTER) {
enterChat();
}
}
function submitUsernameClick(event:MouseEvent):void {
enterChat();
}
function enterChat():void {
if(UsernameInput.text != "") {
userName = UsernameInput.text;
Enter_btn.removeEventListener(MouseEvent.CLICK, submitUsernameClick);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, submitUsernameEnter);
gotoAndStop(2);
} else {
errorText.visible = true;
UsernameInput.stage.focus = UsernameInput;
}
}
Frame 2 (Chat Room)
1 text field (dynamic text) named "ChatText"
1 text field (dynamic text) named "UserList" (this will soon be replaced with a List component)
1 text field (input text) named "InputText"
1 button named "Send_btn"
AS3 code-
ActionScript Code:
stop();
Send_btn.addEventListener(MouseEvent.CLICK, sendMessageClick);
stage.addEventListener(KeyboardEvent.KEY_DOWN, sendMessageEnter);
myTimer.addEventListener(TimerEvent.TIMER, getMessages);
InputText.stage.focus = InputText;
InputText.wordWrap = true;
ChatText.wordWrap = true;
ScrollbarChat.scrollTarget = ChatText;
ScrollbarInput.scrollTarget = InputText;
var usersArray:Array = new Array();
usersArray.push (userName);
myTimer.start();
var lastMessage:String;
var queryCount:int;
for(var ul:int = 0; ul<usersArray.length; ul++){
usersArray.sort();
UserList.text = "";
UserList.appendText(usersArray[ul]+"
");
}
function sendMessageEnter(event:KeyboardEvent):void {
ScrollbarInput.update();
if (event.keyCode == Keyboard.ENTER) {
sendMessage();
}
}
function sendMessageClick(event:MouseEvent):void {
sendMessage();
}
function sendMessage():void {
var requestP:URLRequest = new URLRequest("dataLayer.php");
var variables:URLVariables = new URLVariables();
variables.Time = new Date().toLocaleTimeString();
variables.User = userName;
variables.Message = InputText.text;
requestP.data = variables;
requestP.method = URLRequestMethod.POST;
sendToURL(requestP);
InputText.text = "";
InputText.stage.focus = InputText;
}
function getMessages(e:TimerEvent):void {
var requestG:URLRequest = new URLRequest("displayPost.php");
requestG.method = URLRequestMethod.GET;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, completeHandler);
loader.load(requestG);
}
function completeHandler(evt:Event):void {
var flashArray:Array = new Array();
queryCount = evt.target.data.queryCount;
flashArray[0] = evt.target.data.aE0; //newest
flashArray[1] = evt.target.data.aE1; //2nd newest
flashArray[2] = evt.target.data.aE2; //3rd newest
flashArray[3] = evt.target.data.aE3;
flashArray[4] = evt.target.data.aE4;
if(flashArray[0].toString() != lastMessage) {
for(var i:int=1; i<queryCount; i++){
if (flashArray[i].toString() == lastMessage) {
for(var postn:int = i-1; postn>-1; postn--){
ChatText.appendText(flashArray[postn].toString() + "
");
}
lastMessage = flashArray[0].toString();
ScrollbarChat.update();
ScrollbarChat.scrollPosition = ScrollbarChat.maxScrollPosition;
i = 20;
} else if (i == queryCount-1){
for(var posta:int = i; posta>-1; posta--){
ChatText.appendText(flashArray[posta].toString() + "
");
}
lastMessage = flashArray[0].toString();
ScrollbarChat.update();
ScrollbarChat.scrollPosition = ScrollbarChat.maxScrollPosition;
}
}
}
}
So now that I have this done, the next thing I need to do is have the Userlist dynamically update. I thought about making another SQL table to hold the usernames of current users, but I didn't know how to have it remove one if someone just closes the window. Here is the code I have so far which adds and removes data from the Userlist.
ActionScript Code:
import fl.controls.List;
//these are 2 buttons I added to the stage
remove.addEventListener(MouseEvent.CLICK, removeFromList);
addbtn.addEventListener(MouseEvent.CLICK, addToList);
var myList:List = new List();
myList.setSize(300,100);
addChild(myList);
function addToList(e:MouseEvent):void {
myList.addItem({label:"Username"}); Object
myList.sortItems();
}
function removeFromList(e:MouseEvent):void {
for(var i:int = 0; i<myList.length; i++){
var obj:Object = myList.getItemAt(i);
trace(obj);
if (obj.label == "Username") {
myList.removeItem(obj);
}
}
}
Would be nice to be able to click one or more names in the userlist and be able to open a new private chat with those people. There is a cool example at the very bottom of the "List Class" help page
Hopefully using this example I can find a way to open private chats.
However, the most pressing thing I have to figure out now is the dynamic userlist that displays the current users that are logged in, updating the list on everyone's screen as people come and go. I would really appreciate if someone knew an way I could find an event to remove the person's username from a "Users" SQL table when they close the internet window or change pages.
Need Your Help To Build A Class Room Using Flash
people, first of all hi for all of you ...
second and more important , that I will build a Class Room application that will use audio stream, text chat, attended users admin, white board and may be file share.
so please if any one of you has some recommendations for me, examples, open source applications or pieces to use, please tell me.
I will use Flash Media Server and Flex
and another thing, the application will be in Arabic, which is Right-to-Left language, and as you know that Mr.Flash does not support RTL languages, so if any one has a solution for this problem please tell me !!!
thanks ALL, and sorry for this long post
Chat Room Or Forums In Flash?
Is it possible to make a chat room or forum page in flash mx? If so can anyone tell me how or give me a link that tells me how? thx.
Making My Own Chat Room In Flash
Hi! I'm looking to make my own chat room in flash for a website I'm working on. I know there are tutorials out there, but they all talk about the Flash Communications server, which costs money. I was wondering if there's a better (free) way to do this. (Please note I have VERY basic actionscript or server knowledge, but I learn pretty fast)
Also, I was wondering how I would go about setting up a register/log in user system for the chat room and having a sort of character creator when the user signs up. In the chat room, the user's character would appear beside their name. (I know this is probably quite complicated, but I'll learn whatever I have to to get it done. Any links to tutorials or tips are greatly appreciated.)
Thanks!
My Flash Chat Room (long)
I have programmed the beginnings of a flash chat room, which uses a MySQL database and PHP for the connection. I realize some people use XML for SQL connections but I haven't learned that method since it seemed more complicated.
I am putting this out there for anyone to look at, and possibly give some advice on future ideas that I will post at the bottom.
Until then, here is what I have accomplished so far.
1 database table
2 php pages (one writes messages to SQL, one gets messages from SQL)
Flash App that talks to the php pages.
Some info about the application
# When you send a message, it sends it to a PHP page, and inserts the info into a chatroom table in SQL.
# Every 3 seconds, it retrieves the last 5 messages in the SQL table, and if any of them are new, it posts the new ones.
# It pulls 5 because there could be a few new messages in the 3 second time period since last checking.
# As of now, the Users list will only display your name, not other people's names, because I haven't finished the AS3 code and php/sql table for Users. I have some info about it at the bottom of this post.
MySQL Database Table:
Tablename: ChatRoom
id - int(11) - Not Null - Auto Increment - Primary Key
Time - text - Null
User - text - Null
Message - text - Null
dataLayer.php
Code:
<?php
$dbh=mysql_connect ("localhost", "<DATABASE USERNAME>",
"<DATABASE PASSWORD>") or die('Cannot connect to the database because: ' . mysql_error());
mysql_select_db ("<DATABASE NAME>");
$sessionTime = $_POST['Time'];
$sessionUser = $_POST['User'];
$sessionMessage = $_POST['Message'];
$sqladd = mysql_query("INSERT INTO ChatRoom (Time, User, Message) VALUES ('$sessionTime', '$sessionUser', '$sessionMessage')");
?>
displayPost.php
Code:
<?
$dbh=mysql_connect ("localhost", "<DATABASE USERNAME>",
"<DATABASE PASSWORD>") or die('Cannot connect to the database because: ' . mysql_error());
mysql_select_db ("<DATABASE NAME>");
if (!function_exists('http_build_query')) {
function http_build_query($data, $prefix='', $sep='', $key='') {
$ret = array();
foreach ((array)$data as $k => $v) {
if (is_int($k) && $prefix != null) $k = urlencode($prefix . $k);
if (!empty($key)) $k = $key.'['.urlencode($k).']';
if (is_array($v) || is_object($v))
array_push($ret, http_build_query($v, '', $sep, $k));
else array_push($ret, $k.'='.urlencode($v));
}
if (empty($sep)) $sep = ini_get('arg_separator.output');
return implode($sep, $ret);
}
}
$query = "SELECT * FROM `ChatRoom` ORDER BY `id` DESC LIMIT 5";
$result = @mysql_query($query);
$queryCount = @mysql_num_rows($result);
$output = "queryCount=$queryCount";
for($count=0; $count< @mysql_num_rows($result); $count++){
$myRow = mysql_fetch_array($result);
$arrayID = $myRow['id'];
$arrayTime = $myRow['Time'];
$arrayUser = $myRow['User'];
$arrayMessage = $myRow['Message'];
$output .= "&aE" . $count ."=". $arrayUser ." (". $arrayTime ."): ". $arrayMessage;
}
echo $output;
?>
Flash Frame 1 (Enter username)
1 text field (input text) named "UsernameInput"
1 text field (dynamic text) named "errorText"
1 button named "Enter_btn"
AS3 code-
Code:
stop();
Enter_btn.addEventListener(MouseEvent.CLICK, submitUsernameClick);
stage.addEventListener(KeyboardEvent.KEY_DOWN, submitUsernameEnter);
var myTimer:Timer = new Timer(3000, 0);
var userName:String;
UsernameInput.maxChars = 14;
UsernameInput.stage.focus = UsernameInput;
errorText.visible = false;
function submitUsernameEnter(event:KeyboardEvent):void {
if (event.keyCode == Keyboard.ENTER) {
enterChat();
}
}
function submitUsernameClick(event:MouseEvent):void {
enterChat();
}
function enterChat():void {
if(UsernameInput.text != "") {
userName = UsernameInput.text;
Enter_btn.removeEventListener(MouseEvent.CLICK, submitUsernameClick);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, submitUsernameEnter);
gotoAndStop(2);
} else {
errorText.visible = true;
UsernameInput.stage.focus = UsernameInput;
}
}
Frame 2 (Chat Room)
1 text field (dynamic text) named "ChatText"
1 text field (dynamic text) named "UserList" (this will soon be replaced with a List component)
1 text field (input text) named "InputText"
1 button named "Send_btn"
AS3 code-
Code:
stop();
Send_btn.addEventListener(MouseEvent.CLICK, sendMessageClick);
stage.addEventListener(KeyboardEvent.KEY_DOWN, sendMessageEnter);
myTimer.addEventListener(TimerEvent.TIMER, getMessages);
InputText.stage.focus = InputText;
InputText.wordWrap = true;
ChatText.wordWrap = true;
ScrollbarChat.scrollTarget = ChatText;
ScrollbarInput.scrollTarget = InputText;
var usersArray:Array = new Array();
usersArray.push (userName);
myTimer.start();
var lastMessage:String;
var queryCount:int;
for(var ul:int = 0; ul<usersArray.length; ul++){
usersArray.sort();
UserList.text = "";
UserList.appendText(usersArray[ul]+"
");
}
function sendMessageEnter(event:KeyboardEvent):void {
ScrollbarInput.update();
if (event.keyCode == Keyboard.ENTER) {
sendMessage();
}
}
function sendMessageClick(event:MouseEvent):void {
sendMessage();
}
function sendMessage():void {
var requestP:URLRequest = new URLRequest("dataLayer.php");
var variables:URLVariables = new URLVariables();
variables.Time = new Date().toLocaleTimeString();
variables.User = userName;
variables.Message = InputText.text;
requestP.data = variables;
requestP.method = URLRequestMethod.POST;
sendToURL(requestP);
InputText.text = "";
InputText.stage.focus = InputText;
}
function getMessages(e:TimerEvent):void {
var requestG:URLRequest = new URLRequest("displayPost.php");
requestG.method = URLRequestMethod.GET;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, completeHandler);
loader.load(requestG);
}
function completeHandler(evt:Event):void {
var flashArray:Array = new Array();
queryCount = evt.target.data.queryCount;
flashArray[0] = evt.target.data.aE0; //newest
flashArray[1] = evt.target.data.aE1; //2nd newest
flashArray[2] = evt.target.data.aE2; //3rd newest
flashArray[3] = evt.target.data.aE3;
flashArray[4] = evt.target.data.aE4;
if(flashArray[0].toString() != lastMessage) {
for(var i:int=1; i<queryCount; i++){
if (flashArray[i].toString() == lastMessage) {
for(var postn:int = i-1; postn>-1; postn--){
ChatText.appendText(flashArray[postn].toString() + "
");
}
lastMessage = flashArray[0].toString();
ScrollbarChat.update();
ScrollbarChat.scrollPosition = ScrollbarChat.maxScrollPosition;
i = 20;
} else if (i == queryCount-1){
for(var posta:int = i; posta>-1; posta--){
ChatText.appendText(flashArray[posta].toString() + "
");
}
lastMessage = flashArray[0].toString();
ScrollbarChat.update();
ScrollbarChat.scrollPosition = ScrollbarChat.maxScrollPosition;
}
}
}
}
So now that I have this done, the next thing I need to do is have the Userlist dynamically update. I thought about making another SQL table to hold the usernames of current users, but I didn't know how to have it remove one if someone just closes the window. Here is the code I have so far which adds and removes data from the Userlist.
Code:
import fl.controls.List;
//these are 2 buttons I added to the stage
remove.addEventListener(MouseEvent.CLICK, removeFromList);
addbtn.addEventListener(MouseEvent.CLICK, addToList);
var myList:List = new List();
myList.setSize(300,100);
addChild(myList);
function addToList(e:MouseEvent):void {
myList.addItem({label:"Username"}); Object
myList.sortItems();
}
function removeFromList(e:MouseEvent):void {
for(var i:int = 0; i<myList.length; i++){
var obj:Object = myList.getItemAt(i);
trace(obj);
if (obj.label == "Username") {
myList.removeItem(obj);
}
}
}
Would be nice to be able to click one or more names in the userlist and be able to open a new private chat with those people. There is a cool example at the very bottom of the "List Class" help page
Hopefully using this example I can find a way to open private chats.
However, the most pressing thing I have to figure out now is the dynamic userlist that displays the current users that are logged in, updating the list on everyone's screen as people come and go. I would really appreciate if someone knew an way I could find an event to remove the person's username from a "Users" SQL table when they close the internet window or change pages.
Attempting To Create A Flash Chat Room
I'm working on an online flash game that has a chat room that the players can all chat in.
At the moment, the field of chat is a dynamic TextField that has new messages appended to it. The size of the field remains constant. I also use a scroll bar to scroll through the chat.
The problem that I currently have comes when players click on the text (mostly to copy part of it). Clicking on the TextField causes the selection to jump immediately to the beginning of the TextField.
I considered having each new chat message being a new TextField that was placed under the previous, but that also prevents people from selecting the log of multiple lines.
I was wondering if anyone else has accomplished this and how they went about. I appreciate any advice.
Chat Room? Flash Communication Server?
Hello guys, i have seen people make chat rooms in Flash and they look quite sweet. But i went on sitepoint forum and asked them and they started blagging my head with XML plugins and stuff i am not familiar with.
But i found i have the flash communication server, so is it possible just to create one and make the users connect to that?
If so is there any online tutorials for that? if there isnt i reckon that should be the next big kirupa tutorial , hint , hint
Reply back
Jason
Introduce A Flash Chat Room With Java Server.
123 Flash Chat server Software
http://www.123flashchat.com
New tool from the makers of SWFKit . 123 Flash Chat server is a full featured, cross-platform chat server solution with a multi-threaded communications engine. It is 100% Pure Java-certified and the nice looking client is 100% Flash. Demo version available for download!
Organize chat-events, collaborative work sessions or online meetings
the 100% Flash client provides a nice looking interface and faster loading speed than regular java applet clients.
High-performance and stability with fast and easy installation on all major operating systems.
multi-threaded communications engine, 123 Flash Chat server software can support hundreds of chat rooms and thousands of visitors without any degradation in response time.
supports multiple-languages.
online web chat room demo .
chat room embed other's forum demo .
download url .
screen-shot
http://www.123flashchat.com/img/screenshot.gif
Best Flash Audio-video Chat Room Software?
Any recommendations for a good flash audio-video chat room software, for a chat website?
I've found these:
http://www.avchat.net
http://www.fcschat.com
http://www.avflashcom.com
http://www.camdatepro.com
They're all about the same price. The web sites aren't very popular, because it's such a specialist software, I suppose. That's what'd normally give me a clue, otherwise.
One has a forum, which is encouraging.
One of them had some _very_ bad reviews of its owner's service, on one site I found. I included it because the software seems good. Always a good idea to look for 'product_name review', or the 'product_name scam', if you're buying something expensive off the internet.
Any experts here have experience of these, or would recommend something else? The more features, the better.
Real Real Dumb Questions
I have been using Front Page to develope my divisions Intranet page for the past couple of years, and have become fairly proficient with the various versions from 98 to 2002. I am also in the process of designing a page for a friends band. My company (the US Postal Service) has let it be known that we can now use Flash during the development of our sites. My question/questions are: What exactly is Flash and what can it do for me to improve my pages? I have seen several sites that incorporate "movies" that I believe are Flash creations, into various parts of the site, although it appears that most are used on the "Splash" page. Can Flash "projects" be incorporated into a Front Page page, or does it have to exist as a standalone page? I have read through the tutorials but I guess I'm in a fixed mindset because I just can't seem to get a grasp on the whole Flash concept. A friend who has moved on to other products has loaned me her version 4 of Flash to experiment with, and I notice that version 5 can be had pretty cheaply on eBay, so I would not be adverse to purchasing an earlier version (4 or 5) for my personal use and while learning. If I can show a bit of proficieny with the product, HQ will probably supply me with the latest version, and more than likely, the necessary training to go along with it.
Sorry for the long post, but I'm at a loss for answers.
Thanks,
John
Flash And Real
Hey Flashkit Guys and Gals,
I just wanted to see about how to control a embedded Real Video Clip with an embedded flash file.
Have the play pause, stop etc in an flash file that will affect the real movie.
If anyone knows of a post about this, or can jut give me some information about doing this, I would appreciate it.
Thanks,
dduck1934
Help With Flash And Real Player
I have a real audio file that I want to be able to click a button and have the real audio file play. I have been using the get url but everytime i click it it pops a window open for a second. Is there a way I can open this file up without using the get url. I think this is whats causing the window to pop open.
Real Audio & Flash
How can I have Flash download and start playing a real audio file in the real audio player?
word,
bobadooka
Flash And Real Estate
I was wondering if Flash is good to create a Real Estate type site with query search.. I think it would be great because you sould make animated galleries. What type of grogramming is envolved with this?
Thanks
How To Use Real Photo's In Flash,please Help
Hello,
First I want to explain that before asking this question, I tried searching all over online. I search google for 7 days and endless hours for 'flash tuts' and aside from finding amazing helpful websites, I couldnt find the help for me newbie question. I always try to find the anwser myself before asking.
I offered to create this small website for a small childeren school. I know html but not flash. What I have is a real photo of the front of a theater, with different colored neon lights...some going straight, some twist in a design, then there are small light bulbs going all around the letters.
The theater image is going to be the first page, and then once you click the doors it will load a basic website, with no flash.
To help give a better idea...have you ever seen photos of las vegas at night, where they show all the bright glowing lights, moving all around and etc. I want to be able to take the same effect and to that to one photo of a theater I have.
I dont understand how I would add the effects to certain areas of the photo. Take the neon for example, how would I make certain neon lights glow or flash. Then for the light bulbs, how would I give them that on/off look?
I want to truly thank you for hopefully taking the time and helping me out. I'm sure this must be a real newbie question, but your help would mean a great deal to the kids and me....thanks
My First REAL Flash Site
Ok, its just about done, and I would like some feedback. Thanks to Kirupa and the great members here, I have learned a lot to make this site! Check out the mouseovers and all the sections that work (currently, News is the only non-functional section). Here is the test site ...
http://www.damoncollins.com/setaside/
There is one problem I'm having. In Internet Explorer (apparently on PCs and Macs), the gallery section is not working properly. I used a tutorial from this site to make centered pop-ups of each image in the gallery (tutorial link ) , but for some reason in IE, only the first three images actually make a pop-up window. In Netscape, all of them work.
So I'd like some feedback, and I need some help
Please Help, Having A Real Problem With Flash And PHP.
Hi all,
First I would like to say thanks to the guys at Kirupa for doing such a great job, I've found the tutorials really helpful. That aside, Im having real trouble integrating Flash with PHP.
I have a MySql Database set up, with values inserted, I have my php script which I am confident is not the source of the problem but I will post my source code just to be double sure.
##Flash Source Code##
//create loadvar object called l
l = new LoadVars();
//tell new loadvar object to load php file
l.load ("flashphp.php");
//once variables have been loaded do this stuff
l.onLoad = function() {
//create local variable called i
var i;
//i is zero, whilst i is less than the amount of data in the database (passed via php) increment i)
for (i=0; i<this.n; i++) {
//Text box is called venues. Add to that text box the data from the variables the php has passed through
venues.htmlText += this["venue"+i];
venues.htmlText += this["location"+i];
venues.htmlText += this["phone"+i];
venues.htmlText += this["web"+i];
}
}
// I added the comments just to let you all know what I 'think' it might be doing, im quite likely to be wrong hehe
##PHP Source Code##
<?
include("dbinfo.inc.php");
mysql_pconnect (localhost,$username,$password);
mysql_select_db ($database);
$qResult = mysql_query ("SELECT * FROM sites ORDER BY id ASC");
$nRows = mysql_num_rows($qResult);
$rString ="&n=".$nRows."&";
for ($i=0; $i< $nRows; $i++){
$row = mysql_fetch_array($qResult);
$rString .="id".$i."=".$row['id']."&"."venue".$i."=".$row['venue']."&".
"phone".$i."=".$row['phone']."&"."mobile".$i."=".$row['mobile']."&"."web".$i."=".$row['web']."&";
}
echo $rString."&";
?>
Seriously guys, any help or suggestions would be SO gratefully received, thank you for your time!
James
|