ActionScript 3.0 :: Flash AS3 Loadvars Not Working After Publish

Feb 17, 2011

I'm having an issue with some AS3 Loadvars. This works fine when running as preview (^+Ent), however after publishing this doesn't work. I'm very new (this is my first 'dip' into the flash world!).

Code:
myData = new LoadVars();
myData.load("[URL]");
myData.onLoad = function(success) {
if(success){
L_Var1.text = this.RetVar1;
L_Var2.text = this.RetVar2;
_level0.gotoAndStop(2);
} else {
_level0.gotoAndStop(80);
}};

Whenever this runs in preview, frame 2 is shown without issue. If run after publishing, frame 80 is shown, but without the trace I cannot see why.

View 1 Replies


Similar Posts:


ActionScript 2.0 :: [mx] Working With LoadVars From PHP, In Flash?

Feb 20, 2004

I looked at the tutorial section to see how to get loadVars to load in data from PHP.

PHP code:
//do league queries
$query_mteam = "SELECT name FROM test ORDER BY name ASC";[code]......

Now I added the extra line in bold as I need to be able to use the variable I have grabbed from my PHP file using the above code (the var is called rows) and I need to be able to use this figuree to do some simple math.. but I can't seem to get it to do anything apart from appear in text fields....I want to be able to do:

row=row+5;

for example. In fact, I want to use the value of row to generate a certain number of buttons dynamically. This eventually will be a menu based on values from a database (mySQL and PHP) but I am stumbling at the first hurdle.

View 2 Replies

Professional :: Flash CS5 Publish Preview Not Working

Feb 16, 2011

I am working on Flash CS5 Professional. I have created a simple fla file but not able to Publish->preview the swf file in Google Chrome. When I click on Publish Preview it opens a new browser window but nothing happens.

View 6 Replies

ActionScript 2.0 :: Xml Driven Flash Website Not Working When Changed Publish Settings?

Jul 22, 2007

I have Xml Flash website but it is done in FlashMx with a Publish settings of Actionscript 1.0 and Flash Player 6 . Now I have a flv player component I want to embedd it inside my xml flash project, It says you need a higher publish settings to enable that flv component. ok fine Now i have changed the Publish settings to Flash Player 8 . When I run the movie Flv component is working but the xml flash website has been disappeared only blankscreen .

View 4 Replies

ActionScript 2.0 :: LoadVars() Only Working On One Set Of Objects?

Sep 16, 2011

When I click on any of the chairs, the appropriate text loads in the textfields. But when I try a different items like tables. It shows up undefined.

ActionScript Code:
if (images == "chairs" && loadStat == "finished")
{
picLoading("MI_Products/Chairs/chair" + chairInt + ".jpg");

[code]....

I have all the info in 1 txt file seperated appropriately with the &. As I said, all the chairs load up each part of the text file as it should but every other item comes up as undefined in the textbox. I tried giving each loaderTxt a number to differenciate as seperate variables, yet no avail.

View 4 Replies

ActionScript 2.0 :: LoadVars On The Server Is Not Working?

Nov 18, 2002

I'm using the LoadVars object to read data from a textfile. Everything works fine when I play my movie locally or on another computer in the network, but when I play it on the server, it does not load any data at all

[Code]...

View 11 Replies

ActionScript 2.0 :: Loadvars Not Working On External Domain?

Aug 27, 2009

I have Domain1 that is hosting my flash .swf file, and Domain2 that is linking to that .swf file. In the flash file I have a;loadVars.send "POST");command. When the flash file is placed anywhere on a page on Domain1, this works perfectly fine. But when placed on Domain2 (and other domains), this loadVars statement does not work and does not forward to But when I change "_self" to "_blank" - the statement works fine on Domain2.

View 4 Replies

ActionScript 1/2 :: Loadvars Not Working On External Domain

Aug 27, 2009

I have Domain1 that is hosting my flash .swf file, and Domain2 that is linking to that .swf file. In the flash file I have a; loadVars.send("another-[URL]", "_self", "POST"); command. When the flash file is placed anywhere on a page on Domain1, this works perfectly fine. But when placed on Domain2 (and other domains), this loadVars statement does not work and does not forward to another- [URL]. But when I change "_self" to "_blank" - the statement works fine on Domain2. Why doesn't "_self" work on external domains?

View 3 Replies

ActionScript 2.0 :: LoadVars Working Locally, Not Live?

Sep 19, 2009

I'm having a bit of trouble with a Flash/PHP voting system. Basically, it's using a loadVars object to send a simple Number variable to a PHP file that connects with a database and returns.

But for some reason, I can only get the votes to count when I test locally with an absolute path to the PHP file on the server. When I put it live, it will read the PHP file but doesn't seem to be able to send the voting data to it. Here's my code:

ActionScript Code:
//----- On load data function -----//
var dataIn:LoadVars = new LoadVars();
var dataOut:LoadVars = new LoadVars();

[Code].....

Like I said, everything works fine in local testing, but when I put it live, the votes don't get counted, whether I use an absolute or a relative path to the PHP file on the server.

View 9 Replies

ActionScript 2.0 :: Don't Use Absolute Paths When Working With Loadvars

Feb 1, 2006

Working with loadvars can be frustrating if your calling vars from [URL]and testing them by navigating to "website.com/getVars.php". Flash will not load vars accross a domain (cause your missing the www) without adding a policy file. There are a couple ways around this:

1) Don't use absolute paths when working with loadvars.The issue here is testing locally and on the web, you can't load vars from getVars.php locally if you're web server is generating the file with a database...

2) Force your users to include www. before the domain name.I work for a tv network and I'm finishing up 4 flash sites that all use loadvars and I felt like writing a script that would work for all of them, instead of one for each site. The following is the result, and I thought I would share it with the faithful kirupa nerds.

<script language="javascript">
var thisURL = "" + window.location;
var WWW = (thisURL.indexOf("www"));
var dissect = thisURL.split("/");

[code]....

I compressed (and actually made the code more scalable) from 23 lines to 6

View 3 Replies

ActionScript 2.0 :: [CS3] LoadVars.sendAndLoad Only Working On Some Computers

Jan 15, 2009

I'm writing a very simple flash app (AS 2) to sign users up to an email newsletter; the way it works is that it uses LoadVars to hit a (same-domain) PHP script via POST with the user's email address. The PHP script then passes the info through to another domain via curl to sign up the user.

So far, so good, and it works on roughly 70% of the computers on which it's been tested (it's being tested live from the website, not locally). However, on some computers, it doesn't appear that the LoadVars.sendAndLoad call is being made, as the email addresses sent from those computers aren't showing up on the subscriber list. I know that the PHP script still works on those computers as I've made a barebones HTML form that acts in exactly the way the Flash app does (POSTs to same PHP script with same variables, etc) and it works on all computers.

Here's the relevant AS:

submit_btn.onRelease = function(){
submitOutAnimation();
this.enabled = false;

[Code]....

View 2 Replies

ActionScript 2.0 :: XML Not Working On Publish?

Jan 18, 2010

Fundamentally my code seems to work on preveiw but when I actually publish nothing appears.Here's the code in full:

Code:
stop();
#include "as/tween.as"

[code]....

View 1 Replies

ActionScript 2.0 :: XML Not Working After Publish (but OK In Preview)?

Jan 18, 2010

Fundamentally my code seems to work on preview but when I actually publish nothing appears.Here's the code in full:

Code:
stop();
#include "as/tween.as"

[code].....

View 1 Replies

ActionScript 3.0 :: [Q] FMS2 NetStream Publish Not Working?

Jul 28, 2007

I am trying to create a simple online recording via FMS2

Here is my coding:

Code:

NetConnection.defaultObjectEncoding = ObjectEncoding.AMF0;
var nc:NetConnection = new NetConnection();
var ns:NetStream;

[code].....

WHen I try to record a video via my cam (click the button "btnRec"), ... no error message comes up, but there is no FLV file (it should be "videoName.flv") has been generated in rtmp://localhost/test ?

View 2 Replies

IDE :: Filters Not Working - Publish The Movie The Blur Isn't There

May 8, 2009

I have a file that i am trying to add a blur filter to. it is at the very end of the movie. It shows up in the FLA but when I publish the movie the blur isn't there. Here is the fla file and swf I'm getting [URL]

View 3 Replies

ActionScript 2.0 :: Printing - When I Publish The Swf It Stops Working?

Aug 24, 2009

Its set to print a mc that sits off screen with dynamically generated text within. This all works perfectly when i test the movie within flash, it prints perfect. However, when i publish the swf it stops working, instead it prints the corner of the offscreen content.

View 1 Replies

ActionScript 2.0 :: Rollover Command Not Working On Publish Preview

Dec 23, 2009

I have a flash document with only 1 scene, but several frames. On the first frame i have several buttons, their behavior is "button". I wrote a simple onRollover command on each one. Like this

on(rollOver){
gotoAndStop(2)
}

It works fine when I test the movie, however, when I publish it, nothing happens when I rollover the button. I suppose there is a simple answer to this, but i just can't find it

View 6 Replies

Professional :: Won't Publish Correctly In Cs5 After Making Changes To A Perfectly Working Fla

Jul 27, 2010

After making changes to a perfectly working fla it won't publish correctly,meaning:1. When previewing all the components jump (as usually happens when there isa compile error) but no error is displayed in the log.In this case when used with the whole project, the project doesn't load,even though the corrupted fla is not the first loaded (non of the fla loadsbesides the preloader).2. When previewing and running with the whole project the labels on thebutton components disappear, but only the ones that are dynamically changedby an external as file.*there are other similar bugs as well like unable to enter the table in thegame etc.The changes I make before it happens:- changing the size of a shape inside a movie clip.- changing the size of a movie clip.- changing anything in an already existing code (like changing the size of afont).- adding new basic code anywhere (like trace code).

- changing button skins.Basically, any change I make corrupts the file but not consistently,meaning, I can make the same change twice and the file will break only one of thetimes, or, I can make several changes until it breaks.It also happens on every computer but also, not consistently, I can work fora while, making the same change, deleting, making the change again etc, onlyon the fifth or sixth time the file will break. On a different computer itcan take only two or three times.The corrupted file start working again after I change the name of the foldercontaining my project or move all the files to a different folder anywhereon my computer. After a short while the file crushes again.

View 1 Replies

ActionScript 2.0 :: TUTORIAL Error - Change LoadVars() Into LoadVars()?

Apr 13, 2004

One of the moderators, could you've a look at this tutorial: [URL] it doesn't works with me, maybe because I've 2004 so if you change loadVars() into LoadVars() it should work

View 2 Replies

Actionscript 3 :: EtStream.publish Webcam To FMS Working In Standalone Player / Not In Browser

Mar 24, 2011

I am trying to publish the video of a webcam to a Flash Media Server 2.My code is working in the Flash standalone player (tested with 10.0 and 10.2), but not in the browser plugin (tested with 10.2, both in IE and Opera.The connection to my FMS is working successfully, but after the publish, nothing happens, I never get the NetStream.Publish.Start Event. On the server I can see the connection in the management console, even the stream in the streams tab. But I cannot connect to that strea.[code]

View 1 Replies

ActionScript 3.0 :: Allow Full Screen In Html Tab In Publish Setting But It Doesn't Working

Nov 9, 2009

i have an fscommand with ActionScript Code:

fscommand("fullscreen", "true");

and i have checked the flash - allow full screen in html tab in publish setting but it doesn't working

View 1 Replies

ActionScript 2.0 :: Using LoadVars.getBytesLoaded And LoadVars.getBytesTotal?

Sep 1, 2003

Whenever i try to display anything returned by LoadVars.getBytesLoaded or Load....Total, it gives me NaN.

View 14 Replies

ActionScript 2.0 :: Publish Preview As Flash VS Publish Preview As Html

Jun 7, 2004

Ive made a movie that add strings from several input text fields to an array. This array is sent from the flash video to php. This is working fine when I preview the movie as Flash. The php script prints the variables as intended.

But when I preview it as html the arrays are all empty...

[AS]
on (release) {
number_of_attr1 = main._currentframe + 1;
suggestions1 = new Array();

[Code].....

View 1 Replies

Publish Javascript To A Separate File During CS4 Publish?

Nov 12, 2009

While publishing my movies in CS4, I noticed that the javascript required to embed the movie in a web page was published as inline javascript in the published page. This means that code would be downloaded for each page my movie is on. Is it possible to configure Flash CS4 to publish that javascript to a separate .js file, instead of having to manually copy-paste that each time??

If no, I believe that js is independent of the Flash movie (please correct me, if I am wrong). So, can I copy-paste that javascript to an external file just once, and use the js file for all my movies being published??

View 2 Replies

Actionscript :: Use NetStream.Publish To Publish AAC Audio

Jun 22, 2011

I'm using Flash to play a RTMP stream to a Wowza server.

I publish my microphone with
m_MicStream.publish ("mic_user1", "live");

Unfortunately, my receiving end only supports AAC audio. Is there a way to publish AAC audio with Flash?

Note : I tried the mp4:mic_user1, but it does not work. The stream negociation seems ok, but the received audio is garbage

View 1 Replies

AS2 :: Flash - Webpage Crashes When Using LoadVars()?

Apr 14, 2012

As the title says I am loading a flash in my webpage and when I call LoadVars() it crashes the web page.Here is my code:

Flash
lv = new LoadVars();
lv.onLoad = onLoadCallBack;

[code]........

View 1 Replies

Flash :: Loading A PHP Page Using LoadVars?

Aug 12, 2011

I'm using loadVars to load a PHP URL with lots of sensitive information required for the Flash application.Only problem is that URL can be accessed via a web browser which raises security issues if someone gets a hold of this URL. Is it possible to have the PHP page only accessible via my Flash application?

View 3 Replies

ActionScript 2.0 :: Flash PHP LoadVars Array

Dec 17, 2004

I want to load headlines that are linked to URL(s) into my flash movie where the dynamic txt box(tickertxt) is here:_root.scroll.scrollbox. tickertxt.I am working along with my programmer and he built php page that says:num=1&url1=ticker.php%3Fid%3D1&headline1=Test.[code]

View 2 Replies

AS2 :: Json - Add A Request Header To A LoadVars When Using GET (Flash)?

Oct 29, 2010

I'm working on a project built in Flash AS2.One of the things I need to do is load JSON data. In the past, I've had no problem with this - LoadVars works just fine.However, on this project, the JSON service that I'm calling requires the http request to include an ACCEPT header with "application/json".

LoadVars has an addRequestHeader method that allows me to add or change HTTP request headers, but according to the documentation, those headers are only sent with POST actions.Of course, in my case, the JSON service only allows GET requests.I tried using addRequestHeader anyway, but the header is not sent.(Of course, I could rebuild the application using AS3, which allows me to use URLLoader and URLRequest, but the application has WAY to much legacy AS2 code...)

View 1 Replies

ActionScript 2.0 :: Update Vars Sent To Flash WITHOUT 'GET' Or Loadvars?

Jun 17, 2007

My main.swf is embedded in my index.html page.

It loads external swfs in ONLY WHEN a HTML button, sitting outside my main.swf but ON index.html is clicked - posting it's variable/value to my swf?

So what I am saying is - Flash will not be functioned to do it's loadVars magic, I want Flash to be ready & waiting for a new variable to arrive at any given time - THEN action a function depending on the value of the variable.

I'm just not sure on the limitations of Flash - the program where I thought absolutely ANYTHING is possible.

View 1 Replies







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