Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




XML Post ?



Hello im trying to save a xml into a file.......
my code looks like

Code:
var date:Date = new Date();
date.getDate();
var firma:XML = <firma></firma>
firma.nombre = inname.text;
firma.texto = intext.text;
firma.fecha = date;
//ahora lo meto en el XML existente
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, loadXML);
loader.load(new URLRequest("text/book.xml"));
function loadXML(e:Event):void
{
var xml = new XML(e.target.data);
Firmas(xml);
}
function Firmas(firmaInput:XML):void {
var xmlList = firmaInput.children();
var xmlLenght = firmaInput.firma.length()+1;
firma.@value = xmlLenght;
trace(xmlLenght);
firmaInput.appendChild(firma);
trace(firmaInput);
trace(xmlLenght);

var url:URLRequest = new URLRequest("text/book.xml");
url.data = firmaInput;
url.contentType = "text/xml";
url.method = URLRequestMethod.POST;
var loader2:URLLoader = new URLLoader();
loader2.load(url);
}

}
y tried something with Filereference.Save()
nothing seems to save file
HELP !! ^^!



ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 08-13-2008, 01:17 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

My Post Clip Doesn't Grab Latest Post Until Refresh Or Next Post
ok, i have a movie that has a posting feature

problem is, when i submit a post, SOMETIMES the clip that handles the posting reads in the text before it has been written to the text file, resulting in the post not being shown when the text is reloaded. it will show if the browser is refreshed, or a new post is submitted afterwards

basically, i'm just loading a text file at the start of the clip and if a post is submitted, i go back and load the text file again

hope that makes sense....any ideas?

How Do I Post My SWF Sig In A Post On A Board?
I have made a small SWF sig to into my posts on other boards across the net, i'm wondering does anyone know what to put before the "http://mysite/sig.swf" ?

Thanks in advance.

What Does GET And POST Do?
hey

can someone tell me the difference between GET and POST and where and how would i use them?
please explain in detail
cause i'm kinda dumb


thanks a lot

Post Or Get Or Post Or Get Or Post Or Get...
i thought i had the differences figured out between using GET or POST while calling a loadVar or a GetURL action.........

i always hear that GET is for sending short string of vars by tagging onto the end of the url........
like myASP.asp?var1=fred&var2=flintstone

and i always hear that POST is for sending a much longer string of variables 'using a separate http header'
what that meant exactly.....i am not sure
but it sounds like a good thing
and it sounds like it doesnt show up in the browser address box like a GET string would

so i have gone on believing these assumptions......until now.....i had the occasion to need to use the POST method
so i did it like this:
loadVariablesNum("submitcontent.asp, 0, "POST");
and i figured flash would send out all of my root variables under the mysterious aforementioned separate http header.......well.....no such dice

so i decided to try this code:

loadVariablesNum("submitcontent.asp?area="+_root.a rea+"&sect="+_root.sect+"&page="+_root.page+"hot01 ="+_root.hot01+"&hot02="+_root.hot02+"&txt01="+_ro ot.txt01+"txt02="+_root.txt02+"&txt03="+_root.txt0 3+"&txt04="+_root.txt04+"img01="+_root.img01+"&img 02="+_root.img02+"&img03="+_root.img03+"&img04="+_ root.img04, 0, "POST");

basically adding the variable strings i wanted to send to the url.......and it works......
and the whole string shows up in the browser address box

so my pondery is 'why do we need 2 different methods of POST and GET.......when to me.....they appear to require the same syntax and basically accomplish the same thing

the only difference being that when i process them using asp...i have to use
areaSD=Request.Form("a")
for POST
and
areaSD=Request.QueryString("a")
for GET

i hope i am missing something important
i hope someone can illustrate where i am wrong
thanks in advance








[Edited by hansel on 05-06-2002 at 04:41 AM]

POST Bug?
does anybody know why flash movies aren´t sending variables data via POST in netscape?

POST
hi there.
i want a movie that opens a browser with some variables passed by parameter. i tried to do this:

var1 = "bah";
var2 = "bah2";
getURL("http://www.test.com/test.asp", "_blank", "POST");

but the browser opens with the variables in the address bar, as if it was passed with "GET". like, http://www.test.com/test.asp?var1=bah&var2=bah. the parameters are 2 passwords, and I don't want them going visible.

i'm doing this using FlashMX and exporting Flash4 SWF's. i believe it isn't a problem, because i'm not using something really advanced.

what's the problem with my script?

thanks so much
Mozart

POST And GET
Using flash5 here. I made a web site deal, and when you click the button it loads a movie that is the page you goto, but i don't know how to load a movie, AND tell it some variables. How do i tell a diffrent .swf some vars from my main .swf. If this doesn't make sense, tell me and i'll try to calrify.

First Post
Just thought i'd say hi to everyone here at flashkit.

This Is Third Post.......
Hi There...
I have uploaded my FLA and TXT file with this entry.

See the code below :

This is what i hace given at first frame.

stop();
loadVariablesNum("sai.txt", 0);
attachMovie("piegraph", "pg", 2);
n=3;
pg._x = 400;
pg._y = 250;
pg._xscale = pg._yscale=scale;
pg.setRadius(rad);
// aValue = new Array();
// aLabel = new Array();
aValue = [_root.headline, _root.link, _root.blurb];
aLabel = ["sai", "tai", "rai"];
for (i=0; i<n; i++) {
pg.addSlice(aValue[i], aLabel[i]);
}


I am taking the values headline, link, blurb from the
external txt file(i.e.sai.txt) which contains code like
headline=40&link=30&blurb=30.

Here in the aValue array if i pass the hard coded
values like
aValue = [40,30,30] then it is working absolutely
fine.

But if i use the external script for variables , it is
not showing the PIE CHART.

I hope that you have understood the problem.

Thank you very much for your time and efforts.

Eagerly waiting for your reply


Saiprasad

Does Anyone GET This POST?
hi guys,

hope this is simple.

i have a .swf (amovie.swf) playing in a container on level 1 (level 0 is my "menu")

when i click on a button in amovie.swf it loads a different movie (anothermovie.swf) into level 1, using loadmovienum ("anothermovie.swf",1) this works fine.

(i know, i know...where is the quesiton..lol)

welllllll.

now i want to pass a variable (x) from amovie.swf to anothermovie.swf.
(to select a particular picture from an array in anothermovie.swf, dependand on which button is pressed in amovie.swf. my little picture array displays image[x] and associated data)

i thought i could just add a "post" to the end of the loadmovienum, but life just was never designed to be that simple.

no matter what value i give (x) in amovie, anothermovie just displays the same image and data (it is actually image[0], the first image in the array, thats a surprise eh!)

HERE IS THE QUESTION (at last)

am i missing something in the "get" and "post" thing?
do i need to specify which variables i want to pass?
do i have to "get" the variable i want in anothermovie?
do i actually have a life away from this computer?

the answers to these and other questions can be found in the next reply to this thread (i hope)

thanx in adv

Gary_passing everything but var(x)_bydesign

Anyone GET This POST
hi guys,

hope this is simple. already tried it in mx forum with no luck so thought maybe someone here might help

i have a .swf (amovie.swf) playing in a container on level 1 (level 0 is my "menu")

when i click on a button in amovie.swf it loads a different movie (anothermovie.swf) into level 1, using loadmovienum ("anothermovie.swf",1) this works fine.

(i know, i know...where is the quesiton..lol)

welllllll.

now i want to pass a variable (x) from amovie.swf to anothermovie.swf.
(to select a particular picture from an array in anothermovie.swf, dependand on which button is pressed in amovie.swf. my little picture array displays image[x] and associated data)

i thought i could just add a "post" to the end of the loadmovienum, but life just was never designed to be that simple.

no matter what value i give (x) in amovie, anothermovie just displays the same image and data (it is actually image[0], the first image in the array, thats a surprise eh!)

HERE IS THE QUESTION (at last)

am i missing something in the "get" and "post" thing?
do i need to specify which variables i want to pass?
do i have to "get" the variable i want in anothermovie?
do i actually have a life away from this computer?

the answers to these and other questions can be found in the next reply to this thread (i hope)

thanx in adv

Gary_passing everything but var(x)_bydesign

My Post Is Gone
May I ask why my post was removed?

Post To ASP?
Hi all - I have done this before but forget exactly how so I thought I'd see who remembers.

I have a flash piece I want to make post to an ASP and have the ASP return what it needs to back to flash without refreshing the page at all.

I got it to work using the function below but I have to run the function twice (click on my button twice) to get the text field to populate with the correct info. As you can see I tried a WHILE loop to get it to pick up but to no avail.

How can I get the value to populate the text area w/o making a MC that loops or something? Is that the only way - to check if the LoadVars is done? Please help



Code:
function sendQues() {
flashVar = "notSet"
question = _root.quesAsked.text;
loadVariablesNum("process.aspx", 0, "POST");

valSet = 0;
while(valSet != 1){
if(flashVar == "notSet"){
_root.quesAsked.text = flashVar;
valSet = 1;
}
else{
_root.quesAsked.text = "loading...";
}
trace(flashVar);
}
movieLoaded.text = "test";
}



Where flashVar is the var name returned by the asp.net page.

Post FLA
hi,

whats the best way to attach my FLA so some kind person can look at sumthing for me, I can't get it under the allowed size.

thanks.

Fla For Post Below
here is the fla for the post below

A New Post
Hello, i want to put my flash movie in a Html file ( using dreamweaver ) so i import that movie in my html. Now i want this flashmovie to be in the center of the page no matter what resolution the users screen is ... How do i do that ? do i have to use tables or ... ? can somebody explain that to me pls ? thx

Help Me Please (Re-Post)
Hi All,

I have reposted this as i still haven't managed to get it working and i really need some help with it.

I have a huge problem with a new flash mx website i've just created... it works absolutley fine as long as it's running on my computer, however, as soon as i upload it to the net, it all goes sadly wrong!!!

I really don't understand it... the other thing is, when you go to the address online and refresh the page after it's loaded, everyhting pops up fine... it's highly confusing... can anyone help me out?

The web address of the site is:
http://www.theforgottennorth.fsnet.co.uk
(The .swf file for the "News" section is messed up, if you look at any of the other sections you'll see the problem)

If you want to download the .fla files and have a look for yourself, i've made them available from here:
http://www.theforgottennorth.fsnet....ds/TFNFlash.zip

Thanks

Murph

Please Post .fla's
hello,

I'm trying to get a new forum off the ground and it's completely 100% non commercial. I have a forum called .fla Post where you can upload you .fla's for others to download and learn from. If some of you guys could post some of you .fla's I would greatly appreciate it.

Here's the link DevelopersForum.net

Im Trying To POST To A
cgi script on another server
and when I do it in the test environment it works and retrieves the values correctly...but when i do it from a browser it doesnt work at all....does anyone know what the problem may be

Get And Post
I just to ask when to use Get and when to use Post in actionscript, i.e. loadVariables, loadVariablesNum, etc. and also can you give a plain example to use this 2.

Thanks!!!

A Pic In A Post...
Hi There--

General Flashkit Question:

I've seen people place gifs or jpgs within the body of their posts.

How do they do that?

I need to do this to explain what Flash did that I don't understand.

Thanks,

Lee

Post It
I'm making a secret santa for a community called neopets. I need some help creating a way for them to post a message within a flash movie i created, and for them to set a password so only they can delete there post. (Optional: Post is automaticly deleted after 5 days) I need it so no one can use the same username. And i'm trying to stay away from cgi and pearl and all that other stuff. I just want text files. Thanks.

Get And Post?
Hey guys
in Flash, and even other script languages, there're the additional parameters GET and POST?

a) What do the exactly?
b) What's the difference?
c) When sould i use it? Examples?

X-post (help)
I posted this in the actionscript forum, but dont seem to be getting any help. Since I still consider myself extremely new, Im posting it here too.
Thanks
Josh

Thread is here

Post/get?
Ok I have:
getURL("(site)","_self", "POST");
But how do I make it use POST instead of GET?

Get Vs. Post
I'm working on a project which is due friday, please need help.!!!!!

I have a form in html and would like to send the variable to a flash file. I've been trying to do it using loadvariables in flash but nothing happens. How do i do it?

If anyone could give me a hand I'd really appreciate it.

T.

2nd Post XML Help - Please
Hi,

I'm using a component called bounce menu (http://www.flashkit.com/movies/Inte...-9046/index.php)

Being new to XML, I was able to modify the menu.xml file to work like I want them too. When you press a button, the proper SWF loads in the location. My question is regarding the location attribute in XML. Is there a way to make the button load 2 or more SWFs in different locations?

On the _root timeline I have this script:

gotoFunction = function(link) {
//no quotes on link
_root.holder.loadMovie(link);
}
stop();

Any help is greatly appreciated!

Luke

First Post: Looking For Some Help
Hey guys, I'm FlashBigger, and this is my first post here to the forums. I've got an issue with a page I'm making, and I could use some help.

The page is a simple Quiz type system. Twelve questions, multiple choice style. What I WANT to do is define a variable called Score, and have a correct answer add one to its default value of zero. Then, I want to send this score to a dynamic text box at the end. HELP!

The questions are each just set up on a frame, with three buttons for the multiple choice answers. I defined a value in my first frame (Score = 0 and on every correct answer, I added code to the on(release) event saying simply Score+1. So far no matter what I've changed, the dynamic text boxs ALWAYS says 0. What am I doing wrong?

Using POST
Hi,(posting again as it seems a simple problem??)

using MX.

I've got this line of code, which should be sending a variable (called searchname) to a html page to use in a search function, but its sending the variable name, and not the actual value contained inside the variable, I've just taken this straight from html, what am I doing wrong??

getURL("http://www.website.co.uk/folder.asp?ddr=option&search=searchname", "_blank", "POST");
}

thanks for any help.

boombanguk.

ARG Help With A Post
For pay pal I have this for a HTML button

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="my email">
<input type="hidden" name="item_name" value="Product">
<input type="hidden" name="amount" value="Price">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>

ok....

In flash, I have a submit button with
code:
on(release){
this.loadVariables("https://www.paypal.com/cgi-bin/webscr","POST");
}


and I have dynamic text boxes with the variables named as above...._xclick, currency so on.....

The HTML button works...my flash submit does not...WHY !

Post/get?
hi all...

something weird. need urgent help...

simple code:

<code>
formData = new LoadVars();
formData.x = 3;
formData.z = 4;
formData.r = 5;
//replyData = new LoadVars();
formData.send(submitURL, "_blank", "post");
</code>

when i try it from the flash player in preview - not published in a page - the variables are not being past to the submitURL.

on the access logs of the server i get a record for a GET request like this:

<log>
[26/Feb/2005:04:26:00 -0500] "GET /test.php HTTP/1.1" 200 135 "-" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12
</log>

i tested test.php with a normal html form and it works fine.

any ideas?

thanks...

How Is This Done... PLEASE POST
i have a movie clip with 15 frames

i want frames 2-12 to play once randomly everytime you play the clip

so basically frame 1 is intro then frame 2 to frame 12 (inclusive) should play once but randomly when a button is clicked on the stage...


so each frame (2-12) has the same button on it and when this button is clicked it sould play another frame (between 2-12) which has not already been played....

on the last frame (the 11th frame) when the button is clicked it should go to and stop on frame 15..

i hope u are understanding ....

please email me at viktajatt@hotmail.com

and i will send u the fla.....

look forward to your positive response

Get / Post
Hello all!
can I receive POST or GET variables in Flash?
E.G.
i have file page1.html with form inside, than when submit page1 i want to show results in movie2.swf.

thanks in advance.

Hello To You All Not Sure Where To Post This Tho
Hi to all the FK community am a noob when it comes to this so am probably going to need alot of help just like most ppl did when they started out.

Looking For An Old Post
There was a post a few wks ago i think that had a link to a flash movie that did the following: it was a bunch of circular pictures in a circle, and when you clicked on them, the larger version of the pic came into the larger middle circle. There was something with x and y too...any help on either how to do this or where this post is? thanks

My First Post...
Hi all, this is my first post as i have recently just signed up to the site, but have been lingering and viewing some of the content for a couple of weeks! I just want to say hi and thank you for the informatin i have already aquired from you people!!

I also have a problem. But you knew that was coming probably!

I am making a website for my band, and it seems i have bitten off a little more than i can chew. This is my first website with Flash 8. I have created a few other small applications, but nothing major like this one!
I have got to the point now where i am tearing my hair out!
the website so far was going well, it had a fairly smooth introduction where different parts of the page fade into view. The skulls on the left hand side where to be used as buttons, but, no matter what i do, i cannot make them act in the way i require! I have changed my plans several times to cater for these button, but still they do not respond as i want!

Basically as mentioned, they fade into view and then when the user floats over them, they will glow and display some text to show what the skull does when clicked. I have tried disjointed rollovers, and standard rollovers, but i cannot get the button to react. It's probably easier if i post the .fla for people to look over it, as it is quite detailed.

One thing, in the live preview mode everything works as it should, but when i press F12, nothing works, just the fading in part!

Can anyone help a nooby? I am gratefull for any response!

Best Regards

Kris

[CS3] Sorry Not Sure Where To Post
hi

i have created a flash website that gets all its content from XML http://www.illit.co.uk i am trying to use Macromedia Flash Search Engine SDK 1.0 to output its text into a friendly search engine formate but im not gettin anywhere

is it possaible to do this with such program i am new to using the Macromedia Flash Search Engine SDK 1.0. if not is there anything i can do to get this to be search engine friendly


thanks everyone

Lee

Using GET And POST
hey everyone I am building a game in flash where the score is recorded at the end. I am trying to get a user name and ID from a web page and at the end of the game the final score would be sent back with the user name and ID to be recorded.

If anyone has any ideas on how I would go about doing this it would greatly
appreicated.



-Thanks!!

Stone

Another XML Post
Another XML problem i know, but I need to know how to do this!

I have a file that pulls in data via XML. I am now building a XML editor in flash (uses sendandload to save the XML). I know how to edit existing fields in the XML, but how would I go about adding a new field and deleting fields in the XML?
My codes below:


Code:
var imagelist:XML = new XML();
imagelist.ignoreWhite = true;

imagelist.onLoad = function() {
var images:Array = this.firstChild.childNodes;
for(i=0;i<images.length;i++) {
videolist.addItem({label:images[i].attributes.short_desc, label:images[i].attributes.main_desc, data:images[i].attributes.image});
}
short_desc_txt.text = videolist.getItemAt(0).label;
thumbnail_mc.loadMovie(videolist.getItemAt(0).data);
desc_txt.text = videolist.getItemAt(0).label;
url_txt.text = videolist.getItemAt(0).data;
videolist.selectedItem = 0;
}
var imglist:Object = new Object();
imglist.change = function() {
input_txt.text = videolist.getItemAt(videolist.selectedIndex).label;
}
videolist.addEventListener("change", imglist);

//imagelist.load("galleryblog.xml");

plus_btn.onRelease = function() {
short_desc_txt.text = "";
thumbnail_mc.unloadMovie();
desc_txt.text = "";
url_txt.text = "";
note.text = "Please upload file, fill in short description, file URL and main description then click save";
}

var xml_file = "galleryblog.xml";
var server_file = "galleryblog.php";
imagelist.load(xml_file + "?uniq=" + new Date().getTime());

save_btn.onRelease = function(){
imagelist.parseXML("<short_desc= new text />");
imagelist.firstChild.childNodes.nodeValue = short_desc.text;
imagelist.xmlDecl = ""; // declaration duplication bug
imagelist.sendAndLoad(server_file, output_xml);
output_txt.text = "Loading...";
}

clearin_btn.onRelease = function(){
input_txt.text = "";
}
clearout_btn.onRelease = function(){
output_txt.text = "";
}

Not Sure Where To Post This But...
I want this player to be able to have people download the music (save it on their computer.) It loads it in Temp directory for some reason. What do I need to tell it to not do that? I tried Wimpy support and that did not help.
Not sure where to post this question, but if anyone can tell me what to do will be helpful.
Thanks.

By clicking on the download link it will load it to a new player in the browser, I want to be able to have my visitors download the pod casting.
Thanks.

http://www.djnrjenz.net/mp3/myWimpy2.html

Using Post
please help,
is there anything wrong with this code? its not talking to the php??


Code:
on (release) {
loadinfo = new LoadVars();
loadinfo.id = id;
loadinfo.send("http://www.mysite.co.uk/vote/vote.php", loadinfo,"POST");
}

GET Vx POST
what is the difference between get and post? and why is post considered more secure?

Get And Post
hi there
anyone can tell me what is the best mode to send and get variables from php
because i need to get some keep them in the flash for a liottle animarion
and them post it to a php file

but i don`t know how to get them and display it in a dynamic text
and then post them

thx for all

Need To Know Where To Post A RFQ
Anyone know where I can post a request for quote on a small project for
someone to bid on or donate to my foundation / web site?

I need a flash counter that counts down from a dynamic time and date to zero
using the values of a coldfusion query. It needs to count down the days,
hours, minutes, and seconds from Now() to the dynamic due date.

Its for a animal rescue web site called LastChancePets.org. I am hoping the
dramatics encourage people to adopt dogs and cats that are about to be
euthanized.

Thanks for any information

wkolcz(at)lastchancepets(dot)org

GET And POST
Hi All,


I have a flash file (flash8), that I need to send variable to another flash
file and don't know that best way of doing it!

Here's the scene....

A html file with a flash file - the flash file reads questions form an xml
file. At the end of the quiz, the user getes a score and can enter their
name. I then want them to click a button which will open a new (_blank) html
page with a 'congratulations' flash file in it.
The score and the users name needs to be passed from the main quiz to the
secondary html/flash file.

So how do I do this? had a minor play with GET and POST, but couldnt get
anything to work!!

HELP!


Cheers,

Tim

2nd Post: What Is The Best Way To Do This?
Dear All,

What is the best way to attach a secondary swf to movie in the main swf and
pass back values to main swf? Is it to use setvariable or another method?

Thanks again.

Alastair MacFarlane

Hi My 1st Post, Please Help :)
hey great forum and great help all appreciated !! thnx.

okey, i would like to know how you have these signatures as flash files, they are 300 by 60 in size i see but they are flash, how do you make it so they appear in flash ?? thnx.

My First Post
Hi there,
I made one animated button (.fla) that works as i wanted. Now i need to insert another button in that .fla but a little smaller with a diferent link. I already made another .fla (smaller button), and put it in the top layer of the larger button. The problem i get is that it appears but the animation doesn´t work at all. Is it because the actions of each button are in conflict?

Any suggestions?
Thank´s
Ricardo

Can Someone Please Post An Fla With The
actionscript for a seamlessly looping background.

Thanks

Copyright © 2005-08 www.BigResource.com, All rights reserved