ActionScript 3.0 :: Repeat Loading External File?
Jun 25, 2009
Loading from external file works - but only once. I want to wait a few seconds, then load the data from a php file again. I use a timer, it works perfectly. I get the message 'refreshing...', no problem (you can see it in the code), but the file doesn't load again. Here is my code:
Code:
...
var myRequest:URLRequest = new URLRequest("get_data.php");
var myLoader:URLLoader = new URLLoader();
var myVariables:URLVariables = new URLVariables();
[Code]....
View 4 Replies
Similar Posts:
Jun 22, 2009
I would like a flash header on my Wordpress blog that will load images at random by way of XML list from a folder on my server. I'm undecided as to whether I would like it to just randomize on refresh, or actually be a slideshow of sorts that would go through several images on one page load.Alternately, instead of a list of files in the XML file, I would prefer the flash movie to be able to pull the images without having to specify them by name, so that I could ultimately continue to add images to the folder without affecting the script.Also, if it does work as a slideshow, I would like to ensure that no one image would repeat itself back to back, or possibly before it went through all the rest of the images
View 3 Replies
Apr 11, 2009
loading external php file,this mean,when we load the file all info at php will load actionscript in swf file.
View 2 Replies
Dec 8, 2009
In first frame of my movie I've got this:
PHP Code:
loadVariablesNum("produkter.txt", 0);
import TextField.StyleSheet;
var myCSS:StyleSheet = new StyleSheet();
[Code]....
and a dynamic textbox called "myHTML". If I name 'var' on this textbox everything works fine, but I want to write it in actionsscript instead. Where do I write that? (I have 3 different vars in the text-file)
View 1 Replies
Jun 28, 2006
I'm calling an external xml file and loading it into Flash. I can only pull the varables out in the onLoad function. Here it is.
var courseXML:XML = new XML();
courseXML.ignoreWhite = true;
courseXML.load("presentSlidesOne.xml");
courseXML.onLoad = function(bSuccess:Boolean):Void {
[Code]...
View 5 Replies
Feb 24, 2011
I'd like to load external .swf file after clicking a button, so the new file replaces current one which is pretty much the same but in different language. Here is the file http:[url].... I'd like the little red&white button to do the work.I though this code would do the job, but something is missing here:
FlagPL_btn.addEventListener(MouseEvent.CLICK, webEng);function webEng(event:MouseEvent):void{windowLoader.source="AyeAyeMedia FOTO VIDEO AUDIO
View 4 Replies
Apr 12, 2011
I have external actionscript files that I call like this:
#include "../events/allevents.as"
But if I want to inport the full URL i.e. #include [Url] it does locate the file although it is the correct URL. How can I set this up so it always calls the server as and not my local as file
View 3 Replies
Oct 3, 2010
I am building a SWF player which loads external SWF's. Rite Now. I could call the external SWF using URLRequest.
but I am getting 2 problems How to run the SWF with the frame rate of the actual SWF movie. How can I know the frameRate of external SWF dynamically from within AS3. I have set a layer of 450px by 350px. How do I scale the external SWF with showall property to fit in the layer.
View 1 Replies
Jul 31, 2009
loading another file, in this case an .spt file. how start this code. Its a file that can be loaded from any PC and not just a file in the same folder, I don't think using a URLLoader would work, because the .spt would have to be in the same folder, and thats not what I need.
View 0 Replies
Jul 3, 2006
Is there a way to _xscale and _yscale external .swf after loading them? Is there a way to 'talk' to the external .swf file after loading and placing it on the stage? By this I mean: will I be able to send variables/commands/functions back and forth from the playing movie and the external .swf file?
View 6 Replies
Apr 8, 2007
The .swf is still very very basic as of now, but im making a little file that keeps you up to date with NYC weather. The problem is it has to read off an external XML file at: [URL]
I tried using the tutorial on kirupa.com with using a .php file to act as a "middleman" for this. First I tried the tutorial at Adobe's website but that had no effect, and neither did the tutorial on Kirupa... Mind you I've tried this locally and it worked fine, when i upload it to the web it never loads the xml file.
I attached the .fla and .php file to this post, you can see the .swf at work (rather, not working) at:
[URL]
View 1 Replies
Jul 13, 2007
I'm having a problem loading external swf files into a main Swf file. For example i'm working on my companies website, i created a slideshow with thumbnails. Within this slideshow, there is a stop and pause slideshow buttons. The main SWF file is my navigation buttons that call for each category (external SWF file). if i play the side show when i click on another category another slideshow swf file opens, but the slidshow plays automatically, when it isn't supposed to play automatically. After that i can't pause the slideshow. I was wondering why it was doing this. But if i load a SWF file and not play the slidshow and choose another catgory everything is ok.
View 3 Replies
Nov 23, 2007
I have seen a tutorial on this, but it was very un-thorough and it didn't have it the way I was looking at. Is there any way to load individual variables from a .txt file, like so:
[level 1]
enemy1=5
enemy2=10
[code]....
It's done in some other Flash games and in Soldat, and it would make scripting ALOT easier as I can change all of the variables without loading Flash.
View 4 Replies
Mar 25, 2009
I've been going through online tutorials and so forthand yea I'm still a newb. I have a flash site I'm designing and this is probably a simple answer. I've figured out how to incorporate the external flashes using buttons and loader, please see the script below. The main problem I am having is I want to load my 1.swf file as the main home page. When I load the flash is comes up empty instead of loading the swf file when the flash is first opened. I can use the button to load it back, but how do you get it to appear once the flash is initailly loaded instead of just pulling up a blank page?
Code:
on (release) {
//load Movie Behavior
if(this.home == Number(this.home)){
[code].....
View 7 Replies
Jul 1, 2009
I have a main flash file coded in AS3. This file acts like a container that loads on different AS2 files depending on user selection. This container file is set to fullscreen mode and the stage is aligned to center if the user screen is too wide.
The problem here is that when it loads the AS2 file, it causes the container stage to align left. I tried loading an external test AS3 SWF and it loads fine. Only when it comes to loading the AS2 files will the stage aligned left. I suspect is the AS2 files have its stage aligned to left and I don't have access to these AS2 FLA files. I only have the SWFs. Is there anyway I can control this from the AS3 code?
View 2 Replies
Feb 25, 2010
I'm creating a site but I want to use external actionscript in it.
what AS do I need in my FLA and how do I create a trace message in my AS file?
View 4 Replies
Mar 17, 2010
I am trying to load an external SWF file, for some reason (can't figure out) my code doesn't work
[Code]....
View 1 Replies
Mar 2, 2005
I just followed the tutorial [URL]
i use the font arial but i want it bold. how can u do that without change it in the txt file like this <b> </b>
View 2 Replies
Dec 13, 2003
i have made this mc and when you click on it, it loads an external mc _root.blank3.loadMovie("mc.swf")Here is the actionscript when clicked on:
[AS]
onClipEvent (enterFrame)
{
[code]......
View 12 Replies
Mar 21, 2005
i have been having this issue with loading in this external swf file.
so, i did the trace thing, and this is what i got:
[quote[
_level0.whoweare.instance26.clients.pcontainer
[/quote]
[Code]...
so, i'm not sure if i need to add some diffrent (lack of a better word) targets to make this bad boy work.
View 4 Replies
Apr 28, 2009
what ultimately I want is to click a button and text will be displayed in the text field loaded from an external .txt fileI've adapted some code i found online:
var myTextLoader:URLLoader = new URLLoader();
var myTextField_txt:TextField= new TextField();
myTextLoader.addEventListener(Event.COMPLETE, onLoaded);
[code].....
View 7 Replies
May 17, 2009
I've got a problem loading an external text file into a text field.The text field is named: myTextField_txt.It's Dynamic and multiline. I want it to load a text file called: myText. txt. It's in the same folder as the flash file.This is the code I currently have on my text fields key frame:[code]After moving some code around I managed to stop any error messages. But the text will not show up in the text field.
View 4 Replies
Sep 20, 2009
So, I can't remember and it's not working. I basically want to add this to my text file:
<a href="[URL]" target="_blank">Go here</a>
Which obviously doesn't work. what's the easiest way add HTML tags to a TXT file without changing the way the files being loaded too much?
var filename:String="text/home.txt";
var loaderText:URLLoader = new URLLoader();
var myRequest:URLRequest=new URLRequest(filename);
function loadFile(filename:String):void {
myRequest.url=filename;
loaderText.load(myRequest);}
loadFile("text/press.txt");
View 1 Replies
Dec 11, 2009
My flash application has lots of resources which will change all the time. In order to keep the the user from having to download my main .swf file over and over again, and in order to keep the main file's size low, I would like to put the resources into separate .swf files and load them dynamically from a url using a Loader.
Once downloaded I would like to extract the classes that are in the resource swf and use them in the main swf. Can anyone share some code for doing this? Note that I am not just interested in using a symbol from the resource swf. I would like to use a class, with all of its methods and everything, and my main swf does not contain the class definition. Only the resource swf does.
View 3 Replies
Nov 8, 2009
In my flash, the socket server returns some xml data that I need to parse, but it seems that the only way to start the XML object is with the XML.Load() which loads an external file, but my XML file is already loaded into a variable
trace("raw: "+msg);
msgArea.htmlText += "update remote player loc";
var playerLocXMLOb = new XML(msg);
[Code]....
View 4 Replies
Jul 19, 2011
I tried to load an image in the same folder of the flash but it didn't work.
package {
import flash.display.MovieClip;
import flash.net.URLLoader;
[Code].....
I tried many ways but still didn't get it right T_T
View 3 Replies
Jan 14, 2009
I have been searching for information regarding the use of loading an external xml file from a variable (string) that contains the location of the item and passes it to the document class.
I receive the following error:
Error: Error #2136: The SWF file file:///C|/Documents%20and%20Settings/xmikxm0/My%20Documents/workingDocuments/freelance/brightStar/webSiteStructure/core.swf contains invalid data. at BuildSiteElements/::frame1()[BuildSiteElements::frame1:2]
FLA code:
ActionScript Code:
/* variables to load XML */
var BuildItems_obj:BuildSiteElements = new BuildSiteElements();
BuildItems_obj.loadSiteXML("templateBuild.xml");
[Code]....
fla is in same folder as class and the fla compiles the swf in another location (outside the folder and pulls xml from the xml folder).
View 3 Replies
Oct 26, 2009
i have been given two sources for a weather data feed:
[URL]
i would like to 'load' the text similar to loading xml i have seen several articles on reading variables from .txt but they all suggest the .txt file needs more formatting - whilst this one is just seperated by lines.
View 1 Replies
Oct 26, 2010
I would go about loading an xml file from an external domain.I am trying to create a swf file that loads a rss feed. I have found that you must create a proxy for the xml though I am unsure how to go about this.
View 0 Replies
Nov 17, 2010
I have built an image/video scroller in Flash 8. It loads images and flv files from an external xml file. It allows you to scroll through the images using a left and right button. The image in the middle is clickable, and when you click on it, it loads the cooresponding flv for that image and plays the flv. It all works great, except from time to time, the video control components become unactive - they are there, but do not work. Currently, I just have the playpause button. When this happens it becomes active again at the end of the video. It seems to happen more frequently in FF than in IE. If you contact me I can give you a link to a page where this is working.
Here is the main code:
import mx.video.FLVPlayback;
var picnums;
var my_format:TextFormat = new TextFormat();
my_format.font = "Arial";
my_format.size=14;
[Code] ......
View 0 Replies