flash combox 2 PHP

This is a discussion on "flash combox 2 PHP" within the Flash & Multimedia Forum section. This forum, and the thread "flash combox 2 PHP are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 26th, 2006, 03:18
New Member
Join Date: Oct 2006
Location: VA
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
flash combox 2 PHP

Hi flash community,

Just and example on how to receive flash form input (standard time 3:25 PM) to military time (15:25)

Also this example shows how to get flash combox values 2 php!!!

First, create three combox components on stage/form (One for hr,min, then AM/PM)

Second,give combox instance names (Hr_cb,Min_cb,AMPM_cb)

example:

create layer called "actions". Inside there do this...

stop();
//initialize form when load
//if you have php script and code "phpscript()" you will see posted variables
//even though there null

Hour_cb = "";
Min_cb = "";
AM_PM_cb = ""

//establish component listener for comboboxes
cb_comp_listner1 = new Object();
cb_comp_listner1 = function(evt){
trace("Selected data is: " + evt.target.selectedItem.label);
}
Hr_cb.addEventListener("change", cb_comp_listner1);

cb_comp_listner2 = new Object();
cb_comp_listner2 = function(evt){
trace("Selected data is: " + evt.target.selectedItem.label);
}
Min_cb.addEventListener("change", cb_comp_listner1);

cb_comp_listner3 = new Object();
cb_comp_listner3 = function(evt){
trace("Selected data is: " + evt.target.selectedItem.label);
}
AMPM_cb.addEventListener("change", cb_comp_listner1);

//button to submit info to php script
Apply_Button.onRelease = function () {

//of course apply validations for other components if neccessary here


//store selected option from combox to variables
Hour_cb = Hr_cb.getValue();
Min_cb = Min_cb.getValue();
AM_PM_cb = AMPM_cb.getValue();

//below...either one works...only do one of them, delete the one

// set sumbitURL to the URL of server side script
insertURL = "http://localhost/insertTable.php";

//this (if this input your url in "insertURL"where php script is located on srver

loadVariablesNum(insertURL, replyData, "POST");

//or this

getURL("http:\\\\localhost\\insertTable.php", "_blank", "POST");

}



PHP script do this to convert standard time to military and get combo box values...

<?php


if($_POST['AM_PM_cb] == "AM" AND $_POST['Hour_cb'] < 12){
$AThr = $_POST['A_Time_On_Hr'];
$ATmin = $_POST['A_Time_On_Min'];
$A_T_On = $AThr . $ATmin;
}else
if($_POST['AM_PM_cb'] == "AM" AND $_POST['Hour_cb'] == 12){
$AThr = $_POST['A_Time_On_Hr'] - 12;
$ATmin = $_POST['A_Time_On_Min'];
$A_T_On = $AThr . $ATmin;
}else
if($_POST['AM_PM_cb'] == "PM" AND $_POST['Hour_cb'] < 12){
$AThr = $_POST['A_Time_On_Hr'] + 12;
$ATmin = $_POST['A_Time_On_Min'];
$A_T_On = $AThr . $ATmin;
}else
if($_POST['AM_PM_cb'] == "PM" AND $_POST['Hour_cb'] == 12){
$AThr = $_POST['A_Time_On_Hr'];
$ATmin = $_POST['A_Time_On_Min'];
$A_T_On = $AThr . $ATmin;
}

//output to screen to debug results
echo "$A_T_On";
?>




THATS IT!!!!!
Reply With Quote

  #2 (permalink)  
Old Oct 28th, 2006, 19:59
JacobHaug's Avatar
SuperMember

SuperMember
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JacobHaug Send a message via MSN to JacobHaug
Re: flash combox 2 PHP

Thanks, I could see this being something the flash community would enjoy, I will bookmark it and link to this URL when someone asks about how to do that. Which I am sure they will...lol
Reply With Quote
Reply

Tags
combobox 2 php

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sr. Flash Developer > SynCruiser Flash Widget ipanema Job Opportunities 0 Apr 10th, 2008 23:20
Flash Designer (Central London, Flash, Flash Games, Flash banners, 22K-28K) CapitalStrategy Job Opportunities 0 Aug 13th, 2007 09:39
Flash Designer (Central London, Flash, Flash Games, Flash banners, 22K-28K) CapitalStrategy Job Opportunities 0 Aug 13th, 2007 09:04
playing flash within flash with slow internet connection bejamshi Flash & Multimedia Forum 4 Jan 19th, 2007 02:07
Cannot see some Flash after upgrading to Flash Player 9 ralloux Flash & Multimedia Forum 2 Aug 30th, 2006 21:48


All times are GMT. The time now is 17:11.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43