I've got a simple text file which I want to read with LoadVars:
Code: &tekst=This is a test&
I'm loading it with LoadVars and let the text of one dynamic textfield be replaced by the 'tekst' variable.
ActionScript Code: stop(); var my_lv:LoadVars = new LoadVars(); my_lv.onLoad = function(success:Boolean) {
[code]....
This works offline, but online the text isn't replaced? This should work right? So what's wrong? All I've got is this one frame with code and a dynamic textfield.See attached files. The published files .html .txt and .swf are all in the same location.
in the tutorial with the code LoadVars(); like this one and this one, shouldn't it be important to have the capital L on LoadVars(); ?loadVars(); doesn't work.
I have a problem when I try to use the loadVars class in an ActionScript 2 (CS3) file. Actually, it works fine in the debugger but it doesn't work at all from a web browser (IE or FF).
This is my AS code :
ActionScript Code: _root.testURL = "http://REMOTE_SERVER_IP:PORT/FILE.html"; var myLoadVars:LoadVars = new LoadVars(); _root.info.text = "Loading...";
[Code]....
I can see "File loaded" in the info text field, but the file is not called (I checked the server log) when the swf file is loaded into an HTML page and displayed by a web browser. Thus, _root.sr.text is set to undefined.
I've created an extremely simple flash website. I need it to display some pictures and to keep the filesize down I want to load these images on demand. The images are hosted on my server in folders in the same directory as the website swf and the html file that initializes the swf.
I use the most rudimentary way of loading an image, it looks like this:
Code: var loadStart:Loader = new Loader(); loadStart.load(newURLRequest("images/start/screenshotstart.jpg")); startScreenshot.addChild(loadStart);
When I upload the website to the server it simply does not display the image, it's not loaded, the place where it's supposed to be is blank.
I've searched the site and there have been some threads with similar issues but the answers given just don't seem relevant. Something about cross domain policies, but all my images are on the same domain as the website swf.
I'm using LoadVars to load variable data into flash from a .txt file.Pretty simple - when uploaded onto a server, I can see the data loaded but no one else can, not even other accounts on my computer!Could this be a CHMOD permission problem? Could this a problem with my AS? A problem with directories? A problem with URLs?Anybody have a good method that simply loads vars from a .txt file and can also do it online?
I am totally new to actionscript (barely could set up the IDE environment for Linux). I have trouble parsing an xml file containing some namespaces. All the tutorials and samples i found online are not working for me. the file looks like this:
The problem is that it executes #Second before #First, which means that the object is not fullly loaded but the code continues nonetheless. Is there a way handle this? I have tried using a while loop, but this is ugly and makes flash crash. Is there any decent way to handle this, does it have to do with better code structure/program flow or is there a technical way to make it wait? Also note: This code is executed on the server side, which means there are no frames involved.
UPDATE:When projects get bigger, this gets very ugly, especially when you are retrieving mulitple things from a server, you have to use very deep nesting, you have to keep repeating the same code, example for buying a serial:
I cannot get a preloader to work with loadVars when I load an external swf into my main time line. I don't know what's going on. I just can't seem to get a value in my dynamic text field loadText to show up. I have tried tracing but I keep getting a value of NaN. I can't get the loadBar to animate in either. Here is my code:
var libLoader:LoadVars = new LoadVars(); libLoader.load ("external.swf"); bytes_loaded = Math.round(libLoader.getBytesLoaded()); bytes_total = Math.round(libLoader.getBytesTotal()); getPercent = bytes_loaded/bytes_total;
If I open the swf on my computer, it plays with no problem at all. When I upload and try to open the file in my browser, I click the initial image that takes you to frame 2 to play the video, and it just sits there blank and does nothing. Could anyone take a look at it for me? [URL]
The problem is that no matter what file name I try to load it does trigger the onLoadError but always the onLoadInit even though the file doesn't exist. Local it's working but not online. Here's the code:
import flash.net.FileReference; var jpgListener:Object = new Object(); jpgListener.onLoadProgress = function(file:FileReference, bytesLoaded:Number,
I created a custom google voice callback swf so someone could put in their phone number, and google voice will call them and connect them to me (essentially calling me). Everything works fine when i run it from my computer, but when I put it online it doesn't work.
The way it works is you put in your own phone number and name, then click call, and it rings the phone of the phone number you put in. This doesn't happen when accessing it from online though.
I've provided a link to the fla for your view, and I'll also post the embed code I have on my site.
I decided to try to use setInterval for myanimation, which is just a mouse trail.However, I'm trying to get teh mouse trail to be a dynamic mask.In my previous swf this was achieved by using a holder mc with the animation inside and then using this as the mask. But this time I just canpt seem to hit on the right way to get it to work. The code I am using for the mouse trail is:
Code: var i:Number = 0; var myInt:Number; var t:MovieClip;[code].....
in the function, but now the trail doesn't resize and the mask still doesn't work.
I've made a flash site and everything seems fine when I test it in flash and publish and run from my computer.However, when I upload it to my domain the external loader won't load my homepage initially. And I believe I've got a piece of script to tell it to do so.If you open up another page and return to the homepage it works fine.P.S I do have a preloader page prior to my homepageThe external loader script is:
ActionScript Code: //------------Initialisation-----------\ var currentPage = ("home_btn")
When i test my movie the buttons work fine they get the URL that i want but then when i upload it to my page it does not get the URL. Am i uploading it wrong??? I Uploaded the SWF to the Server and posted it that way is there more involved or did i do something wrong in the actual movie. [URL]
I am trying to figure out why my flash files work correctly locally but don't after I upload them. I am using Mac Flash CS4 and AS2. (They were CS3 files originally)
When I use Safari to view the uploaded files and check the Activity window it shows the files load but they don't show up. I have a main swf and others are loaded into it using:
I have a button object that I need to scale to align with the variable width of an array of images.However, when I set the width in code, the button does not actually become that width. Tracing out the width gives me the correct value, but on screen.. it's off.
I've proved it to myself by scaling the same button object manually in the properties pane and visually comparing. Both of the buttons below have a width of 410.
iv been having this problem with swf file iv created, it consist of images somewhat like a gallery. when played offline it works smoothly, navigating frame to frame / image by image. iv used AS3 to compose the animations in my flash file. now my problem is when its uploaded online, the swf is shown but once iv clicked on a link to proceed on showing the gallery it lags and continously loop when it should actualy stop on a frame and wait till the next button is clicked to procced to the next image. plus the animation iv added in doesn't seem to working at all.
i am truly a newbie in as2, i have test the script in local flash "Test Movie" everything was perfect, however when i try to put the files into my remote server, the getBytesLoaded()return to "0" and getBytesTotal() return to "-1" and the loader componentscaleContent=true function was not working also,until i press "F5" refresh button, then everything back to normal, i dont know what is going wrong with my scripti am using Flash CS3, as2.0 and ie7 and the dimension of my loader is 100x100 px
I'm editing this template but there is a problem, when the page is online the scroll sometime doesnt work.URL...I don't understand why, in the swf everything is perfect, but when the page is online if we test the scroll sometimes it simply doesn't work.[code]
i am using flash 8 professional and making my portfolio site using xml with flash. when you click the red buttons on the right, thumbnails appear on the left (and when you click those, more thumbnails appear, and then you click those and the image appears.) on my machine it works properly, BUT when i upload it, the thumbnails appear and then erase themselves (all except the first two). it's inconsistent and totally weird. i changed some of the code, tried messing with the publishing settings, and re-uploaded and nothing changed. a friend who works at an actionscript company said it doenst make sense that it works differently on my machine than online. she also confirmed that the way i embedded the swf in the html is correct
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
I have a swf that is pretty complicated, you can interact with the page and go to different keyframes and it stops and/or starts depending on buttons, but I want to put it in a fla or something so I can put other swfs next to it and build it up and put several of them together as one.
I don't care about making it too complicated, I just want one interactive swf to go to the next compiled swf when that movie ends, but when I try importing it or loading it it just runs straight through without stopping or paying any attention to the scripting.
I am trying to more between frames using the data returned from a node n_EventID in an xml, when the node returns "1408" I want to move to frame 1 but if it returns anything else I want to move to frame 2. The part where the code moves to frame 2 seems to work perfectly but I can't seem to move to frame 1 when "1408" is returned.
xmlResultFinish = new XML(); xmlResultFinish.ignoreWhite = true xmlResultFinish.onLoad = loadXmlResultFinish;
I'm having a problem, where random IE's are not able to display my .swf file. All the IE's are IE8 with the latest flash pluggins and all security's are set at Medium, however some IE's get just a grey box and other's get the full flash file. What's going on? It works fine in Safari and Firefox of course, but why so much difficulty with AS3 Flash9 in IE? here is a link to the site, and it's the big image changer at the bottom of the front page.
But my proublem is that I have a flash presentation.The defalt for moving the slide screens back and forth are left and right arrows.It works fine when tested or even the .swf fileBut then the left and right buttons don't respond when I go to fullscreen.
Is it common for AS3 apps to not work in IE? Is there a way to make them work? I have a movie clip in my library linked to a custom class Main and I have nothing on stage. Just one frame. Everything is built inside that movie clip. I add that movie clip to stage through a document class and everything works perfectly in Firefox and Chrome but when I open it in IE, it's just a blank page.