Posting Variables From The Right Mc?
I have a button nested nice and deep, and some input boxes nest shallow.....
for some reason the code code: _root.inputcontent.loadVariables("form.php","_root .inputcontent","POST");
does not load the variable to the form....cant for the life of me figure out why?
FlashKit > Flash Help > Flash ActionScript
Posted on: 07-01-2004, 02:32 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Posting Variables?
Hi,
I have a MC with two input text fields inside. The user enters name and adress and then submits them to the server with loadvariables using get. the problem is that the output window detects the variables ,but flash does not post them to the server. what am I doing wrong
help!
Posting Variables To A CGI
I have a form set up in Flash5. There are several fields which are "input" text boxes. The variable name of the text fields match the names the CGI is looking for. There is a submit Btn with a loadVariableNum action that sends the variables to the URL where the CGI resides.
This all works just fine as long as my fields and submitBtn are on the main timline. But I want to nest my "form" inside a movie clip so I can scroll it and manipulate it's position in some other ways. As soon as the input fields are nested, I can't seem to get it send the variables. I'm still hitting the CGI successfully. So I know the sumbit/loadVariable action is working. It just can't find the variables to attach.
I've tried a number of things and am stumped. But I'm sure there is an easy answer.
thanks.
kr.
POSTING VARIABLES
i dont get it...this is what i want to do...can this be done? ...i have a text file that i want to change constantly, much like a product database that would change in an ecommerce site (i.e. the inventory would be constantly changing) and i want the number of products or whatever to change dynamically rather than have the client refresh the page...sort of like you see on the home shopping network...as an item is sold the number of products remaining is adjusted dynamically....I DO NOT WANT TO HAVE TO HIT THE REFRESH BUTTON IN OTHER WORDS...i am about to go insane trying to figure this out...any help would be greatly appreciated.
thanks
joe
Posting Variables
Hello,
I just did a tutorial for posting variables to a cgi page but am still unclear about one point so I hope someone out there can help out.
The tutorial said that I use this code:
On (Release)
Load Variables ("http://www.server.com/cgi-bin/myform.cgi", 1, vars=POST)
End On
Does anyone know which variables this sends? Is it just the input fields on the page with variable names... or does it also send all the variables that I set using Set Variable ActionScript?
I need to be able to send variables that I have set through ActionScript. If the code above doesn't do that... does anyone know how to do it?
thank you
Janet
thank you,
Janet
Posting Variables To A Php Db?
hey everyone!
I have a question thats hanging me up...
i have a flash movie that uses a bunch of variables...
I'd like to send specific ones to a php script or database via a submit push button..
i tried using the geturl send using post, but it strings my variables all together url encoded and seems to send component names... and looks for a page by that name...
i.e:
Code:
http://www.visionroot.com/fix.php?FUIComponentClass=%5Btype+Function%5D&FPushButtonClass=%5Btype+Function%5D&FSelectableListClass=%5Btype+Function%5D&FCheckBoxClass=%5Btype+Function%5D&FScrollBarClass=%5Btype+Function%5D&FSelectableItemClass=%5Btype+Function%5D&FScrollSelectListClass=%5Btype+Function%5D&FComboBoxItemClass=%5Btype+Function%5D&FComboBoxClass=%5Btype+Function%5D&onClick=%5Btype+Function%5D&initValues=%5Btype+Function%5D&getResults=%5Btype+Function%5D&name%5Fbox=jasonpratt&email%5Fbox=jason%40pratt%2Ecom&started=true&fade=&name%5Frtn=jasonpratt&email%5Frtn=jason%40pratt%2Ecom&spam%5Frtn=false&food%5Frtn=Pizza&selectedItem=2&spam%5Ftext=You+dont+want+the+spam%2E
(i havent set up the db BTW, my php guy is gonna do that part. just want to get the output to look right first.)
is there a way to specify which form variables get sent to the db, and which ones dont...?
can anyone point me in the right direction?
sorry im pretty new at this!
thanks in advance!
Posting Variables
Please can someone help with this... I'm sure it must be possible(!)
I have one web page (index.htm) containing a flash movie (index.swf) In this movie there is a button that loads a new web page (travelpage.htm) which contains the movie travelshop.swf
That's working fine.
Now what I want is to be able to click a specific button in this second movie (travelshop.swf) that will load the index.htm and go to a specific scene in the original index.swf movie.
Am I correct in thinking this will work by sending variables?
I'm pretty new to this so try not to laugh at what I've attempted...
in the travelshop movie I've assigned the following actions to the button...
on (release) {
_global.page = "car";
getURL("index.htm", "_self", "GET");
}
to assign the value 'car' to the variable 'page' and send this to the index movie.
Then in the first frame of the index movie I have added the action:
if (_global.page="car") {
gotoAndPlay("pre_car", 1);
}
to jump to the scene 'pre_car'
...but it's not working. Have I totally misunderstood this or have I just used the wrong actions?
Thansk very much!
Posting Variables
Please can someone help with this... I'm sure it must be possible(!)
I have one web page (index.htm) containing a flash movie (index.swf) In this movie there is a button that loads a new web page (travelpage.htm) which contains the movie travelshop.swf
That's working fine.
Now what I want is to be able to click a specific button in this second movie (travelshop.swf) that will load the index.htm and go to a specific scene in the original index.swf movie.
Am I correct in thinking this will work by sending variables?
I'm pretty new to this so try not to laugh at what I've attempted...
in the travelshop movie I've assigned the following actions to the button...
on (release) {
_global.page = "car";
getURL("index.htm", "_self", "GET");
}
to assign the value 'car' to the variable 'page' and send this to the index movie.
Then in the first frame of the index movie I have added the action:
if (_global.page="car") {
gotoAndPlay("pre_car", 1);
}
to jump to the scene 'pre_car'
...but it's not working. Have I totally misunderstood this or have I just used the wrong actions?
Thansk very much!
Posting Variables
Hi, i want to send some Vars to an URL but i dont want to people to see these vars as they are sending game score and people are hacking the scores .
I hear that POST will send them invisibally. I tried but this doesnt seem to be the case. Also i only want to send 3 Vars.
Score, Entry, and Cheater (cheaters gonna be my flag for cheaters :P)
Thanks for any help you can give.
Turbs.
Posting Variables To A Db
I would like to get movie interactivity responces dependant upon a users path through a movie space (what they click on). I would like to load a series of movies dependant upon the what the user clicked on in scene one for example.
For example I go into a movie. It teaches me 1+1 = 2 and 2+2=4. Then it asks me what is 1+1, and I answer 2. Then it asks me what is 2+2 and I answer 3. Based on this wrong answer it reloads the movie that teaches me 2+2 again - THIS 2+2 movie is different for the first though!
Any thoughts? Please help!
ODC
Posting Variables
Help!.
I have a simple form that posts some variables.
It works, but when you submit, it opens up the sendmail.asp page.
Is this an asp thing or flash thing.
heres my code for flash:
PHP Code:
function sendForm2 () { var c = new LoadVars(); c.Name = form_name; c.Email = form_email; c.Address = form_address; c.Suburb = form_suburb; c.Postcode = form_postcode; c.Phone = form_phone; c.Fax = form_fax; c.Comments = form_comments; c.send("sendemail.asp",0,"POST"); nextFrame(); } send_btn2.onRelease = function () { if (form_name eq "" or form_email eq "" or form_comments eq "") { statusTxt="Please Fill In all Fields"; stop(); } else { sendForm2 (); } }
Would this be an issue with my sendmail.asp page, or am i sending the vaibales wrong in flash?.
Any help is greatly appreciated.
Thanks.!
Posting Variables
Help!.
I have a simple form that posts some variables.
It works, but when you submit, it opens up the sendmail.asp page.
Is this an asp thing or flash thing.
heres my code for flash:
PHP Code:
function sendForm2 () { var c = new LoadVars(); c.Name = form_name; c.Email = form_email; c.Address = form_address; c.Suburb = form_suburb; c.Postcode = form_postcode; c.Phone = form_phone; c.Fax = form_fax; c.Comments = form_comments; c.send("sendemail.asp",0,"POST"); nextFrame(); } send_btn2.onRelease = function () { if (form_name eq "" or form_email eq "" or form_comments eq "") { statusTxt="Please Fill In all Fields"; stop(); } else { sendForm2 (); } }
Would this be an issue with my sendmail.asp page, or am i sending the vaibales wrong in flash?.
Any help is greatly appreciated.
Thanks.!
Posting Only Certain Variables To Mailmaster.pl ?
Hi there,
I need some help with a flash e-mail form.
I´m trying to post only the textbox variables: subject,realname,email,
redirect,recipient and text to a mailmaster.pl cgi,
provided by my webspaceprovider.
I´m using: loadVariablesNum ("/cgi-bin/mailmanager.pl", 0, "POST");
Everything works fine, I get the mail, but it also posts
all other variables, that are included in the flashfile and displays them in the body of the mail I get.
That makes the mail look kinda ugly!
Is there a way to only post certain variables and leave the other hundred out of the e-mail body without changing the cgi? ( can´t do that, because it´s hosted in a path I can´t access.)
I´m in desparate need for an answer.
thanks,
Stephan
Posting Variables To ASP Issue
Hi. I'm trying to send some variables from my flash movie to an ASP page, which in turn populates a SQL database. I only want to send, not receive any information back into the flash. I've tried two different ways and successfully received the data in the database:
myloadVars.send("questions.asp", "_blank", "POST");
this worked, as well as:
getURL("questions.asp", "_blank", "POST");
The problem is the _blank. It pops up a blank page of course. I don't want this to happen. I've tried changing both of them to _self, but neither works once I've done that (originally I did not specify a target or method since _self and POST are used by default. that didn't work either). Is there any way I can send the variables without having to leave my flash page or popup another page? Any help is appreciated.
POSTING Multiple Variables To PHP
Hi, im developing a shopping cart, and I need it somewhat integrated with flash..
Im trying to create a button that will send all the needed variable information to the cart.php
this is my code thus far (it aint working)
code:
on(release){
getURL("xcart/cart.php?mode=add&productid=1&ammount=100.00", POST);
}
I need to be sending the variables:
mode=add
productid=1
ammount=100.00
and it needs to be a POST... though I am having no luck at all
Posting Variables From Flash To PHP...
I have a textfield which is located in anothe rmovieclip, and i want the values in that textfield to be posted via PHP... basically the POST command only works when the text field is in the same layer as the button...
How would i go about modifying the code below, so that it posts the values in a textfield from within another movieclip?
ActionScript Code:
btnPdf.onPress = function () {
getURL ("fpdfmysql.php", "_blank", "POST");
}
PHP Code:
$loggeduser = $_POST["name"];
Progress Of Posting Variables?
Hi, I'm hoping someone could help me out with this.
I've created an flash application that will post variables to a PHP page. This PHP page will then take the variables and using GD Libraries, create a JPEG image on my server and save it. I'm writing in AS3 based on the AS2 tutorial I found here.
The variables I'm sending are height and width of the image, and then a very long string containing all the values of the pixel colours, with rows and columns separated by characters. (ie ffffff,dddddd-aaaaaa,cccccc). The example here is only a 2x2 image, so a small 400x300 image is 120,000 pixels x 6 characters = 720,000 characters + all the separators! This method is working quite well, but can take about 20-30 seconds to send on a slow connection.
My explanation is very long but the question is quite simple. I know you can get progress events and bytesTotal and bytesLoaded on incoming URLVariables, but has anyone discovered a way to track the progress of sending out variables?
Any help is much appreciated
Posting Variables To HD (no Server)
i've got a flash movie that's posting (many) variables to a php script which then inserts the values into a db.
Problem is i need to retain these variables (name-value pairs) without the use of a server. so basically i need to run this file as a windows executable off of a cd, and write to a .csv or a .txt or .xls file.
any suggestions?
Posting Variables To SWF Files
I appreciate any advice I can get on this. I have searched high and low and this seems to be the place to ask This aside...here we go...
I have a fully working flash/php/SQL system in place. 1 thing I have seen done with 1 SWF file, is that you could post data to the file itself.
ie; myflash.swf?var1=1&var2=2
You catch where I'm going with this.
What I am doing is trying to post this information in the URL for the SWF file to figure out what its doing, then in the action script I need to do something like:
cxml.url= "mycustom.php?var1=+var1+&var2=+var2+
Just like PHP basically. I don't know how this other script does it as the source is closed off...
But how can I take the variable data posted in the swf URL and turn it into a link in my swf action script which will then perform work for me?
I have tried thinking of this in reverse;
Post the data to the PHP file, then get that data in the swf file, then pass the data back to the php file to do the work, then pass the data back to the swf file for final output...but as you can see, that is just plain dirty.
Any ideas on how I might go about making my swf file receive dynamic post data via URL:
myflash.swf?var1=help%20appreciated&var2=thanks%20 in%20advance
Thanks!
Posting Variables To ASP Issue
Hi. I'm trying to send some variables from my flash movie to an ASP page, which in turn populates a SQL database. I only want to send, not receive any information back into the flash. I've tried two different ways and successfully received the data in the database:
myloadVars.send("questions.asp", "_blank", "POST");
this worked, as well as:
getURL("questions.asp", "_blank", "POST");
The problem is the _blank. It pops up a blank page of course. I don't want this to happen. I've tried changing both of them to _self, but neither works once I've done that. Is there any way I can send the variables without having to leave my flash page or popup another page?Any help is appreciated.
Select Only Specific Variables For Posting
Hi,
I was wondering if it is possible to post only specific variables from the movie?
Everytime I post something, it also posts all the other bulk variables which have been loaded somewhere in the movie.
This can be a problem if you load large data (e.g. from textfiles)or use the standard MX dropdown component for example, which seems to gather many variables also.
later on if you want to post something (using GET method)which has a limit amount of characters (I believe 250)to be send.
cheers
Patrick
Posting Variables Via Flash Button
hi everybody!!!
help with flash 8.
I want to post some variables to a asp file via flash button. How i can do this?
Thanks beforehand!!!
Opening A New Window, Certain Size, POSTing Variables To ASP... HELP
Howdy All and Thanks in advance...
I have 3 variables NAME, THEDATE, SCORE
I have a send_results.asp made by someone else.
I have a button coded:
Code:
on (release) {
getURL ("send_results.asp", "_blank", "POST");
}
This works fine and dandy. My question is, how can I open this .ASP page in a 300x300 window without toolbar, no resize, etc.
I had this code on a previous project that worked but did NOT have to pass variables:
Code:
on (release) {
getURL ("javascript:OpenNewWindow('samples/iso.html','thewin','height=225,width=240,toolbar=no,scrollbars=no,resize=no')");
}
with javascript on my HTML page of:
Code:
<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures); }
</script>
When I tried combining the two codes in different ways and the results were the variables weren't passing, the size would be ignored, the window wouldn't open, and once in a while, the machine just froze.
In the words of Charlie Brown...
ARRRGGghhh....
Any help is much appreciated!
Kirkarama =]
Variables Posting Failing In Flash Player 8 On Mac
Hi,
I have a problem with posting variables using ”loadvars” and ”send” in Flash Player 8 on Mac OS X.
I have granted ”Local Trusted” access to my Flash files and using System.security.sandboxType I get a verification that it's ”localTrusted” indeed. The flash script makes the call and the response browser window is open correctly, but POST-variables don't get to my PHP script. This problem happens both in Flash authoring environment Test Movie mode and in Flash Player. The problem is not in my script, because it works correctly if I choose ”Publish Preview” and test it in browser.
What could be the problem?
Help Posting Form Variables To A Perl Page For Processing
Hello!
I need help sending my form variables! I need to send the information inputed by the user into the input fields along with a number on invisible variable for processing. I have created a number of input fields with instance names and variables names, and placed them on the first frame on a movieclip name form_mc. I have also declared a number of variables on frame 1 which must also be sent (my invisble fields). I have used this script to be executed when the submit button is pressed:
this.form_mc.loadVariables("http://www.blabla.com/pl", "POST");
Will this do the trick i.e send the users input and this ivisble variables? Do I need to somehow inform flash that the user has entered something and the field variables have changed or does flash manage to do this itself? Also, just for future reference, can I opt to send only certain variable of my choice - how?
Cheers folks,
Leanne x
Help For Posting
HOW could I make a flash animation and somebody enter informations in it and after i can see them.
Like scores in games
Plz
chocklehot@mac.com
Posting To Web
I am wondering how to publish my Flash to the web i am also asking where can i get a good free site to make my web page
any response would be appresiated.
Help (Im Posting This Here Also.....)
Hi everyone, I posted this in the newbie section, maybe it was the wrong place? I dont know for sure, but I am trying to figure this out, and have been for days! I want to try and solve it as soon as possible so if anyone has any ideas for me that would be great!
here is the message I posted:
Hi everyone,
I have a input text box called "1" as its value, and a dynamic text box which is called "2" as it's value.
The user input's their name in textbox "1" and then when they press the submit button I would like the dynamic text box "2" to say:
Hello, (name user entered in) how are you doing today?
So, I have been playing with codes but they don't seem to be working. Does anyone have any ideas?
Here is what I came up with, but its obviously not working and isnt right!
For the submit button's actions:
on (press) {
set ( 2, Hello, var="1" how are you doing today? );
}
What am I doing wrong! how do you do this?
Any help would be great!
thanks!
- leland
Posting A Swf
how d y'all usually post a swf for someone to download and take a peak at? freespace? any recomendations?
thanks in advence,
josh
Posting .swf's
(Hey guys....haven't posted in a while)
I have a server hosting a short .swf movie clip...
I have a place to post it...
How do I post it on a website? (they're the size of the old flashkit .swf footers)
To put it better...what is the html coding to post it?
Posting
What is the best way to send information/variables out of Flash, to a file such as a text file or a php file?
THanks!
More About Posting
yes I know about FTP and web space
I am asking about :
1)what do i need to export from flash to upload to the server
2)If i export only the swf file ... will it work?
3)I used once the export html command...and i generated something very small...and i had no library ... what ?
New Posting
I accidently creatd a new posting instead of replying to this one. I created a sample so you can see what I am trying to accomplish. Thanks
Posting ?'s
when posting i should include all the swf's and all the html's for the swfs or just the main html?
also is there a good way of shaving off megabites...i have 50 megs of webspace and cant cet my flash stuff below 60 megs..i know it has a lot to do with photo quality and what not but even publishing on the lowest setting only saves me like 2 mega bites any pro secerets?
xxxxjosh
Posting My Swf
Hi all,
Okay I have this swf file that I would like to put online. I don't want to embed it in a website. I would like the file to open up after clicking on a link on the site. It should open as a seperate screen, preferably with a fixed size. Is there anybody that understand what I'm babling about and can help me.
thanks
2nd Posting... Can Anyone Help?
I have a web photo gallery I recently purchased and I'm wanting to make the "Titles" section a hyperlink. Ex: http://www.goat45.com/title.html. The photo gallery right now pulls the information from an xml file. Here is the code in flash.
stop();
pic.info.thenum = side.thumbs.thumbs0.thenum;
pic.info.thecaption = side.thumbs.thumbs0.thecaption;
pic.info.thetitle = side.thumbs.thumbs0.thetitle;
loadMovie(_root.toadd+"images1/1.jpg", pic.pic2.pic3);
onEnterFrame = function () { side.gotoa = 110;if (side._alpha>99) {side._alpha = 100;delete onEnterFrame;}side.lefta = side.gotoa-side._alpha;side._alpha += side.lefta/5;pic._alpha = side._alpha;};
I'm guessing the "pic.info.thetitle" has something to do with this.
The xml being used is:
<pic1 name="EPHESUS STATUE" caption="Ephesus is the best preserved classical city of the Eastern Mediterranean, and among the best places in the world enabling one to genuinely soak in the atmosphere of Roman times. "/>
<pic2 name="EPHESUS STATUE" caption="Ephesus is the best preserved classical city of the Eastern Mediterranean, and among the best places in the world enabling one to genuinely 'soak in' the atmosphere of Roman times. "/>
So how can I make the name "EPHESUS STATUE" be the hyperlink?
Any help is much appreciated.
Posting To ASP
Hi,
I am tryping to post a var to an asp site. the site can see that i am trying to post but it doesn't post the value that i need. any suggestions. Thank you.
I have posted the code.
on (release)
{
loadMovie(contentTimer, countdown);
nextFrame ();
btn_next._alpha = 50;
btn_next.enabled = false;
var counter = 0;
var pagenumber = 1;
onEnterFrame = function(){
counter++;
pagenumber+1;
if(_root.counter==48){
btn_next.enabled = true;
btn_next._alpha = 100;
lv = new LoadVars();
lv.click = pagenumber.text;
lv.sendAndLoad("http://fl000wits081/elearning2008/Default2.aspx?click=0","", vars=POST);
lv.onLoad = function(){
trace(unescape(this));
// if asp returns - &updated=OK&
trace(lv.updated);
};
}
}}
Posting To PHP
I am need of some help,
I cannot get flash to POST to PHP...
I can get flash to read txt files
my php file is simple
PHP Code:
<?php
$message = $_POST
echo "<p>$message</p>"
?>
Can anyone give me a simple example(I work best with simple most tutorials on this subject are needlessly complex)
POSTING And GETTING
Hi!
I have a question regarding Flash and PHP integration. I'm making a site which uses content management system. I use an external PHP file to load my contents from the database.
I'm able to retrieve the print values from my PHP file to my SWF using loadmovie GET on an MC.
It's a news section. so I have three fields. Date, Headline, Contents
MY problem is:
How do I pass a variable from FLash (POST) to the PHP file before I get (GET) the print values? my php file is reading the variables I made in PHP but I want my variables coming from my SWF..
Thanks in advance for your help!
Posting To Website
OK, I am completely green...
I made a swish file that I want to use as the opening page of my site.
Here is what I have done so far...I saved it/exported it as a swf file. I also tried saving it/exporting it as an html file. Then I renamed it "index" and tried to upload it with my ftp. When I open the page in my browser I get the background only but not the movie or the links.
I am so new at all of this I am sure I have read and reread the tutorials on how to do this correctly but I just must not be understanding them. Could someone please talk me through it??
Thanks
Boo
Posting Flash On The Net
This will be my first time putting a flash file on the internet, to test it out, i just created a yahoo account and got a free geocities page. How would i go about loading my flash file onto this site? Any additional info that you need can be given upon request.
Jason
Posting Vars
hi,
if i post data to a processing script can the flash prog read back the responce or will any script output be sent to the browser aka a normal http post?
i know flash can open xml sockets but i want to post to a static script not a running prog..
thx
Help - 2nd /3 Rd Time Posting
Anyone out
there have any idea how to incorporate interactivity into video footage
through flash?????
if anyone has any ideas on how this would be done can they let me know
thanks
as i have no clue what way to go about it, has anyone seen this done before?
J
Problem When Posting On Web
I posted an exe file on the web, which works fine. My problem is the text files that load into different scenes will not work. I loaded the text files into the root directory. What should I do.
Thank you,
Andy
Posting SWF Onto A Forum.
Hello again,
Im looking at posting a swf file onto a forum for use as an avatar / signature. Does anybody know how to this this?
Any help greatly appreciated.
Thanks.
BM
Posting Stuff
I have made a few short animations with flash but dont understand how to make an interactive interface and I don't understand how to post what I make onto my site.
I Don't Think My Posts Are Posting
I wnt a flash site like this site at http://www.bonus4u.da.ru
My site is at httpeople.txucom.net/kicker
And the first site is using frames. I looked at it. This is my third day with Flash MX since I downlaoded it. Can someone help me get this same effect with the window being clicked calling the second button
|