|
|
 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Flash (all versions) section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

May 19th, 2005, 06:08 AM
|
|
Friend of Wrox
|
|
Join Date: Dec 2004
Location: London, London, United Kingdom.
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Introduction please
Hi,
I have written my webpage using standard html / PHP and a bit of java
Question: My server isn't compatible with *.cfm
but I can run *.fla and *.swf
I use PHP to access MySQL and display the informations + use some variables (Articles_ID) to send the "surfer" to the correct page. like:
<form name=<?php echo "button".$Article_ID." "; ?>
method="POST" action="Articles.php?ID=<?php echo "$Article_ID" ?>"><p align="center" style="margin-top: 0; margin-bottom: -19"><input type="submit" value="View" name="Articles"></form>
Can this be done in *.fla or *.swf ?
What I am after is a better look and I think Flash can provide ths easily (everything been relative..)
|

May 19th, 2005, 09:54 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Oklahoma City, Oklahoma, USA.
Posts: 243
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Mantis
Yes this can be done, look into the LoadVars class. Below is a quick sample. The basic concept is create a LoadVars() object. When the user submits the form send the information to the server using the .load. From there you can determine when the server sends back a response using the onLoad and then use some code to determine where to send the using with a GetURL. Below is some code that I hope doesn't confuse you if it does post your questions and somebody will help.
Frame 1. -This would be your form page
stop();
var yourFormURL:String = "http://www.myDomain.com/myPHPCode.php";
var whereToGo:LoadVars = new LoadVars();
submit_btn.onRelease = function() {
submitChoice();
};
function submitChoice() {
var choice:Number = radioGroup.selectedData;
poll.load(yourFormURL + "?formField1=" + choice);
gotoAndStop("Waiting");
}
whereToGo.onLoad = returnedInfoLoaded;
function returnedInfoLoaded() {
gotoAndStop("Display");
}
Frame 2-Waiting.
Frame with the words submitting choice....
Frame 3.
Mantis you would do something like this
var whereToSendUser:Number = whereToGo.sendUserVarFromPHPPage;
if (whereToSendUser < 5) {
//send to somewhere
} else {
//send somewhere else
}
Peace
Mike
http://www.eclecticpixel.com
http://www.homegrownmusicjam.com
|

May 19th, 2005, 10:39 AM
|
|
Friend of Wrox
|
|
Join Date: Dec 2004
Location: London, London, United Kingdom.
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
a yes would have suffice :)
I just order: Dreamweaver MX: PHP Web Development
by Gareth Downes-Powell, Tim Green, Bruno Mairlot
Should make more sense after reading the book ;)
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |