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




Questions About Passing Variables From A Checkbox To A PHP File



I'm having a major problem. I've got a Flash form that when submitted is supposed to pass variables over to a .php file so people can enter a contest. Now, anything sent over from an input text field goes through just fine. However, I also have a checkbox (really a movieclip with two frames...one for a on checkbox and on for an off checkbox.) with an instance name of 'optin' as this is for people to join an email list. When clicked on it should trigger a YES and when clicked off it should trigger a NO to the PHP script. However, it doesn't do anything. I think the problem lies in the PHP script but I'm just not sure. Here's an example of the part of the PHP script I'm talking about:

mysql_query("insert into entries (firstname,lastname,optin) values ('$first_name','$last_name','$optin',)") or die(mysql_error());

and maybe that's the problem there. On the other hand, here's the script for the two frames of the MC called optin.:

On the keyframe marked off this script is placed on the checkbox button:

on (release) {
gotoAndStop("on");
_root.left_mc.empty.optin=NO;
}

On the keyframe marked on this script is placed on the checkbox button:

on (release) {
gotoAndStop("off");
_root.left_mc.empty.optin=YES;
}

I should mention that this .swf is nested inside an empty movie clip called 'empty' that is nested in another MC called left_mc on the _root timeline.

Finallly, this script is placed on the Submit button:

on (release) {
gotoAndStop ("finish");
loadVariablesNum ("http://www.yoursite.com/entry.php", 0, "POST");
}
}

So what am I doing wrong here or can this even be done?



FlashKit > Flash Help > Flash ActionScript
Posted on: 03-26-2003, 02:40 AM


View Complete Forum Thread with Replies

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

Passing Variables To Txt File?
ok, what I am trying to do is duplicate the poll.swf by Cooper Faust found in the movie section of flashkit. It is reading my txt file with noproblem, the question comes up gives the user two choices to choose from. problem is I can not get it to write back to the txt file and save the answers. I am doing this in perl because my @#$# host wants to screw me with there php package.Also I did check with my host and this is the right path to use except I change the xxx to my user number. here is the code I am useing:

on (release) {
if (answer eq "") {
verify = "Please make a decision.";
} else {
verify = "Processing information...";
if (answer eq "one") {
poll_one = Number(poll_one)+1;
poll_two = Number(poll_two)+0;
} else {
poll_one = Number(poll_one)+0;
poll_two = Number(poll_two)+1;
}
poll_total = Number(poll_total)+1;
data = "";
data = data add text add "&poll_answer_one=" add poll_answer_one add "&poll_answer_two=" add poll_answer_two add "&poll_one=" add poll_one add "&poll_two=" add poll_two add "&poll_total=" add poll_total;
loadVariables ("/home/cust/usrxxx/cgi-bin/update.pl", "_level0", "GET");
text = "";
verify = "";
data = "";
tellTarget ("answer") {
gotoAndStop ("blank");
}
play ();
}
}

yes I have tried doing this with post but everything I have read when going straight from a swf instead of a html you have to use get. I will post the perl script here:


#!/usr/bin/perl

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs)
{
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}

#the following should be set to whatever directory
#you put the poll.txt in on your server

$file = "/home/cust/usrxxx/cgi-bin/poll.txt/" . "$FORM{item}";

open(WRITE, ">$file");
print WRITE "text=" . $FORM{data};
close(WRITE);

were am I going wrong this has me baffled

Passing Variables To Php File
Hello Flashers

I’ve got a small problem that I’d like to clear up if possible. I’ve created a form using radio buttons, check boxes and text fields, with a php file. The problem I’m encountering is that if someone leaves a fiel
d blank, I get this object Object] instead. Is there a way of stopping this, or does it go with the territory?

Thanks

yeffer

Passing URL Variables To ASC File
Hi. I have two files a SWF file that calls an ASC file. The SWF file is just the movie clip that plays a mp3 file that the ASC file has located. If I hardcode the mp3 filename into the ASC file it works fine. But I am trying to query a coldfusion database to get the mp3 file name from a URL.Variable number. ie I click on a link on my site and that URL passes a unique number to the asc file and the ASC file will query the database and return the file so I can be played in the swf.

I am not new to ColdFusion (about five years of coding in the language) but I am now trying to experiment with ActionScript to add some new content to my site. So talk to me like I am 5th grader. This is my very first attempt at actionscript and I have muddled my way through some of the actionscript. Can some tell me what’s wrong with it? Would it be easier to pass the variable to the swf file and let the swf file tell the asc file what to load up?


Code:
var musicPlays:Boolean = false;
var loopTune:Sound = new Sound();
function basicQuery()
{
result = CF.query("soundQuery", "music_data", "SELECT * from tblMusic WHERE musicID = URL.MusicID");
return result;
}

loopTune.onLoad = function(success:Boolean) {
if (success) {
loopTune.start(0, 999);
musicPlays = true;
_root.musicPlayer.gotoAndStop("playing");
}
};
loopTune.loadSound("soundQuery.musicFile.mp3", false);
musicPlayer.playStop.onPress = function ():Void {
if (musicPlays) {
this._parent.gotoAndStop("stopped");
loopTune.stop();
musicPlays = false;
} else {
this._parent.gotoAndStop("playing");
loopTune.start(0, 999);
musicPlays = true;
}
};

Passing Variables To My SWF File
I have an actionscript control layer with a frame 1 that reads in an XML file like this ...


Code:
_root.i = 1;
_root.f = 1;
_root.ff = 1;
_root.l = 1;
_root.myGal = 1;
_quality = "BEST";

stop();

if (configFile == undefined) {
configFile = "config.xml";
}

file_xml = new XML();

// declare your xml object.
file_xml.ignoreWhite = true;
I'm trying to call that swf file remote, providing embed script that looks something like this ...


Code:
<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='766' height='750' id='main_v9' align='middle'>

<param name='allowScriptAccess' value='sameDomain' />
<param name='allowFullScreen' value='false' />
<param name='configFile' value='http://mydomain.com/config.xml' />
<param name='movie' value='main_v9.swf' />
<param name='quality' value='high' />
<param name='bgcolor' value='#410101' />

<embed src='http://mydomain.com/main_v9.swf' quality='high' bgcolor='#410101' width='766' height='750' name='main_v9' align='middle' allowScriptAccess='sameDomain' allowFullScreen='false' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />

</object>
I've set a crossdomain.xml file on root, but that doesn't seem to help. I've also run this locally, but that won't work either.

I'm wondering, is this the correct method to pass a configFile variable to the swf file ?

Passing Variables To Another Swf File
please, how do you pass variables from one swf movie loaded in level 0 to another to another swf file that loads on level 10?

gracias

Passing Variables To Another Swf File
please, how do you pass variables from one swf movie loaded in level 0 to another to another swf file that loads on level 10?

gracias

Passing Variables From Projector File To Web.
I have a flash game that I will be distributing on a CD in a projector file format. At the end of the game, I want the player to be able to post variables "$Name" and "$Score" from the projector to a website. So I need the button to first open a browser window, and then somehow pass and post the variables from projector to http://www.domain.com/scores.swf. Is this possible? Thanks,

Passing Variables To A Loaded Swf File - Help Please
Hi everyone. Can't seem to pass a variable from a button on my level0 main swf file to a movie that was loaded into level1.

Here is some of the code:

Randomly selecting 1 of 5 external swf files and play it on level1

ranNum = Math.floor(Math.random()*5)+1;
loadMovieNum ("clip"+ranNum+".swf", 1);

Button on the main movie level0 contains a script that makes the random move play at a label called "fadeout":

on (release) {
_level1.gotoAndPlay('fadeout');
clipNum = "1";
}

clipNum is defined here for the first time.

In the level1 movie all is good. It begins to play at the "fadeout" label and then when it reaches this frame script it can not retrieve the clipNum variable from the main movie.

loadMovieNum ("clip"+clipNum+".swf", 1);

Not sure if I'm missing something in the syntax. Any help would be appreciated.

Thanks.

Passing Variables To Actionscript File
Hi there

I have created an external actionscript file, which is called from Flash with the command
#include "my_script.as"

The question is: how can I pass variables from Flash to the external actionscript file?

Thanks
Hagop

Passing Variables From A Php File Into An Array
hey guys,

i have successfully created a php file that reads and echoes the contents of a directory in the string

var1=value2&var2-value2...

how would i got about passing these values into an array?

Flash Passing Variables To A Swf File HELP
I apologize if this topic has already been discussed in the forums. I don't have time to read all of them.

I'm new to this forum and this is my problem.

I have a Main.fla file that will load a swf file. How can I pass a variable to the swf file?

Before there was no Main.fla file, only the swf file and it's being passed in a variable from the asp page.


Code:
var Page:String = root.loaderInfo.parameters.Page;
this is the code i used in getting the variables being passed by the page.

but now im including a Main.fla file so the asp page is not the container of my swf file anymore.

help.

Passing Variables In From The Flash File
I am trying to pass a variable into my flash from my html code. In my html flash code I have a variable "id" with a value:hotels.


HTML Code:
hotel_carousel.swf?id=hotels

In my flash movie I want to use the value "hotels" in my xml.load() funtion. But I am having some trouble and I think it has to do with strings. But I am not sure. Can someone help?


ActionScript Code:
//id = "hotels"trace("id = "+id);mydataText.text = id;//...xml code herexml.load(id+".xml");//xml.load("hotels.xml");  

Passing Variables From A Txt File To Flash
Hi
I am currently struggling with this problem, if anyone can help
I am loading a txt file to a dynamic txt box in my flash file, all is ok at this point. from the txt file loaded i then need to control the time line, eg: if i create a html link in the text file and click it in flash, is there any way to pass a variable eg x="2"?

Cheers in advance

Passing Variables To External Actionscript File
Hi there

I have created an external actionscript file, which is called from Flash with the command
#include "my_script.as"

The question is: how can I pass variables from Flash to the actionscript file?

Thanks
Hagop

PASSING VARIABLES TO URL AND BACK-LINKING TO FILE
Hi,

After searching for about three hours on google and not finding anything that really fits my need, i'm making a post.

I have recently made a video player using XML. Now what I what to do is being able to display links of a certain movie on the URL and provide that link variable content through xml.

Example:
when smb clicks on a thumbnail of movie_1.flv the URL will become:

http://www.mydomain.com/movie_1 where movie_1 is provided through xml

and also, if someone writes in his browser http://www.mydomain.com/movie_1 , the movie_1 will load up and start playing.

I guess it might involve the use of PHP but I can't figure out how. If someone can explain me the logic of how this could work it would be great.

thanks

Passing Variables, How Do I Set Up The Actual Flash File?
I'm trying to make a page that gets a username by one way or another (cookies, forms etc) but before I can get that far, I need to know what to put in the actual flash file so that the passed variable knows to go there.

The most basic example is say I have a form with a username, say 'Bob' and password, and I when Bob hits enter, their username is passed to a simple 300 x 300 flash movie that says 'HELLO Bob.'

I've found a lot of advice on how to pass the variable, but before I can go there, I need to know what actions or what kind of thing I need to put in the actual flash file...dynamic text? an object of some kind? etc? etc?

Passing Variables Into Flash, Wont Cache Swf File?
Ok here is my problem/query.

Recently I have been using the "filename.swf?title=AboutUS" terminalogy to display various pages / titles using dynamic text fields (great for database driven sites)

although, I have been testing on a modem, and it appears that files arent actually being treated as the same file, but indeed different file.

For example, flash1.swf?test=hello is treated as different file to flash1.swf?test=goodbye. (I assume)

Is there an easy way to over come this problem?

Many thanks for your help.

Passing Text File Variables To A Movie With Effects?
Hope I'm asking this correctly. Anyway, I know how to pass variables from a text file to a movie, but how could you also have an effect applied to the text in the movie. The text would change as the client updates the text file. I'm sure it can be done and I'm sure someone here knows how...

Thanks.

Passing Checkbox Value
Hi,

I'm reposting this because I received no replies to the first one. I'm using three checkbox components and am trying to pass their values to a php mailer script. This is what I have on a button..

$web = web.getValue();
$consulting = consulting.getValue();
$traditional = traditional.getValue();
loadVariablesNum ("mail.php", 0, "POST");
EmailStatus = "Sending...";

How can I extract the values of the checkboxes and send them along? All of the other info in the form goes through.

Thanks.

Passing Info From Checkbox To Asp?
I wonder if someone could explain to me how on earth you set about giving a checkbox in a form a varibale.

I'm passing the form to a CDONTS ASP page, and I have three checkboxes, which I need to appear in the retuened email as either blank or 'checked'.

(I have read the tuts here btw - but cannot get them to return a value)

My chk box is called 'chk1'

So my AS on my submit button looks like this:
on (release) {
chk1 = chk1.getSelectedItem().label;
getURL("http://www.holmes.7host.com/promise/mypage.asp", "", "POST");

}

My corresponding ASP page looks like this:

<% @language="VBSCRIPT" %>
<%

Dim myMail, myBody

myBody = "Name: "& request.form("name") & vbcrlf
myBody = myBody & "Email: "& request.form("email") & vbcrlf
myBody = myBody & "Position: "& request.form("position") & vbcrlf
myBody = myBody & "Company: "& request.form("company") & vbcrlf
myBody = myBody & "Address: "& request.form("address") & vbcrlf
myBody = myBody & "Postcode: "& request.form("postcode") & vbcrlf
myBody = myBody & "Telephone: "& request.form("telephone") & vbcrlf
myBody = myBody & "Open Courses: "& request.form("chk1") & vbcrlf
myBody = myBody & "In house Courses: "& request.form("chk2") & vbcrlf
myBody = myBody & "Organisational Development: "& request.form("chk3") & vbcrlf
myBody = myBody & "Message: "& vbcrlf & request.form("message")

Set myMail = CreateObject("CDONTS.NewMail")

myMail.BodyFormat=1
myMail.MailFormat=1
myMail.From=request.form("email")
myMail.To="holmes@dircon.co.uk"
myMail.Subject="Response from Promise Website"
myMail.Body=myBody
myMail.Send

set myMail=nothing

%>


Help!!

Passing Info From Checkbox To Asp?
I wonder if someone could explain to me how on earth you set about giving a checkbox in a form a varibale.

I'm passing the form to a CDONTS ASP page, and I have three checkboxes, which I need to appear in the retuened email as either blank or 'checked'.

(I have read the tuts here btw - but cannot get them to return a value)

My chk box is called 'chk1'

So my AS on my submit button looks like this:
on (release) {
chk1 = chk1.getSelectedItem().label;
getURL("http://www.holmes.7host.com/promise/mypage.asp", "", "POST");

}

My corresponding ASP page looks like this:

<% @language="VBSCRIPT" %>
<%

Dim myMail, myBody

myBody = "Name: "& request.form("name") & vbcrlf
myBody = myBody & "Email: "& request.form("email") & vbcrlf
myBody = myBody & "Position: "& request.form("position") & vbcrlf
myBody = myBody & "Company: "& request.form("company") & vbcrlf
myBody = myBody & "Address: "& request.form("address") & vbcrlf
myBody = myBody & "Postcode: "& request.form("postcode") & vbcrlf
myBody = myBody & "Telephone: "& request.form("telephone") & vbcrlf
myBody = myBody & "Open Courses: "& request.form("chk1") & vbcrlf
myBody = myBody & "In house Courses: "& request.form("chk2") & vbcrlf
myBody = myBody & "Organisational Development: "& request.form("chk3") & vbcrlf
myBody = myBody & "Message: "& vbcrlf & request.form("message")

Set myMail = CreateObject("CDONTS.NewMail")

myMail.BodyFormat=1
myMail.MailFormat=1
myMail.From=request.form("email")
myMail.To="holmes@dircon.co.uk"
myMail.Subject="Response from Promise Website"
myMail.Body=myBody
myMail.Send

set myMail=nothing

%>


Help!!

Passing Checkbox Values In Forms
Hi All: Sorry if this is newbie, but I'm having trouble getting the Checkbox to work in a form. I don't understand whether or not the checkbox "_name" attribute is passed with a Boolean variable or whether I have to assign its value to a new variable.

If I want to use loadVariablesNum on an "onrelease" event, and I have a checkbox (let's say I've checked it) called "myCheckbox", will a variable called "myCheckbox" automagically be passed to the processing page with a Boolean value of "true" assigned to it?

Or do I have to "getState" on the checkbox and, if true, create a variable and pass it to the page using loadVariablesNum?

TIA, Andrew

Passing Checkbox Variable - Flash 8
Hi,

I'm hoping someone can help me with this. I've scoured the forums and can't seem to find exactly what I need. I have a 'request quote' form, some of the fields are checkboxes.
I know that I can no longer use the getValue();. But i'm having trouble understanding how to pass the variable using the listener. The examples i'm finding seem to be more for triggering events when the checkbox is selected. I just need to send my variables to an asp page. My combobox & text fields work great, my checkboxes come back undefined.

Thanks for any help with this.



Quote:




on (release) {
sitedesign = sitedesign_ch.selected;
siteredesign = siteredesign_ch.selected;
ecommerce = ecommerce_ch.selected;
contentmgt = contentmgt_ch.selected;
programming = programming_ch.selected;
seo = seo_ch.selected;
hosting = hosting_ch.selected;
flashdesign = flash_ch.selected;
logodesign = logo_ch.selected;
printwork = print_ch.selected;
heardabout = hearabout_cb.selectedItem.label;
loadVariablesNum("_sendQuoteEmail.asp", 0, "POST");
}

Passing Checkbox Variable - Flash 8
Hi,

I'm hoping someone can help me with this. I've scoured the forums and can't seem to find exactly what I need. I have a 'request quote' form, some of the fields are checkboxes.
I know that I can no longer use the getValue();. But i'm having trouble understanding how to pass the variable using the listener. The examples i'm finding seem to be more for triggering events when the checkbox is selected. I just need to send my variables to an asp page. My combobox & text fields work great, my checkboxes come back undefined.

Thanks for any help with this.


Quote:




on (release) {
sitedesign = sitedesign_ch.selected;
siteredesign = siteredesign_ch.selected;
ecommerce = ecommerce_ch.selected;
contentmgt = contentmgt_ch.selected;
programming = programming_ch.selected;
seo = seo_ch.selected;
hosting = hosting_ch.selected;
flashdesign = flash_ch.selected;
logodesign = logo_ch.selected;
printwork = print_ch.selected;
heardabout = hearabout_cb.selectedItem.label;
loadVariablesNum("_sendQuoteEmail.asp", 0, "POST");
}

Passing Value From Checkbox Component To LoadVars Object
Hi, I've done a search but can't find the answer to this.

I want to pass the value of a checkbox in a survey to a loadVars object to be sent to a PHP form.

I have a checkbox on the stage with the instance name button5a. I've read that I can't use getValue for checkboxes, and that I have to use a listener object. So I have:


Code:
submit_btn.onRelease = function(){
var questionVar:LoadVars = new LoadVars();
questionVar.question5a = "";

var checkboxListener = new Object();
checkboxListener.click = function (evt){
questionVar.question5a = "Interviews";
}
button5a.addEventListener("click", checkboxListener);

questionVar.sendAndLoad("http://www.mysite/insert.php", questionVar, "POST");
questionVar.onLoad = function(){
gotoAndPlay(2);
}
}
When the checkbox is selected I want to give the loadVars object the information "Interviews". But it just returns a blank value.

I've cobbled this code together from different tutorials and I'm guessing at it really!
Any help on what I should be doing appreciated.

FlaMX - Passing Checkbox & Listbox Info Through Flash PHP Form
I have this email form set up with Flash & PHP. I’m having trouble passing along the Flash “Checkbox” and “List-Box” info to email.
More specifically the "Country" Listbox & "Retired?" Chexboxes.
All the other fields work perfectly.

Any Idea how to pass the info along as well? It feels like I’ve tried a ton of different combinations of code, and nothing works… I’m sure it’s a simple fix.

Thanks

Here is the PHP and I've attached the .Fla:

[php]
<?
$ToEmail = "me@asdf.com";
##$ToName = "Me";
$ToSubject = "Example Mail from PHP & Flash Test";
$EmailBody = "Sent By: $FirstName

Senders Email: $Email

Senders Phone: $Phone

Senders Fax: $Fax

Senders Company: $Company


Message Sent:
$ToComments


Additional Information

Age: $Age

City: $City;
$EmailFooter="
If you feel that you recieved this e-mail by accident please contact us at www.asdf.com";
$Message = $EmailBody.$EmailFooter;
mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$FirstName." <".$Email.">");
Print "_root.Mail.EmailStatus=Complete - Your mail has been sent";
?>

Checkbox Variables - Possible?
Ok...this is related to a previous question that I had...but that wasn't getting me anywhere - so let's change the question.

Is there anyway to make a check box component a variable? What I am trying to do is have check boxes be either true or false depending on what a user has spected in a previus frame of the movie - the catch is that the check boxes that I want to change will never be viewed - only printed (ie I have a printable page that will be in the dimensions of a standard page which is different from the size of my stage...this is why the user will never see the printable page on the screen). I figured that if I can have all the check boxs on the printable page as variables, it will not matter that I never get to that frame to run the function that will update the boxes...boy do I hope this makes sense. Anyways, if you can answer this, OR even if you can offer me a compleatly different solution to my problem...please please please help!! Also, keep in mind that I'm fairly new to Flash...so please go easy on me with the explaination.

Thanks in advance

Flash Mx 6 Checkbox Variables
SITUATION:

I click a checkbox in frame 1, setting the checkbox to true, then goto frame 2.

Once in frame 2, I click a button that brings me back to frame 1. But the check box is not checked, like the way I left in frame 1.

QUESTION:

How can I check a checkbox in a frame, then goto another frame, then come back and keep my checkbox checked?


Thank you, and any "input" or syntax would be much appreciated.

Checkbox Component Variables
so i have been searching and can't really find anything good on how to send variables w/ the checkbox component. I have a contact form, which emails the variables via php using:

loadVariablesNum(mailform, 0, "POST");


works great, no problem. But i want to include a checkbox sections so users can check products of interest. How can i send that (checkbox) information to the php for emailing??

Checkbox's Used As Numeric Variables?
Hi All,
I am relativly new to flash and even newer to action scripting. I need a basic walk through of how to use checkbox's as values. Basically I have a form with 48 boxes. When these are checked in no particular order. I need them to tell the greenstack_mc to appear in a certain size(in relationship to the coresponding number of checkboxes that were checked by user) when the next frame is loaded.
I think I have the theory of how this should work in my head , but I just can't seem to peice the variables together my document.

here is a link:
http://www.carcom.com/newsite/quiz.html

of what state my document is in currently. The greenstacks need to adjust to represent the number of checkboxes the user clicked which apply directly to the greenbars.

i.e. Say question's 1, 12, 18, 24, 42, 47 were checked and they all applied to the Realist's greenstack. The Realist's greenstack should appear in full at 100% of it's intended hight.

Sorry for the confusion.
Any help would be a Godsend!

Checkbox Variables In An Email Form
I have a info form set up in flash on my site that connects to a php file on my server in the usual way - then firing off an email to me. I have text boxes working fine into the email.
My problem is that I have a checkbox on the form and although it is sending a value to the email it is not diferentiating between 'True' and 'False'
On my submit button in flash I have the following

on (release) {if (checkboxname.getvalue()==true) {
info = "yes";
} else {
info = "no";
}

...followed by all the other action script that seems to work

and on the php file I am calling the "info" variable into the email body like so...



Sender Wants More Info: $info
";

as I say at the moment it doesn't make any difference if the box is checked or not, I always get a "no" get variable in the email.

If i switch it to...

info = "no";
} else {
info = "yes";
}

I always get a "yes" variable so it is seems to be taking the last definition of the variable from the code and passing that on.

Can anybody help please
Thanks a lot
M

Seting Variables For Checkbox And RadioButton?
Hi,

I am new in Action Script and I am making a form with multiple choices.

I have all that I need PHP file Actionscript for buttons, BUT I don´t know how to STABLISH the VARIABLES for a Checkbox and a RadioButton component, in order to send them later to a PHP file.

I will very much appreciate, if somebody can help me.

THANKS a lot!

Seting Variables For Checkbox And RadioButton?
Hi,

I am new in Action Script and I am making a form with multiple choices.

I have all that I need PHP file Actionscript for buttons, BUT I don´t know how to STABLISH the VARIABLES for a Checkbox and a RadioButton component, in order to send them later to a PHP file.

I will very much appreciate, if somebody can help me.

THANKS a lot!

Variables For Flash -> Php For Checkbox Mail Form
Hey -

I downloaded a source file for a form with checkboxes - sending some variables from flash -> PHP -> mail
Seems it is for an old version of Flash (5)
The variables are referred to on a frame simply as /:myvariable = "";

Flash 8 doesn't like this. Hates it. says it's a syntax.
I never used Flash 5 much as I am relatively new.

What is the flash 8/ as2 equivalent?

I spent a day looking for an answer & have done my head in.

Help me please?

LoadMovie And Passing Variable Questions...HELP?
I'm a designer w/ limited actionscript capabilities so I have a few questions about that.

From a menu, I'd like to load 3 different options (About, Procuts, Contact). Each option is to be loading different movies (about.swf, products.swf, contact.swf).

I would like for each new movie to have the name of the referring page to wipe off. In order to do this, I think I need to carry over variables from the prior swf.

1. How do I load movies into multiple layers? I placed this on the menu button:

on(release){
loadMovie ("about.swf",_level1);
}

and it just flickers the new movie. Why?

2. How do I carry over variables from _level0 to a movie in _level1? OR, can I load a new movie into _level0 and retain the variables from the movie that was there before?

Please help.

2 Questions: Scaling LoadMovie Problem / Passing Varialbles To PHP
Hi guys, i've got two questions:

1:

Im using this to load external images, and it works great, until you try and run it again to load another image, then it just resizes the image all wrong:


Code:
loadMovie(_root.dirpath + "/" +ri+".jpg", _root.imageholder);
intID = setInterval(checkpicture, 500);
function checkpicture() {
if (_root.imageholder.getBytesLoaded() == _root.imageholder.getBytesTotal()) {
xs = 193 / _root.imageholder._width * 100;
ys = 174 / _root.imageholder._height * 100;
_root.imageholder._xscale = _root.imageholder._yscale = Math.min(xs, ys);
}

}



I think its because, when the next image is loaded, its already resized, then the function seems to make it massive, then the next time its run,the image is even smaller then the first time.


Second question...

How can you send variables to php, without having to have an external page load up. The way im doing it now, everytime i "GetURL" the page im sending the variables to loads, it would be better if there was a way to do all this in the background.

Thanks very much to anyone who can help with either question.

Regards.

How Can I Retrive Checkbox Values From A Text File..?
Hello,

basically my titles says it
i have values on my form that is in check boxes and radio buttons
my check box is

checkboxu
andmy
radio button is

rG1

how can i retrieve this info back into flash?

i have done loadvariables,

but only the input text shows up

Help: Passing Variables (180 Variables) To Function
hi

if i have call function like this

Math.findMax(app1, app2, app3, app4, app5, app6, app7, app8, app9, app10, app11);

but the values i have to app180

i don't want to write all this

Math.findMax(app1, ... , app180); //!!??

how i can to called the function from app1 to app180

Math.findMax(FROMapp1, ... , TOapp180);

thanx

[F8] Checkbox & Masks - How Do I Embed The Checkbox Font?
i'm trying to put checkboxes under a mask, but can't seem to succesfully embed the font for the checkboxes so that they labels actually appear...

can someone please give me directions as to how/where to set the checkbox font to be embedded? the default font is fine...

TIA

Questions On Variables
Hi,
I'd like to know how to save a MC's position and then set that position to another MC. Also, Do the variables I set in a scene still exist in the next scene?
And is it easy to use variables from a text file and delete them or change them with AS but that even if I close the FlashPlayer the variables are keptin the text file?
Thanks in advance

Questions About Variables
1. what is different between:
Code:
Set Variable: "bob" = 5
and
Code:
bob = 5
i have read a few things and not much describing how thay are different.
2. Var is like a temporary Variable right? so it deletes itself once it's used right?

[F9] A Questions On Variables
Hi all ,
I have a question on variables. Basically I want to change a variables value within my flash movie several times and I want to place a piece of code somewhere within the movie tells the movie the way it should react to the variables value. So - whenever the variables value changes, the movie should react accordingly.

E.G
I put similar to the following at different points in the movie:

Code:
A=1;


and i put the following code in a keyframe which is the first frame of the movie.


Code:
if(A==1){
this.DynTxt.text="1";
}
if(A==2){
this.DynTxt.text="2";
}


But this doesnt seem to work!

I have also attached an fla file with the code in question.

Please help me fix this or show me an alternative way of accomplishing the same task,

Any help is much appreciated. Thanks

Q

Passing Variables To Swf
hi !

go here :

http://www.guistuff.com/tools/flashdrop/flashmenu.swf




then go here :

http://www.guistuff.com/tools/flashd...5&makenavurl4=



now can any body tell me what i have to do to the fla in order to send varibale to swf and make menu feilds dyanmically- also i want the variable comming from a db .

any help ?

suhailkaleem

Passing Variables
Owkee, me again

Hmm I have created a preloader with a movie that loops inside it. In that movie i calculate the percentage loaded and bytes loaded. These calculated values are stored in a variable called 'var4'.
Now is it possible to pass that variable 'var4' to the main movie ? And how do I fix this ?

Passing Variables
Is it possible to pass a variable from a buttonpush that is in an MC that needs to control the _root movie? In other words: rootmovie/MC/button -->variable assigned to control main (root) movie. For some reason I cannot get flash to recognize my requests....here is the code that I am using in the button:

on (release) {
var x = 5;
_root.gotoAndPlay ("monnonego");
}


Here is the code that asks the question, assigned to a keyframe (later down the root movie):

if (x == 3) {
gotoAndPlay ("profile", 34);
} else {
if (x == 4) {
gotoAndPlay ("portfolio", 34);
} else {
if (x == 5) {
gotoAndPlay ("contact", 34);
}
}
}

Any ideas?? Thanks in advanced!!

- Sigma

Passing Variables
I have some actionscript that doesn't work. I don't see what's wrong. Can anybody help me? It's about the towers of Hanoi. Here is my script:


var intaantal = AantalSchijven;
var intstart = 1;
var inteinde = 3;

function hanoi (n,intstartstaaf,inteindstaaf) {
if (n == 1) {
van = intstartstaaf;
naar = inteindstaaf;
trace(van);
trace(naar);
} else {
inttussenstaaf = ((6 - intstartstaaf) - inteindstaaf);
hanoi(n-1,intstartstaaf,inttussenstaaf);
van = intstartstaaf;
naar = inteindstaaf;
trace(van);
trace(naar);
//trace(inttussenstaaf);
hanoi(n-1,inttussenstaaf,inteindstaaf);
}
}
hanoi(intaantal,intstart,inteinde);
stop ();

I made a program in VB in the same way and the program works. In the program I use byval for the variable n. Maybe that's the reason why it doesn't work but what can I do?

Greetings,
Geerty.

Passing Variables From PHP (or Whatever)
it's fun and easy!

(found my answer, deleted query)
[Edited by Cakkafracle on 08-15-2001 at 03:58 AM]

Passing Variables Between Swf's
Hi there,

I've got 2 swf's on one html page, I need to pass a variable from one swf to the other, is it possible ??

thanx

PASSING VARIABLES TO CGI
I know this may have been answered before, but I cant seem to find it.

I need to know if anyone knows how to get Flash to pass variable info WITHOUT shifting the characters to their ASCII code... (i.e. a comma becomes %2C)

I have a cgi script (free, of course) that is looking for this:

data_order = "news,newscontent,tips"

whereas when i submit it from a flash form, it becomes this:

data%5Forder=news%2Cnewscontent%2Ctips

I'm sure someone out there has gotten this also.

Thanks in advance for any help or pointing me in the right direction.


KEEP FLASHING!

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