ActionScript 2.0 :: FileExist Works Locally - Fails On The Web
Oct 15, 2009
I have learned that the only way to conditionally test if an XML file exists is to go ahead and load it, first. Then base your conclusions on whether the load fails or succeeds.
I have used the code below to determine file existence with my own project, but it will only correctly work from my own hard drive. If I push my compiled work onto my web space, the result will always be True (file exists), even though it is absolutely False. I have tested this condition with the Alert component, and the routine indeed fires as True when it should not. I am not trying to cross domains when checking, either; it is all within the root directory.
why the routine would fail on the web, but work perfectly on my own hard drive?
Code:
fileExists = new LoadVars();
fileExists._parent = this;
fileExists.onLoad = function(success) {
[Code].....
View 4 Replies
Similar Posts:
May 4, 2010
I've createa simple flash banner (FL10, CS4) that is used stored in multiple locations on a server, which is sent a relative path to an XML file via FlashVars. relative path images are then loaded from this xml file.the base class for the banner is.Thins all works fine locally and in IE but in Firefox it fails about half the time to trigger the loaderinfo Event.COMPLETE call.(essence of the Base class below:)
public class Banner extends MovieClip {
public function Banner() [code]....
View 3 Replies
Mar 1, 2012
I have some proLoader code that works on one FLA file and I am trying to reuse the code on another file to pull in the exact same .swf in the same location and I am getting this error.. What do you reckon is going on?
[Code]....
View 5 Replies
Jan 19, 2011
I've got a project that loads a couple of external flv videos. It works great locally but when I upload it to a web server I just get a blank screen.
Googling reveals two possible issues... server mime types, and flv path issues.
Everything is in the same folder so I'm doubting it's a path issue.
If it's the mime type issue, how do I go about fixing it? My host is dreamhost.
*update, I tried adding the following two lines to my .htaccess file but it didn't change anything:
AddType application/andrew-inset ez
AddType video/x-flv flv
Here is the html: [URL]
And here is the whole project in a zip if anyone has time to take a look:
[URL]
View 1 Replies
Mar 7, 2009
I'm working on a website ([URL] - don't think the flash file can be seen in FF yet) and I want to load an swf-file with some illustrations and such. As this could get a little big, I have made another swf-file which shows a preloader and loads the first swf-file. The preloader works perfectly when tested in Flash CS3, but when uploaded to and tried on my webhost's server, the preloader doesn't load anything. Instead it of the load-percentage it just writes "NaN". You can find the as3-code down below. The preloader-swf and the swf to be loaded are located in the same folder. Both are as3.
This is the code from my as-class file:
package classes{
// Imports necessary classes
import flash.display.MovieClip;
import flash.text.TextField;
import flash.events.Event;
[Code] .....
View 2 Replies
Jan 25, 2010
Swf generated by class (shown below) brings in the noponies as3 accordion which all works ok locally. But when I put it online nothing is shown. I think it's something to do with the xml files but not too sure
Code:
package courseClasses{
import flash.display.MovieClip;
[code].....
View 2 Replies
Jan 19, 2011
I've got a project that loads a couple of external flv videos. It works great locally but when I upload it to a web server I just get a blank screen.
View 2 Replies
Feb 8, 2009
I'm using a MovieClipLoader in order to load in a couple of images into my flash during runtime. And it works perfectly when I play it locally, as well as from the FTP so to speak, but when I go "live" with it - that is with a URL... it just doesn't work! The XML file that goes with it works very well, and I've traced the paths and they're the same live and local.
View 1 Replies
Jan 25, 2010
Swf generated by class (shown below) brings in the noponies as3 accordion which all works ok locally. But when I put it online nothing is shown. I think it's something to do with the xml files but not too sure.[code]
View 2 Replies
Aug 11, 2010
I made (or copied) this XML 3d Carousel: [URL]
I changed some settings, just what I needed like stage size, thumbnail size and so it doesn't spin too fast when mouse rolls over.
I replaced the images with my own, so I have like four now spinning around. It works fine when I hit Ctrl + Enter to test my movie and aswell the carousel.html works in the browser.
I uploaded all files (four images named c_img(number).png, carousel.xml, carousel.swf and the AC_RunActiveContent.js) all in the same folder to my website through FileZilla but the god damn movie doesn't work on the web. It just shows the background so it must be the images are not loading in correctly, but I can't find what's wrong. I've checked the file paths and they are correct, I don't use any cross-domains. Honestly I can't find the problem, it works on the tutorial site so why not on mine? I basically just copied all, nothing more.
I did notice a strange thing though. If I write the direct address in the browser address field [URL] so it loads in full screen, the image carousel shows but very far outside to the right of the screen. I used Firebug and changed the size of the flash movie so I could see far beyond, it's very f'ed up..
Direct link to it: [URL]
If you have Firebug, use it and change the size of the flash and you'll see the carousel to the right of the screen, outside the main flash content area. :/
View 5 Replies
Aug 1, 2006
So I have an html file with a swf in the center which loads pictures and text via XML. It works fine on my own computer but on the actual site it doesn't load the pictures or text it, in any browser.
View 1 Replies
Oct 16, 2009
i have a flash (swf) file
i embedded it in an html page
the location is right
it works locally when i preview it in a browser
as soon as i upload it - it doesn't show up
here's the page: [URL]
here's the location of the swf file: [URL]
i've even tried relative vs. absolute links and nothing. i've tried firefox and safari. nothing.
i'm guessing this is some dumb simple thing, and hopefully it took you longer to read this than it will to type the answer.
i am embarrassed that i am not getting this but hey, it needs to be fixed and i'm sick of looking at it and trying to figure it out.
View 2 Replies
Jul 4, 2010
I am new to flash and have created my first flash video, a simple set of fading photos for my website front page.I am using Flash, Dreamweaver and Fireworks all CS3, The flash video is embeded in the webpage and works fine in preview mode in Dreamweaver but does not appear at all in the uploaded webpage.The flash video works fine through the link on the webpage.I have uploaded the AC_RunActiveContent.js script to a scripts folder and to the folder where the webpage is and also the folder containing the flash video file.
View 8 Replies
Jul 30, 2009
There is a number of posts but no solution to this issue. I am using alducente web service class to make SOAP calls to a WS from flash and it works perfect in the Flash IDE. When I publish to my server it just hangs.
I have a crossdomain file allowing all headers and domains etc. no luck.
View 0 Replies
Nov 16, 2009
swf used to show currently playing song from an xml file. fla checks any change in xml and updates immediately. this works fine locally but not online.
actionscript:
import flash.events.Event;
// imports flash events for the ENTER_FRAME event //
[code]...
View 1 Replies
Dec 6, 2009
I'm trying to load xml files on another domain on mine. This code works locally but not when i post it to my server. [code]...
View 0 Replies
Apr 2, 2007
sendAndLoad works locally but not on site My sendAndLoad PHP Code:
[Code]...
View 1 Replies
Aug 22, 2007
form/php works locally not online posted this before but no luck. it just doesnt make any sense.. same swf and php. php is sitting on my server. when swf is tested locally it sends an email. when swf is uploaded next to php it doesnt. it is driving me CRAZY.
should also say, i have field validation within flash.. so once all fields are accurately filled the submit button loads the variables from the mc that contains the text fields and sends them to the php.. once that is done, it clears all text fields and the submit and reset buttons and loads an acknowledgement text. this happens locally. when online the submit button does nothing of the sort.
View 3 Replies
Jul 16, 2009
I don't know if anyone else has had this problem, but I've created a flash project that works fine on my computer locally. When I take it to another computer(I've tried 3-4), my keyboard events are not working. I used Actionscript 3 to create the file. I've checked to see that the other computers had the latest version of Flash player, but it's still not working on those computers. Does anyone know why my file may not be working? Is there a specific plugin/download I need to have to make my files work?
View 1 Replies
Jul 7, 2010
i inherited an old as2 mp3 player. i'm trying to read id3.artist from the mp3 playing. it gets it and displays fine locally but as soon as i put it on a server it always returns 'undefined'. do i need some kind of a security file or something to read the id3 info?
View 1 Replies
Mar 10, 2005
I downloaded this mp3 player[url]...
I havn't modified the AS, only the vplayer.xml and the size, colors of the player. Now when I execute the swf file itself, the player works just fine, but it will not work embeded into an html file, the player says "Loading playlist, Standby"
I'm trying to figure out the problem, but since I'm a total AS n00b, I'm not in a position to troubleshoot the problem, so here's the webpage[url]...
View 1 Replies
Mar 31, 2011
I was wondering what is everyone's experience are on why a network request would work in FlashCS5 and in a browser locally but when i post it online it fails.The survivorId is sent from the string query. Both tests were done calling a network database.I've tried the following:Outputing the survivorId in a text field and seeing if the parameter variables were being sent correctly.Set the "Networking Only" option in the publish settings.Also is there a way to output trace actions from browsers for more in depth debugging?*EDIT: I have recreated the bug locally in a browser. Without trace actions i don't know if i can figure it out.*EDIT2: That bug only showed up because its from localhost (Apolligies, this is just wierd)Heres My Code, There is the "Stage" then it goes "localSurvivor"(movieClip) then in side that localSurvivor movieclip the "lPlayer" class is addChild() to localSurvivor MovieClipStage-> localSurivor-> lPlayer(survivorId);On the stage is this code:
//Set localP Id
var survId:Number = root.loaderInfo.parameters.sId;
//Object(root).informationTxt.text = survId;
[code].....
View 2 Replies
Mar 17, 2009
I finally finished my game and now whenever my game communicates with my php file/mysql database it fails when the file is being run off the server, but somehow it works fine when played locally.
Here is some sample code:
(This works locally, hence the full url for the load function. But it does not work on the server which I thought was strange.)
Code:
startupvars = new LoadVars();
startupvars.load("http://alexville.com/alexvillenetwork/startup.php");
startupvars.onLoad = function(success){
if(success){
[Code].....
View 1 Replies
Mar 31, 2009
I really want to finish this project that I'm working on, but this stupid problem keeps holding me back.
When I try to Load variables from my PHP file on my webserver from my local computer everything goes fine. But when the swf file is actually on the webserver the Load function fails to return any result with no error.
Here is my code:
Code:
Stage.scaleMode = "exactFit";
startupvars = new LoadVars();
startupvars.load("startup.php");
[Code]....
What happens after this code runs is that the text boxes dont get filled with ANY text, not even the Logged In As before the variable. So I guess the "startupvars.onLoad = function(success){" code is not being run.
View 1 Replies
Feb 5, 2010
There was always a flash movie on the homepage and it worked fine. A couple days ago I replaced the movie with a new one and added a .swf to the portfolio page as well. On the portfolio page, the movie is layered behind a series of transparent .pngs that link to their corresponding lightbox designations. The movie just plays, there isn't any interaction this way, atleast not in flash.
The problem: Everything works perfectly fine locally on all browsers and not at all on the server across all browsers. I have seen this problem before and read alot of posts about it.I know I have the proper scripts files. I've re-saved flash movies, changed their location within the site, published them with the appropriate settings, nothing seems to do the trick. Whats worse is that the lightbox doesn't even work online and it runs fine locally. Infact you cant even click on the .pngs and they aren't positioned the same with the css as they are viewed locally. I've overwritten the css with the up-to-date stylesheet many times as well
View 5 Replies
Mar 30, 2010
I'm using BulkLoader to load a single XML, parsing this, extracting out a list of images on another server (amazon), adding them to BulkLoader and loading them in.
this all works great running in the Flash IDE but as soon as it's uploaded the xml loads, parses BulkLoaders starts but non of the images load.
I assume it's a security issue but linking to these images from the local or from a html page works fine just not from Flash from a server.
View 4 Replies
Apr 11, 2010
I have a function triggered by a button click that searches through an XML file for an e-mail address (entered in a text field) and returns a match or no match. When I run the swf locally it works fine, but once the site is posted it no longer works. Locally it is connecting to the same xml & php files that it uses online.
View 4 Replies
Jul 26, 2011
I created the movie in a new folder, so I owuld have all the files... fss.html, fss.swf and MinimaFlatCustomColorPlayBackSeekCounterVolMute.swf I uploaded all these to the server.....
[Code]....
View 5 Replies
Nov 9, 2010
Mainly because I have it ALWAYS working locally, when I test in a browser, but the moment I deploy to a server it stops working.
I've added trace commands and confirmed that ExternalInterface is in fact available before adding the callback, and an alert command in the javascript method correctly identifies the flash object. I also checked and allowscriptaccess is set to 'always'.
Could it have something to do with the flash being served on a remote server?
View 1 Replies
Feb 15, 2012
I have created a painting app and when the user want's to save his drawing he simply hits the save button and a dialog pops up - or should do.
When testing locally on dev machine it's no problem but whenever the app is loaded in a browser it won't work. Even if I load the local SWF file in a browser it won't work.
The following code is what I use to save the file and as said it works fine locally but whenever it goes into a browser it dosen't.The save dialog simply never pops up.
var bitmapData:BitmapData = new BitmapData(canvas.width, canvas.height);
bitmapData.draw(canvas);
var jpg:JPEGEncoder = new JPEGEncoder(100);
[Code]....
View 1 Replies