ActionScript 2.0 :: XML Load Image - Use The Same File Though To Add An Extra Variable
May 25, 2007
I'm trying to modify an XML jukebox by adding an artwork functionality to it. The problem is that the jukebox is a component so I'm not able to pull it to pieces. I would like to use the same XML file though to add an extra variable (is that the right term?) called artwork. Here is the modified XML:
i am trying to add extra images to the photo gallery attached. I would have thought it is easy and it seems so. I add an extra image to the gallery. I publish it. The html file shows the extra image in the gallery but the swf doesnt. driving me crazy, cant work it out?
I'm trying to combine PHP/SQL and Flash. I've got a problem now. I want to load a variable that contains an url to an image. so the variable is like this: [URL] Now I want flash to load the image, not the text. The variable is called 'img1' but the loadmovie function doesn't work when I put it in.
I have a List which uses a an arrayCollection as dataprovider and an itemRenderer to display some things but how can i pass an extra variable to this itemRenderer?
i want to load variable from text file to my main movie (swf file).what should i put in the second parameter of the function loadVariables ("target" parameter) - should i insert _this? _parent? _global? (nothing works.
I want to have an swf load an image file in an image container within the swf from the querystring. 1. In the query string I'd like the extension of the image file to not show:
2. In the swf I might have more then one place where the same howdy.jpg loads, but in different sizes. Which method would keep the aspect ratio of original and resize to fit varying container sizes?
3. I have some javascript parsing code with an swf example that I got from this page. [URL] But when I tried to alter the fla for my use it didn't work. I wasn't able to find 1 line of actionscript in the query.fla.
I have FlashVar sending variables from php to Flash, and that part works fine, flash gets the variable.BUT I have a gallery, that should load an image, and the image path is in the variable. So basically, the part of the URL field in loadMovie should be the variable's value.. That just doesn't work I'm kinda stressed out because I have a really short deadline and I was stupid enough to assume this will be doable.url..Is there any way to achieve getting the image to load into the swf using the variable?
I'm loading a Flex 4.5 module (it's a SWF file) using a PHP code like this: $module = 'modules/'.$_GET['module'].'.swf'; if(!file_exists($module)) { $module = 'error.swf'; } $size = filesize($module); $contents = file_get_contents($module); header('Content-Type: application/x-shockwave-flash'); header('Accept-Ranges: bytes'); header('Content-Length: '.$size); echo $contents; And it works very well.
Now I want to get some extra data to load and populate the module with that data in just one request handler, something like: private function requestHandler(response:???):void { var data:Array = response as Array; mySparkModuleLoader.load("", data[0] as ByteArray); myController.load(data[1]); }
I was trying to do it with AMFPHP but the ByteArray seems to be broken or something because it doesn't show up, but the rest of the data is fine: return array( 'hello world!', new Amfphp_Core_Amf_Types_ByteArray(file_get_contents($module)) ); Maybe creating a multipart response like [URL] and handling it?
I am trying to adapt the gotoandlearn carousel to fit a dog rescue's needs and learn something in the process. What they want is for a 2nd image to load when the first is clicked on. (so it zooms up and a 2nd image loads that is also contained in the XML file).I was able to get the 2nd image's instance to appear and disappear properly, but I can't seem to get anything to load into it no matter what I do[URL]
I have found out that one can use an extra parameter in the embedding in order to load another xml other than the default xml file:<embed src="veppa_photo_album2.swf?xml=path/to/custom.xml" ....</embed>I was wondering how i can read this xml file in flash.
I have an array holding 'image' and 'name' name loops fine and populates a load of movie clips underneath each other... i need for when this name is clicked to load an image in another movie clip (image name comes from the array).. the code i have works but it only pulls throught the last item of the array which points to a problem with 'i' not being carried across the functions..? that is the result of my investigation *smokes pipe*
I load a variable from a txt file.The dynamic text box has html turned ON.All characters are embeded.Here's the problem:In the txt file I have a text that contains an html link:
myVariable=Hello! This is my text! Click <a href=http://www.uachq.cjb.net>here</a> to visit my site!
However the swf displays everything up to "Click" ie before the link:
Hello! This is my text! Click
And that's it. I heard that Flash can recognize a simple html command like <a href> but this seems odd to me... Why isn't this working?
how to set up the URLRequest to load an external image to a movie clip that is being used in a Drag and Drop event.
I have successfully implemented the drag & drop code to my design but I would like to improve it by successfully loading external images to those objects that are being dragged around.
I can't figure out how to get rid of extra white space in the browser at the top of a swf file. It looks fine when I preview the file, but when I do publish preview in flash/ try to incorporate in HTML, there's an extra 1/4" at top of window.
I have an external SWF file that is a dynamic chart. It normally requires (in the object and embed tags on the HTML page) a variable passed to it that points to an XML file.
What I want to do, is create a "container" program that simply has a few buttons, that when clicked load up that same chart.swf and point it to a different XML file.
What I can't figure out is how to get that external file to recognize it's dataURL parameter that it normally receives off the html tags. (BTW, I can't edit that chart.swf, it's a purchased product.) I tried setting a root variable of the same name in my container to point to a new XML file, but that doesn't work. I tried setting that variable, and using loadMovie with a GET to pass it the name, but that just looks for a string that flash seems to be interpreting literally, so it can't locate the file at all (I.e. it's looking for the literal name "chart.swf?dataURL=datafile.xml")
I have an external SWF file that is a dynamic chart. It normally requires (in the object and embed tags on the HTML page) a variable passed to it that points to an XML file.What I want to do, is create a "container" program that simply has a few buttons, that when clicked load up that same chart.swf and point it to a different XML file.What I can't figure out is how to get that external file to recognize it's dataURL parameter that it normally receives off the html tags. (BTW, I can't edit that chart.swf, it's a purchased product.) I tried setting a root variable of the same name in my container to point to a new XML file, but that doesn't work. I tried setting that variable, and using loadMovie with a GET to pass it the name, but that just looks for a string that flash seems to be interpreting literally, so it can't locate the file at all (I.e. it's looking for the literal name "chart.swf
I'm using flash cs5... I've made a file uploader and it works great, only problem is it makes this textLayout_1.0.0.591.swf file (in addition to my actual swf)... is this really necessary? I have an embedded font that I think is putting this here and the whole thing doesn't work unless this swf is here.
I'm trying to build a workaround for embedding my (downloaded) flash videoplayer. (it's the JWplayer...)
At the moment, when somebody wants to embed the videoplayer they have to include the swf with all the added flashvars (url...). That's messy, and it feels a bit risky... people who know what they are doing can also just remove the plugin and other added data, resolving in me not being able to track pageviews etc.[code]...
Turns out that, when I use file_get_contents on a regular test file, info.php, that responds through a $_GET['var'], the above stated code works, but when I use it on the flashplayer, it doesn't...
As in: the flash file does not seem to be accepting (or responding to) the added header variables...
What I want to do is load the contents of a file and sent it to an mxmlc compiler as an argument parameter. I can load and read the contents of a file using loadfile and setting a property value say propery="filecontent". But the problem is I can pass it into the mxmlc (flex) compiler. I'm not able to pass it (tried with ${filecontent}) to the arg line. Its gives an error: "value contains unknown token 'filecontent'" How will I pass the contents of the file as a argument value to a compiler argument? Edit: The problem is with the include-resource-bundles arguments. When using command line it works. But using ant build doesn't. Do we need to manually provide the name of resource bundles by generating the resource file?
which doesn't work and gives and error -> command line: Error: configuration variable 'include-resource-bundles' value contains unknown token 'resources'
I purchased template and trying to edit it, there is page called portfolio i managed to make it load images from external files, but when trying to do same for text description no success. I tried different techniques i found online, but none work, only work when i place textbox on main scene but never works when i place it on Portfolio page 3 (click portfolio button then click page 3) to go there in flash find "scroll2_4" page trough library right click and chose edit. I need to load description from text for items on that page. I really desperate now after many hours of failure. url to download fla file i working with is here [URL] i edited it to delete everything thats unrelated to question. Also secondary optional question how i create more pages like page 4, 5 etc?
I want to pass a string variable to a SWF so that I can specify a XML file to load without republishing the SWF. When I assign the string variable to a textfield it is correct.But when I use that variable in the loader it does not display the XML from that file.You can see below that I commented out the string "lesson_11/images/0301_objectives.xml".If I put this string in the loader it works, if I use the string variable in its place it does not work.
Code: var xmlFileToLoad:String; var myQueryString:Object;
I have a block of html text which is displayed to the user in a TextArea. Currently, the I have embedded the HTML as an XML object within one of my classes, but this seems like a terrible design. I would like to put the HTML in an embedded file and load it into an XML or String object.
I've tried to search for how to do this, but my searches return information on embedding images and fonts, not text which can be loaded into Strings.
Is it possible to embedded text or xml files and load them into variables in Flex?
i want to load variable from text file to my main movie (swf file).what should i put in the second parameter of the function loadVariables ("target" parameter) - should i insert _this? _parent? _global? (nothing works...)
I'm trying to load a radar image over a google map. The problem is, I'd like to load the image from a local file. I understand how to do this remoteley via a url, buit not from a local file. I've read something about embedding, but I don't know what embedding means. I'm going to need this image to change, and eventaully want to have a loop of images playing over the map. Below is what I have so far. You can see I've commented out the line with the url loading, and have a fail attempt at loading locally below it.[code]...
I am trying to load a variable from a text file named "variable_file.txt" The variable in the file is "var" and I am trying to assign the word "value" When I run the following code: