| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| Neuer User Registriert seit: Nov 2005
Beiträge: 15
| How to load XML?
We can send xml to http server like this: Code: var my_xml:XML = new XML("<highscore><name>Ernie</name><score>13045</score></highscore>");
my_xml.contentType = "text/xml";
my_xml.send("http://www.flash-mx.com/mm/highscore.cfm", "_blank"); Thanks! |
| | |
| | #2 (permalink) |
| Techniker Registriert seit: Sep 2003 Ort: 64807
Beiträge: 16.322
|
make sendAndLoad to PHP Code: var my_xml:XML = new XML("<highscore><name>Ernie</name><score>13045</score></highscore>");
my_xml.ignoreWhite = true;
my_xml.onLoad = myOnLoad;
my_xml.sendAndLoad("your.php", my_xml);
function myOnLoad(success:Boolean) {
if (!success) {
// fac
} else {
// ok
}
} PHP-Code:
__________________ die ultimative antwort auf alle programmierfragen: der debugger mfg h.g.seib www.SeibsProgrammLaden.de |
| | |
| | #4 (permalink) |
| Supermassive Registriert seit: Aug 2004 Ort: Frankfurt, Bornheim
Beiträge: 861
|
hi, best practice to do so is to use flashRemoting. we had this question a couple of days ago, so maybe this helps you out. although it's written german, you maybe come along with the examples. if you don't, tell me and i'm going to translate some stuff for you. greetings, elsyian.
__________________ Personal » amenity*blogging » elysian.de » Flexpertise - Enterprise Flex Collaboration Networks » Xing » ColdFusion Community Everything Cairngorm » cairngormdocs.org |
| | |
| | #5 (permalink) |
| Neuer User Registriert seit: Nov 2005
Beiträge: 15
| Thanks
Great! Thank you very much,elysian! But this script can run well. var my_xml:XML = new XML("<highscore><name>Ernie</name><score>13045</score></highscore>"); my_xml.contentType = "text/xml"; my_xml.send("http://www.flash-mx.com/mm/highscore.cfm", "_blank"); Could you guess the source code of this file "highscore.cfm"? Thankx again! Geändert von lantian329 (08-02-2006 um 07:38 Uhr) |
| | |
| | #6 (permalink) |
| Supermassive Registriert seit: Aug 2004 Ort: Frankfurt, Bornheim
Beiträge: 861
|
hi again. i could guess, sure, but that's not what you want... ![]() the way you're about to go - passing variables directly to cfm templates - is good for small applications, but in the "real world" you'll shortly detect problems with that solution (e.g. conceptual design of the whole application, and also with lots of data to be transferred...) however, there is a tutorial on how to pass variables from flash to cfm-files using the loadvars class and that should help you out. you can find it here. if this still doesn't help or you're interested in the flashremoting solution after all, just let me know. greetings, elysian.
__________________ Personal » amenity*blogging » elysian.de » Flexpertise - Enterprise Flex Collaboration Networks » Xing » ColdFusion Community Everything Cairngorm » cairngormdocs.org |
| | |
| | #7 (permalink) |
| Neuer User Registriert seit: Nov 2005
Beiträge: 15
| Thanks
Thank you very much,elysian! I find the solution like this. flash: Code: on (click) {
var my_xml:XML = new XML("Ernie13045");
my_xml.contentType = "text/xml";
my_xml.send("http://t065/tony/xml.cfm", "_self","post");
} Code: <cfset my_xml=xmlparse(gethttprequestdata().content)> <cfoutput> #my_xml# </cfoutput> |
| | |
| | #8 (permalink) |
| Neuer User Registriert seit: Nov 2005
Beiträge: 15
| How to get radiogroup's value? Code: this.createClassObject(RadioButton, "first_rb", 10, {label:"first", data:5, groupName:"radioGroup"});
this.createClassObject(RadioButton, "second_rb", 20, {label:"second", data:10, groupName:"radioGroup",selected:"true"});
this.createClassObject(RadioButton, "third_rb", 30, {label:"third", data:15, groupName:"radioGroup"}); How to get radiogroup's value? Thanks! |
| | |
| | #9 (permalink) |
| Supermassive Registriert seit: Aug 2004 Ort: Frankfurt, Bornheim
Beiträge: 861
| PHP-Code:
__________________ Personal » amenity*blogging » elysian.de » Flexpertise - Enterprise Flex Collaboration Networks » Xing » ColdFusion Community Everything Cairngorm » cairngormdocs.org |
| | |
| | #11 (permalink) |
| Supermassive Registriert seit: Aug 2004 Ort: Frankfurt, Bornheim
Beiträge: 861
|
you're very welcome.
__________________ Personal » amenity*blogging » elysian.de » Flexpertise - Enterprise Flex Collaboration Networks » Xing » ColdFusion Community Everything Cairngorm » cairngormdocs.org |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |