ActionScript 3.0 :: SentToURL Without Data Or Variables?

Aug 18, 2011

I'm working on an interactive quiz where the user's responses will be incremented to a poll in a CMS. I have a url that automatically increments the answer choice in a poll, so I would like to use sendToURL to call the url without actually passing any data or variables. It seems to work with navigateToURL, but that opens a blank window in the browser (a complete nuisance every time you answer a quiz question).

Here is the navigateToURL code that increments the poll successfull, but opens the unwanted browser window

var url:String = "URL GOES HERE";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request);

[Code].....

I tried replacing "navigateToURL" in the first option to sendToURL and it wasn't incrementing the poll.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Load Data From Different Variables - The New Variables Come Back As Undefined?

Jun 15, 2010

I'm writing code that takes data from mysql that's processed by a PHP script. It's actually a bit bizarre, at least to me. Anyway, here's some basic AS3 code that's moving toward what I want to do:

var loader:URLLoader = new URLLoader();
var urlRequest:URLRequest=new URLRequest("receive.php");
urlRequest.method=URLRequestMethod.GET;[code]....

For some reason, the statement "trace(evt.target.data);" produces a whole pile of garbled text before the actual stuff that it's supposed to show Because of problem #1, I've had to include a throwaway variable at the beginning, otherwise the first variable I try to pass into AS3 comes back as undefined. This causes errors when I run my flash movie in the IDE, but when I run it from the browser it doesn't seem to have any effect.But this is the strangest thing of all whenever I make any changes to the database (and subsequently try to load data from different variables), the new variables come back as undefined. For example, let's say that I add another entry to the database, and decide to load students 2, 3, and 4 instead of 1, 2, and 3. When I do that, any new data I've added comes back as undefined, even though when I view the PHP output in my browser, it looks just fine.

And now for the REALLY bizarre part: I'll copy that output, paste it into my PHP script as an echo statement, comment everything else out, and my flash movie runs fine. Even though the output from the PHP script is exactly the same, it gives me errors.

View 9 Replies

ActionScript 2.0 :: How To Set CSV Data As Variables

Feb 3, 2009

I have a huge csv file and want to use the first column as variables. how should i script it?

View 1 Replies

ActionScript 2.0 :: Refresh Variables With New Data?

Sep 19, 2010

I am tying to find a way to refresh variables with new data. I am using PHP and MySQL to randomly assign new data to a variable when the script is called. This new data is passed to Flash as in a variable using these functions:

varReceiver = new LoadVars();
varReceiver.load("iat_config.php");
varReceiver.onLoad = function(success){

[code]....

So my problem is that every time I call my movie to go to this frame that contains this actionscript, it does not provide me with new variables. Another important variable I need to change every time the frame occurs is startTime = getTimer(); However, the variable startTime will stay they same and not change when the frame is recalled.

View 1 Replies

Data Integration :: Loading Some Variables From PHP Doc?

Nov 6, 2007

I am using loadvariablesnum to load some variables from my php doc, is there a way i can test to see if its loaded or not to jump to the next frame..? Right now I am having it load into a string.text to test if there is text in it, but I don't want to use a string.text

View 1 Replies

Data Integration :: How To Post Variables To URL

Aug 1, 2006

I am using the following code to try and post variables to a URL, but the SEND command is still posting the variables via GET.
// ls_print is the URL I am attempting to POST to
lv_request.send(ls_print, "_blank", "POST");
This is what the documentation says, so I'm lost.

View 3 Replies

Data Integration :: Sending Variables To PHP?

Jan 21, 2007

I am working on the contact form for a website that is done entirely in flash. The following is the code I have for sending the variables to the emailForm.php script that I created. The only problem I'm having is that everytime you send the contact information, a new web browser window opens up (it opens the php file in the web browser). I'm testing this on my local server and it works great, except for the fact that everytime I send it, I dont want a new browser window opening up.

View 1 Replies

ActionScript 3.0 :: Getting Data From Xml Into Flash Variables?

Nov 7, 2009

I'm working on a flash vote counter that uses xml to load the counts. it doesn't load any value for me and I'm getting no error messages. every time I run this when I click either button 0 gets displayed in the text boxes. if I manually set the totals it displays properly so I know the problem has to do with my xml.

FRAME 1:

Code:
//stop at frame 1 until instructed
stop();
//my two int vote totals

[code]....

View 8 Replies

ActionScript 3.0 :: Parse Xml Data Using Variables?

Jul 12, 2011

parse xml data using variables. Here is the code sentence

ActionScript Code:
for each (var sButton:XML in xml.datos.menus.label.submenus)

I was thinking about the possibility of changing the tag submenus for a variable? And in the next bit of code?

ActionScript Code:
sBotonMenu.btnText.text = sButton.submenus.toString();

View 2 Replies

ActionScript 2.0 :: Loading Data Into Variables?

Aug 27, 2004

I am trying to load data into a variable. This part works fine

Code:

loadText = new loadVars();
loadText.load("htmltextFile.txt");
loadText.onLoad = function(success)

[Code]....

View 1 Replies

ActionScript 3.0 :: Asp Variables Via URLLoader.data?

May 11, 2009

Having trouble get the URLLoader class to work.Unsure but I must be missing something basic.Just trying to send name/value pairs from asp to flash.AS3 Code:

Code:
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;

[code]....

View 3 Replies

ActionScript 3.0 :: Retrieving XML Data With Variables

Nov 9, 2009

I'm not even sure if this is possible, but I'm looking to retrieve a string from an embedded XML file, using a variable as the XML element's name. Here's what my code currently looks like, although it doesn't quite work:

Code:
private final function getAreaTitle(_index:int):String
{
var _element:String = map_XML.mapnode.@title[_index];

[Code]....

I'm not massively familiar with the XML format, so apologies if I've not explained myself very well. As you can hopefully see, I have one XML file containing my map data and another containing my text, such as area titles and locations. What I'm trying to retrieve in the example above is the string with the label "title_training" from the "text_XML" file. Of course, the function should be able to return the title for any area, so I need to find a way of converting "_element" in to the right format

View 1 Replies

ActionScript 2.0 :: Load Data Into Variables?

Aug 27, 2004

I am trying to load data into a variable. [code]...

View 1 Replies

Data Integration :: Load XML Variables To Flash?

Dec 12, 2006

I have my XML data loading into my SWF OK. However, is there any way to call that tag name instead of the child node number?So instead of something like this[code]...

View 2 Replies

Data Integration :: About Loading Variables From Url Link?

Oct 18, 2008

I would like to make a xmas ecard and want to include the recipient's name and greeting message in the swf.I would like to define the name and message within the url so I can custom it easily and send to different people: http:[url]....

View 1 Replies

Data Integration :: Loading Variables In FLV Player?

May 21, 2006

i have edited an open source flv player's fla file for my needs,but ihave some problem.it uses XML when getting video source URL but i want it to read from QueryString or a variable from ASP.How Can i do this? the original codes are like this,these are for reading from XML source;

View 1 Replies

Data Integration :: Sending Variables From Flash To PHP?

Jan 28, 2008

I have a problem while sending variables from flash to PHPHere is the code:

submit.onPress = function ()
{
c = new LoadVars ();

[code].....

View 4 Replies

Data Integration :: Checkbox Statement Using Variables

Aug 24, 2006

Using Component Inspector, I can control input dynamically. But I can't find a way to control checkboxes.

[Code]...

View 5 Replies

Data Integration :: Session Variables In Flash?

Oct 29, 2006

I'd like to create a website that displays a swf file. Is there a way I can make it so that the content of the .swf file comes from session variables (probably coldfusion). So, if someone types in their name, I want to save their name to the database & then later display their name in the swf file.

View 1 Replies

Data Integration :: Saving Variables In Files?

Jun 18, 2008

Is it possible to make such a thing: When Button_btn is clicked (onRelease), var( var Name:String = new String("Flash MX|) ) is send to file (File.txt) and saved there.

View 1 Replies

Data Integration :: Pass Variables To Flash From Php?

May 25, 2010

I have searched the forums and internet and nothing seems to work. It sounds so simple but the variables are not passing into flash. Here is the scenario:

On frame one of my flash file I have:
stop();   var sendLV = new LoadVars();
var recLV = new LoadVars();

[Code]....

View 2 Replies

ActionScript 3.0 :: SendToURL Without Passing Data Or Variables?

Aug 18, 2011

I'm working on an interactive quiz where the user's responses will be incremented to a poll in a CMS. I have a url that automatically increments the answer choice in a poll, so I would like to use sendToURL to call the url without actually passing any data or variables. It seems to work with navigateToURL, but that opens a blank window in the browser (a complete nuisance every time you answer a quiz question).

[Code]...

View 5 Replies

Set Variables In MXML While Avoiding Data Binding?

Jun 2, 2011

I love MXML but am starting to notice some of its drawbacks. The main one I'm struggling with is its larger memory usage due to the need for binding. In the super simple code snippet below, which I've tested on Flex 4.0[code]...

My main question: is there any way to set variables in MXML that doesn't eat up memory? I'm aware that I can do this explicitly in AS and keep MXML as a bare bone structure but was wondering if there was an alternative path.

Secondary question: why memory usage in c different from a and b? I've looked up at the intermediate code and it seems like the const case still sets up some binding logic but not as much and have been wondering why that is.

View 1 Replies

ActionScript 2.0 :: Variables In Cache - Refreshing Data

Feb 29, 2004

PHP Code:
<?
$dbHost= "localhost";
$dbUser= "sarin";
$dbPass="pingpong
$dbName= "sarin-_db";
$table = "calender";
[Code] .....

And I have a textfield with variable set to jor.. Which is the variable from the php file which holds data from the database. When I change text in the database it doesn't change in the swf unless I go to internet properties and empty the cache.... even when I hit refresh it doesn't update. How do I make it so each time u load the swf it refreshes data from the database?

View 7 Replies

ActionScript 2.0 :: Get Global Variables Data In The Right Languages

Sep 1, 2005

I have some problems with my homepage. I want the user to be able to chose their own language. Sedish English or german. What I want is that you klick a flag in the intro of the page and then Flash should remember that and get my variable datas in the right languages. As I said, three flags. what should i wright on them? actionscript? ex:

[Code]...

View 9 Replies

ActionScript 2.0 :: (flmx04) - Loading Variables From Data.txt?

Feb 3, 2006

I'm having a problem when loading variables from data.txt. Obviously, the & symbol is what states a new variable, but i'm having clients enter html text and the (for white space in html) sign comes up a lot and breaks the line of text. Is there a line of code in actionscript that I can input that states that whenever there is "", for the flash to ignore it or just enter a space instead of looking for a new variable.

View 13 Replies

ActionScript 3.0 :: Retrieving Variables URLLoader.data?

Mar 24, 2007

i've been setting up a high score table in my game, and everything is working, but i cant work out how to get variables from the URLLoader.data that im retrievingif i trace loadedScores.data, i get this&name1=matt&score1=323250&name2=1234567890123456.. . and so o've tried passing it to a URLVariables constructor, but it says the string doesnt contain the correct name/variable pairs or something, and loadedScores.data.name1 doesnt work.

View 8 Replies

ActionScript 3.0 :: Separate The String Data Into Different Variables?

May 10, 2011

I have a string that is sent from PHP to Flash. When I Trace the string in flash, it prints the followings:

First Name: Mickey
Last Name: M
Designation: Mouse

[Code]....

View 4 Replies

ActionScript 2.0 :: Searching And Reading Data As Variables?

Apr 27, 2004

how to search through a .txt file to find a match from a input put in through flash and return which line its in the text file...ie: input, "flash" and i search through the .txt file to find a match and return what line its on?And my second part of the question, how can I use cordinates to search through a .txt file and return the data as a integer? Basically what I'm trying to do is have a list of data setup with a name and value beside it and be able to retrieve a specific value for each name, ie:

flash 4563
kirupa 2305
....
blah 2350

View 1 Replies

Data Integration :: Adding Variables To LoadVars Object?

Apr 27, 2007

I have an application that reads a PHP script and populates the Flash applets using the following on frame 1:

[Code]...

A combobox (created with the returned data) is created on frame 61. When a selection is chosen in the combobox I need to add the value returned from the combobox to the variable catvar, add this variable to the LoadVars object and run the script again. It seems to set c.catvar initially but when I use the 'sendAndLoad command the second time c.catvar isn't included. Is it possible to add variables to a LoadVars object created
on frame 1 from frame 61?

View 1 Replies







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