Professional :: Sending A Variable To A Webpage?

Apr 24, 2010

I am trying to post the score that the player achieves to a database. I have set a web page "highScores.aspx" which gets a query string variable "webScore" and puts it in a database. This works fine as tested in a browser.
 
The problem I have is getting the correct information into the query string variable. I have:
 
form.loadVariables("http://www.rightjustified.co.uk/highScores.aspx", "GET");
 
where the text in question is located inside "form" (which is a movie clip). I've been following this tutorial [URL] and while not really relevant, it's got me further than anything else. The problem with this tutorial is it relies on the user entering text, whereas I am just displaying out the score in some dynamic text. This means that in output I get the following error:
 
[Code]....
 
I should point out, I do not need to read the text to get the value as it is stored in a variable beforehand, I just display it to the player via some dynamic text, but I'm not sure how to use this to my advantage.

View 1 Replies


Similar Posts:


Actionscript 3 :: Opening A Webpage From A Flash Sending POST Vars

Dec 11, 2011

I want to open a web page on the same tab when the user clicks a movieclip. I'm using this method:

var url:String = "http://www.google.com";
var request:URLRequest = new URLRequest(url);
try {

[Code]...

how to open it sending POST vars. Is that possible?

View 2 Replies

ActionScript 2.0 :: Sending Variable Variable To Php?

Oct 20, 2009

I'm want to send a variable to php from flash. So far so good. But I want that variable to be variable, if I'm using that term correctly(?)...

Code:
var1 = "please";
var2 ="work"

[code]........

View 2 Replies

Pass Variable From Flash AS3 To C# Asp.net Webpage?

Mar 4, 2010

In my .fla file i have several buttons. On my hosting webpage i need to know which button was pressed. I was going to use fscommand which works when passing a variable to a regular form, but I cannot use it when passing to a webpage.How do i establish communication between flash and my hosting C#asp.net webpage?

View 1 Replies

ActionScript 3.0 :: Sending A XML Variable To Php?

Nov 15, 2009

making an xml variable, sending it from actionscript to php, and then having php create that file..

View 2 Replies

PHP :: Sending XML To Flash As Variable

Jun 27, 2011

I have a flash file where I can pass xml from file :
script type="text/javascript">
var flashvars = {};
flashvars.xmlSource = "XML.xml";
...
/script>

Can I send xml from php in varible to flash example:
$xml = "?xml version="1.0 ...";
script type="text/javascript">
var flashvars = {};
flashvars.xmlSource = ?php echo $xml; ?>;
...
/script>

View 1 Replies

ActionScript 3.0 :: Get A Variable From The Webpage To Pass It Into Flash?

Oct 3, 2011

I want to get a variable from the web-page to pass it into flash, and depending on its value to change the original image of button in flash movie. in html code:

[Code]...
 
and further code processing 'completely different buttons' when the page is loaded, it shows the top layer of the button (which defaults has value "main"), and only when the cursor is over those 'completely different buttons' (unconnected with the code, besides that they are on the same layer) goes into the right state " clients "

View 3 Replies

ActionScript 2.0 :: POST Array Variable To Webpage?

Sep 15, 2009

I have a webpage that accepts POST variables, I can post normal variables to it from flash like this:

Code:
lv = new LoadVars ();
lv.myvar1= "test1";

[code]........

View 1 Replies

ActionScript 2.0 :: Sending Variable To Php In Loop?

Oct 23, 2009

Code:
save_all.onRelease = function(){
for(var n=0;n!=cArr.length;n++){
///some other stuff

[Code].....

I want the php file to be sent the variable and loaded as many times as the length of the array cArr... lets say cArr is 16 pockets long... only the 16n from textsave array gets sent to flash via the lv5.specialVariable... I'd like the script to run 16 times, each time with the value of n getting sent as the specialVariable..

View 2 Replies

ActionScript 2.0 :: [Flash8] Sending Variable In Different Swf

Oct 27, 2007

for example i have 2 swf file a.swf and b.swf can a.swf sending variable to b.swf? can a.swf control some movieclip in b.swf? in a case a.swf is loadMovie to b.swf...

View 4 Replies

ActionScript 2.0 :: Internet Variables - Change The Value Of A Variable On A Webpage

Nov 7, 2008

I have been using AS2 for a while now but am having some trouble when it comes to the internet side, I basically would like to be able to change the value of a varible on a web page or something and use this value on a different computer, like an mmorpg but it does not have to be that fast, I have looked around and am having trouble working it out, I know you can use servers and stuff but I don't want to have my computer running 24/7 so someone else can use it.

View 1 Replies

ActionScript 2.0 :: Sending Variable From Php To Flash Without Printing Var In Php

Oct 29, 2009

This is going to sound like a really stupid query, but I'm totally new to this. I can grab the contents of a single variable from a php page and display it in a field in Flash, which works great. I do this using the echo command and placing an & before the variable to be sent. e.g. echo "&textData=$contentSenttoFlash";

When I embed the flash movie into the php page though, the echo command also prints that variable to the screen, so that it appears both in the flash movie (which I want), and again as a text string on the page (which I don't want). Is there any way to prevent the php printing the variable as well whilst using this method?

View 1 Replies

Data Integration :: Sending A Variable From Flash --> PHP?

Mar 14, 2007

according to a Flash MX book I'm using, the following should work (their own example):

The Flash movie:

- button with script:
on (release) {
loadVariablesNum("xxx.php", 0, "POST");
}[code]........

View 7 Replies

ActionScript 3.0 :: Sending Variable Values To Javascript?

Sep 9, 2008

I'd like to enable the user to enter several parameters within the flash plugin. These influence the flash movie. The flash file itself works perfectly fine. But now I also want to access and process these parameters on a Javascript function.

I tried the external.Interface and navigatetoURL method but couldnt achieve the required result. (The 'link' between flash and javascript doesn't seem to work...)

So how / which is the best way to transfer parameters from AS3 to Javascript on the server ?

View 3 Replies

ActionScript 2.0 :: Sending Variable From Flash To HTML?

Feb 16, 2009

I have an issue on sending variable from flash to HTML. For example I have a main.html page with flash Object. In this flash there is a search text field. When you enter some text and click on Go button, It will go to search.html page and it should show the text value in this page.

View 2 Replies

ActionScript 3.0 :: Sending Variable From Preloader To Main Swf?

Aug 13, 2009

I'm using a preloader SWF to load my content SWF and XML file, and when the COMPLETE event fires I'm using the following code to send my XML data to the content SWF -ActionScript Code:evt.target.content.sendXML(XMLData);I then have a sendXML function in the content SWF that picks up the data.This works - but I can't access XMLData right away (it's null if I trace it). But if I set up a timer with a tiny delay which then checks XMLData, the information is there.It seems to be a bit of a dumb way to do things. Has anoyone else got a better solution or a way that will allow access to the variable right away?

View 3 Replies

ActionScript 3.0 :: Sending A Variable To A Function In Another Class?

Oct 11, 2009

I have two classes one called 'LoaderSwf.as' which is used to talk to all the other classes im using. I also have a 'GeneralTimer.as' which works fine from a stand alone 'GeneralTimer.swf' file. What I am trying to do is send a value of 10ms to the 'GeneralTimer.as' which will then run the timer and when complete send a value back. But for simplicity im trying to send a 10 ms value to trace("tick") and trace("tock").

I keep getting error "TypeError: Error #1034: Type Coercion failed: Cannot convert 10 to GeneralTimer." this is according to Adobe "1034 Variables cannot be native." What does that mean for starters?

Here's my code:

in LoaderSwf.as

Code:
var w:Number = 10;
GeneralTimer(w);
in GeneralTimer.as

[Code].....

so as you can see I want to send the number 10 to be used in the GeneralTimer. I am sure I have used this before (in CS3) and its worked but am now using CS4

View 4 Replies

ActionScript 3.0 :: Sending Variable Value From A Loaded Swf To Parent Fla?

Apr 17, 2008

I load a swf in my main fla and I want to pass the value of a variable from the loaded swf to the main fla.How can I do this in AS3?

View 5 Replies

ActionScript 3.0 :: Sending A Variable To A Class Function?

Oct 11, 2009

I have two classes one called 'LoaderSwf.as' which is used to talk to all the other classes im using. I also have a 'GeneralTimer.as' which works fine from a stand alone GeneralTimer.swf' file. What I am trying to do is send a value of 10ms to the GeneralTimer.as' which will then run the timer and when complete send a value back. But for simplicity im trying to send a ms value to trace("tick") and trace("tock").I keep getting error "TypeError: Error #1034: Type Coercion failed: Cannot convert 10 to GeneralTimer." this is according to Adobe "1034 Variables cannot be native." What does that mean for starters?Here's my code:in LoaderSwf.as

Code:
var w:Number = 10;
GeneralTimer(w);

[code]....

View 3 Replies

ActionScript 2.0 :: Sending A Variable To Embedded Flash File?

Nov 28, 2011

What I need to do is pass a variable into flash.

I've had success doing this by just adding the variable to the end of the embedded SWF URL (.../mymovie.swf?variable=value), but what I need is the ability to send the swf variables when certain links are clicked, without the page refreshing.

I'm guessing this has to be done somehow with a javascript onClick function.

I've looked into using externalInterface, but it seems overly complicated for this application.

View 5 Replies

Flash :: Sending Variable From Fla To Document Class And Then Accessing?

May 31, 2011

I want to find out whether my swf was loaded locally or from another swf. For this purpose I have declared a variable 'parentType' in my fla. var parentType:String = String(parent); There is a function in the document class that determines whether swf was loaded locally or from another swf. The name of the function in the document class is 'externalOrInternal'. The varaible parentType is passed as a parameter to the function externalOrInternal externalOrInternal(parentType); The name of the document class is Main. In the constructor of Main I have the function pollResize() (the use of this function is to listen for the resizing event. That part of the code is not shown in the snippet given below).

[Code]...

I see that swfParentType is has value insde the function externalOrInternal. My doubt is why null is traced inside the function pollResize. Why is it not [object Stage] as inside externalOrInternal. Due to this I am not able proceed further with the stage resizing event.What needs to be done so that proper value is traced in the function pollResize.

View 1 Replies

ActionScript 2.0 :: Sending Input Text Variable To PHP Without HTML Tags

Oct 14, 2009

I have an input box with a variable name. When the user enters some text and presses a button that variable is sent to a php file using the GET method. Then the info is put into a database. When I checked my database, I found that a load of styling html tags has been included. I want for my input text box to have styled text, but I don't want that styling /html tags to be sent to the php file. I know I could use strip_tags in php to get rid of the html tags, but surely there's a way of not sending the tags at all, just the text content of my variable?

[Code]..

View 7 Replies

ActionScript 3.0 :: Avoid Browser Appearing Problem In Sending Variable To Php

Oct 15, 2011

How can i send variables from flash to a php page. I want it to be done in the standalone flash player and not the browser and also I don't want the browser to pop up like when we use getURL. Is there any possible way of doing it. It seems I cannot find way to sned variable to php except using the following method which opens a browser.[code]...

View 5 Replies

Actionscript 3 :: Creating Loop For Sending Variable To Other Components In Flex?

Dec 10, 2009

I have some simple function in Flex in which I would like to send one of my variables to all the components used in my app... The problem is that there is lots of components in my app, and I'm not sure how to reference to my component's id... Basically, is there an easier way to do this;

private function preloadStuff():void{
// populating of bulkLoader var
var preloaderItemsList:XMLListCollection = new XMLListCollection(preloaderItems.children());
var item:XML;

[code].....

View 2 Replies

ActionScript 2.0 :: Email PHP Page - Sending Variable In Form MovieClip

Aug 26, 2004

[URL]. I am trying to make the code into a function so that I can place it in a frame instead of attaching it to a mc.

onClipEvent(data){
this.sendSent.text = "MESSAGE WAS SENT";
this.textEmail.text = "EMAIL";
this.textSubject.text = "SUBJECT";
this.textName.text = "NAME";
this.textMessage.text = "MESSAGE";
} on (release) {
// send variables in form movieclip (the textfields)
// to email PHP page which will send the mail
this._parent.form.loadVariables("email.php", "POST");
}

View 10 Replies

ActionScript 2.0 :: Swedish Font - Sending Variable To MySQL Database

May 23, 2005

I am using a form I made in flash to send variables to a MySql Database.
Code for form:
trace(email1.text+", "+question1.text+", "+check1.selected);
status1.text
send1.onPress = function () {
status1.text = "sending..";
var ld:LoadVars = new LoadVars ();
[Code] .....

View 9 Replies

ActionScript 2.0 :: Local Connection - 2 Swfs Sending / Receiving Same Variable?

Feb 11, 2007

All of the tutorials I have found re: local connections seem to outline 1 swf sending info & the other swf receiving. Is it possible to have two swfs using exactly the same action script for their variables to effect each other? I've got two swfs with 2 different sets of buttons who react the same way on roll over. Once a button is selected it remains highlighted. I want to know if I can have a button in swf 1 highlighted but un-highlight when a button in swf 2 is selected?

View 3 Replies

ActionScript 2.0 :: Email Capture Form - GetURL Not Sending Variable

Mar 19, 2007

I'm trying to make a small email capture form, but I'm having trouble getting Flash to pass the email address to the server. I've since given up trying to use getURL and I'm simply trying to trace the variable instead. The form consists of a text box w/ instance name "email_txt" and a button w/ instance name "btnSignUp." the actionscript is placed on the button.

Here's PHP Code:
on(release) {
trace("email_txt says: " + email_txt);
// getURL stuff here
}

My trace statement reads:
Code:
email_txt says: undefined

View 5 Replies

Professional :: Place A SWF In Top Right Of Webpage

Mar 30, 2010

Is this possible with Flash?? I want to place a SWF in the top right of the webpage, and when people click on a link from the main menu on the left of the browser, it plays the SWF. This page is written in php, so there is no refreshing of the webpage, just the content.Basically think of an elevator user clicks on menu item, elevator wheel spins, and javascript loads new content....so the elevator wheel has to play everytime a link is clicked.

View 1 Replies

Professional :: Webpage Without A Border?

Apr 20, 2010

No matter what I do though, when I publish the fla file, a small margin appears around the edges.Now, without adjusting the html, can I get the fla file to publish without a border so that it appears naturally as 'full' within the browser?

View 11 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved