ActionScript 3.0 :: Loading External Php Into Flash?
Dec 14, 2009
How would I go about loading php in Flash. I have read tutorial after tutorial and basically all the ones I find suck. I can't find any detailed tutorials for doing this. So could somebody explain in detail how to do this or point me in a good direction? I don't know much about actionscript and I don't plan on doing much more with actionscript then just loading external php files.
I spent almost a week trying to figure out how to unload a currently loaded swf using its button and loading a new swf... I have three files, a main.fla, file1.fla and file2.fla. In my main.fla, I have a code which loads the other two files. If i will click the "unload" button in the file1.swf, I would like the main.fla to unload the file1.swf and load the other file, file2.swf. Here is the code to load the file1.swf:
[FMX] I am having trouble loading an XML file on an external server into my flash movie when it is uploaded. The data loads in fine when the flash file is on my local computer with the xml file on a server. As soon as the flash file is uploaded the XML data will not load in.
I've been trying to figure this one out for a couple of days now, and it's driving me nuts! I'm new to flash (I'm using CS3 with AS2), but I've managed to convert a template into an almost finished site. My problem is this: I've made an external slideshow swf which works fine if used by itself. It's saved as a flash 7 AS2 according to the program (Aleo Slideshow Gallery Maker) used to generate it. It's in the same directory as the main swf file. I'm not sure of the code to load and play the external slideshow swf with a button in the main swf file. Do I need to change the html as well as the swf script? I've tried all sorts of things, but I can't figure the script out on how to finish the flash to include the slideshow. The SWF files inquestion are attached - I'm just using sample iamages at the moment. When I go to the gallery page, I want to be able to click on the fly to load and play the slideshow.
I am trying to find simple code to load an external text file to a CS4 .fla file. (Actionscript 3) I have found numerous tutorials and script on google but every one of them gives me syntax errors... I just want to be able to change the text without having to republish the swf every time...
I'm creating an all flash website. My main page has a image mc on the root timeline, in a set location and I'm attempting to make that image change whenever a menu button is clicked, by loading an external swf.I've followed the "Loading Techniques" tutorial here on Kirupa for the AS and the image change works well, except for one thing...When I click on my menu buttons the images change as I've assigned them, but there is a flash of the original image which is sitting on my root timeline. How do I get rid of the original image, upon each click of my menu buttons?
I have been trying to get text to load into Flash from a .txt file. Right now I have a dynamic text box set up with an instance name and I am using this code:
homeContent = new LoadVars(); homeContent.onLoad = function () { homeContent_txt.text = this.content; homeContent_txt.multiline = true;
[code]....
But when I load the page the word "undefined" shows up inside the text box. Not the actual text from the .txt file. But that is the only thing I get. No error or anything else.
Im having trouble loading external flash files into another flash file....Iv read so much about it but all the tutorials i found are missing so many details....like...how do u target the external flash? Also i would like a movieclip button to open the external flash file..
i have been working with a few basic flash presentation to learn the ropes. However, I am working on a flash file which, when compiled, pulls in flash content from elsewhere in the Parent folder. I have read through the FAQ and cannot find the answer, as there doesn't seem to be any Actionscript which handles the importing of these external files.
Are there other methods that I am unaware of? I need to edit these other files, however I find it more beneficial to first understand how the Flash file is compiled before editing.
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);
This is a AS3 project created in FlashDevelop. It targets flash player 10.[code]...
create such a strange loop and error? I´ve been trying to solve it all day. Maybe some kind of settings in FlashDevelop or parameters to the MXMLC compiler?
I'm using the Loader class in AS3.0 to load external images. I need to load a random image each time and I'm using a timer to load a new image after 5 seconds or so. When I load the first image,
[Code]...
The problem is that my fading routine does not work. One image loads, and the next one appears straight away when it is finished loading.
My code feels like a bit of a hack...is there a nicer way that actually works...?
I've been using flash functionality in order to fill in dynamic text variable with an external data. The script works fine, except that now runs very slow - around 30 seconds or so.
I'm quite new to flash and got stuck on a problem involving: loading external movie clips and file paths.I have 5 swf files and want to access them from one main navigation screen.[code]It fails after a few click because the file paths get duplicated..[code]Can any of you Flash gurus point me in the right direction?
I'm new to using AS3.0 so I'm building the audio/video page for my group's website and I already have a seperate mp3 player and a video player I want to put on one flash file. I would just paste all the layers for both players on one file but the mp3 player is AS2.0 and that causes a problem. I tried to load both swf in AS2.0 but the only way I know how to do it is through an on release script from a button. I want the swfs to appear when loaded without having to use an on release function. I'm using the xspf player [URL] and this video player I found from the techlabs. [URL]. I tried to take an easy way out and just insert both swfs onto my dreamweaver file but when I test the site the video player won't appear.
I've grabbed this code from the tutorials section and it works fine. I'm now trying to adapt it so that I can use it in a function. I'm calling the function from a deeply nested button and trying to load the text into a deeply nested textfield. I've located which part of the code is giving me trouble but am having trouble sorting it
function contentLoad (contentTitle, contentFile, contentId) { _root.mc_contentMain.mc_bodyText.txt_title.text = contentTitle; // text loading function below
I am having problems loading an extenal jpg in the same folder as my__site file into flash 5 into a draggable mc called 'draggable'. I can create a draggable mc called 'draggable'. Within that I have another mc called 'slide' (what I will want the external jpg to load into) on a seperate layer from the graphics that make up the draggable window. Everything works up to this point. Do I give the mc 'slide' an action to load the external jpg? or the layer 'slide' is in? I have been puzzling over the right code to write to get the external jpeg 'CH1_1.jpg' to load into the mc 'slide'
loadText.load("textfile"); //creating the loadVarsText function loadText.onLoad = function() { dynamictextboxname.text = this.the=whatever text in notpad; };
how to load my external text in, i have it all set up. Its all being saved into the same folders etc. But still nothing.
I recently got the following code from one of your tutorials and am wondering why it is that when I try to change the .jpg images to .png images, the images no longer appear in the swf file. Does flash no allow .png files to be loaded.The reason that I need the files to be png is because the have to have a transparent backgroung.[code].....
I have 5 external flash files that i am trying to load randomly in from a seperate flash files (main.swf is trying to randomly load: Flash1.swf, flash2.swf, flash3.swf, flash4.swf, flash 5.swf)
this is what i have so far:
var myLoader:Loader = new Loader(); addChild(myLoader); var url:URLRequest = new URLRequest("flash1.swf"); myLoader.load(url);
it works in loading just one flash movie but im looking to have to randomly load from the five .swf's
I've been updating a flash-file for a company and now struggle to sort the menu system. This is how I would want it to work. Had they not used external xml and font swf files it would be done by now, but I have no clue how to include them in the script.
Basically I'm trying to come up with how to load an external movie located in the same folder as the flash file at various points of an SWF, but I'm not sure if this can be done.I've managed to load it using the following code (at frame 203 for example),
stage.displayState = StageDisplayState.FULL_SCREEN; var connection:NetConnection = new NetConnection(); var stream:NetStream; var video:Video = new Video(1280,720); var metaObj:Object = new Object();
[code]....
- The problem with this is unless i put stop(); in the Script it keeps repeating the swf from the start.Is there a way I can load this movie, stop the swf then continue the swf from that point after the movie has finished?
it took me so long to write this tutorial Well, here I go... Section 1: Introduction So you want dynamic content on your Flash movie. Sounds simple, right? Well let me tell it is, and well, it isn't. This tutorial assumes a basic knowledge of Actionscript, PHP and MySQL. If you have that, it's time to move on. Otherwise, I recommend you do some reading on the subjects... Section 2: Setting up your SWF to receive external data Loading external data into an SWF is a fairly simple task. Although the external text file method is probably the most widely known, it is by far the clumsiest way to get data into your SWF. Of course, this may be your only option of your server doesn't support MySQL/PHP! But for those of us who are fortunate to have these privileges, let me show you how Flash can get external data without having to create additional text files.
Dynamic text fields In order for Flash to get data from an external source, you need to make use of dynamic text fields. Simply place a blank dynamic text field on the stage and make sure you give it a variable name (NB: dynamic text fields have both an instance AND a variable names. In this case we want to focus on the variable name). Note the name you give to the field's variable name, as we'll need it when we write our PHP script. Once you have a text field setup, convert it to a movie clip symbol. Attach the following code to the resulting movie clip: