ActionScript 2.0 :: Loading XML Need To Be Dynamic

Mar 19, 2010

Was wondering if someone could steer me into the right direction or shed a bit of light on my problem.At the moment i am using the following code to display text from an external XML file.[code]The "site_eng.xml" means that it loads in the english version of the XML file.The problem is that i need to make it dynamic so that it can look at a different XML file in a different map - this is because i need to direct it to 6 different language XML files.Would it be possible to change the code so that it looks at an URL that ends with /movietexts ?[code]

View 11 Replies


Similar Posts:


ActionScript 2.0 :: XML Loading, Dynamic Buttons, Dynamic Text Fields?

Jun 7, 2006

I can't get the code to "know" which of the dynamic thumbnails has been clicked (by "know", I mean return an index value, say 0 through 7 if there are 8 projects, that I can use to access that particular project in the array of 8 projects in the rest of the code)... So if the third movieclip thumbnail were clicked, I'd like "2" to come up somehow... I've tried this code, which is kind of lame, I know, based off of the idea of each of the thumbnail movieclips' names ending in their index number:

Code:
//"this" is the button that was pressed; would return a string ending in
//thumberMC_<number of whichever movieclip thumb was clicked>
var: testString:String = this;

[code]....

Lastly, there's a dynamic textfield I'm trying to create that never shows up for some reason. Again, you could see in the FLA (in the "createDrawer" function around line 424).

View 9 Replies

ActionScript 3.0 :: Loading A Dynamic XML URL

Sep 20, 2009

I have an XML file on a site that I need to call from a flash movie. The XML file is packaged into a parameter, its actual url is generated dynamically and cant be called directly so instead of calling it like

var xmlReq:URLRequest = new URLRequest(http://www.someurl.com/xmlfeed.xml);

Im trying to call the parameter instead of the direct feed. Do I need to use a GET type method or something like that?

I tried defining a new String and then put in, instead of a direct URL, this variable string that I tried calling through flashvars but that didnt seem to help.

View 6 Replies

IDE :: Loading Dynamic Files On PC And Mac

Jun 9, 2008

When loading a file on PC, the location looks like this:

[Code]...

Is there a good work-around for this? Something short of adding a variable for the slash character that changes when a different OS is found? Also, I load XML that has links in it, so changing the links on the fly after they're loaded would be great.

View 1 Replies

ActionScript 3.0 :: Loading A Dynamic XML URL?

Sep 20, 2009

I have an XML file on a site that I need to call from a flash movie. The XML file is packaged into a parameter, its actual url is generated dynamically and cant be called directly so instead of calling it like

var xmlReq:URLRequest = new URLRequest(http://www.someurl.com/xmlfeed.xml);

Im trying to call the parameter instead of the direct feed. Do I need to use a GET type method or something like that?

View 2 Replies

ActionScript 2.0 :: Loading New Dynamic Text From A Dynamic Text Box

Jan 28, 2004

I'm relatively new to Actionscript, in fact, I just figured out today how to load text from an external source. I have another issue that I'm not sure how to handle. I have buttons for my main nav, a main text box, and a mini text box (both text boxes are loaded dynamically from external files). I want to have the mini text box load new external text files in the main text box. For instance, I have a button for music, which loads a list of songs in the mini text box. I want to be able to click on the name of one of the songs and have it load the lyrics in the main text box. I'm sure it's simple, I'm just new.

View 3 Replies

ActionScript 2.0 :: Loading New Dynamic Text From A Dynamic Text Box?

Jan 28, 2004

I have another issue that I'm not sure how to handle. I have buttons for my main nav, a main text box, and a mini text box (both text boxes are loaded dynamically from external files). I want to have the mini text box load new external text files in the main text box. For instance, I have a button for music, which loads a list of songs in the mini text box. I want to be able to click on the name of one of the songs and have it load the lyrics in the main text box.

View 3 Replies

Dynamic Text Loading / Updating?

Nov 2, 2009

I've made a website in Flash, it's the 1st time I've made a site with dynamic loading text.The text loads, that is fine, however, when I update the .txt file, the webpage does not update until I delete my internet history. This obviously no use as I can't expect returning visitors to delete their cache every time they visit.

View 4 Replies

Actionscript Not Loading XML Into Dynamic Fields?

Oct 13, 2010

I am working on a project where I am reading (trying to!) from an xml file. I have 5 separate dynamic text fields that I am filling with the individual digits from a string. I am not an expert but really think my code should work. Below is the actionscript and the xml I am using.

import fl.controls.*;
var digit01_xml:XML;
var xmlReq:URLRequest = new URLRequest("testRBS.xml");
var xmlLoader:URLLoader = new URLLoader();

[Code]......

View 1 Replies

ActionScript 3.0 :: Loading Large Dynamic XML?

Apr 28, 2011

Loading takes too long time. Maybe there are some workarounds to make it load at least a bit faster. There is a way of creating static XML - it means splitting existing database records in one, and new records - to dynamic XML (so it's not requesting all Mysql rows in every single page request), but I'm not sure if it's going to make it load fasterWhen loading XML some browsers stop at apprx. 70% and does nothing. (can't figure this one out)

View 6 Replies

ActionScript 1/2 :: Loading Swf Files Dynamic

Sep 6, 2011

i need as2 code for dynamic loading of swf files wen button is pressed ..

View 1 Replies

ActionScript 3.0 :: For Loops And Dynamic Swf Loading?

Sep 8, 2011

I've done some digging and can't find an answer to this that I understand. I'm sure it's something simple and stupid that I'm just overlooking.

for (var i:uint=1; i<=5; ++i) {
this["thumb"+i]:Loader = new Loader(); this["thumbURL"+i]:URLRequest = new URLRequest("thumbnail_"+i+".swf");  

[code].....

View 1 Replies

ActionScript 3.0 :: Loading XML In Dynamic Textfield?

Jan 11, 2009

Im struggling to load the text of this image in the textfield I placed on the stage with an instance name of "Sample". If I load it into as3 Textfield eg var field: Textfield = new TextField; it works, but if I try to load it into a dynamic textfield on the stage it doesn't work. Why?here is my code and xml

ActionScript Code:
var loaders:Array = [];
var imageLoader:Loader;
var xml:XML;

[code]....

how to load xml into dynamic textfield on my stage.

View 1 Replies

ActionScript 3.0 :: Dynamic Loading Fonts?

Aug 25, 2010

I know this question comes up often, but I have been through the forum several times and I am now confused as to which approach I should take. Hopefully someone can guide me as I am new to AC3.I have a Flash file with a dynamic text object.I have some existing AS3 which loads in text content from an XML file, and drops this into the dynamic text object. This all works fine.What I would like to do is be able to specify a font name in the XML and hence change the font used in the Dynamic text field.Later I would like to explore the option of dynamically loading in the fonts as and when needed, but for now I have embedded two fonts in the Flash file.I have tried the code below, which just manually changes the font (not from the XML yet), but this just doesn't seem to work? Have I missed something?

import flash.events.Event;
import fl.containers.UILoader;
import flash.text.Font;

[code].....

View 1 Replies

ActionScript 2.0 :: Loading XML To Dynamic Textbox?

Feb 26, 2012

I am trying to load data from an XML file to a dynamic textbox but only on a certain condition. I have tried both switch cases and if statements but they do not seem to work. When I play my SWF file WITHOUT using an if statement or switch case and just use:

my_xml = new XML();
my_xml.load("filmTimes.xml");
my_xml.onLoad = my_function;

[code]....

everything works fine. But when I place an if statement around it (if (day.text == "Sunday") ) then nothing happens at all and no syntax errors occurr either.

View 7 Replies

ActionScript 2.0 :: Dynamic Loading Jpg Files?

Apr 10, 2004

Imade a animation with 8 jpg images & I load them dynamically:

_root.myMovieclip.loadMovie("myimage1.jpg");
_root.myMovieclip2.loadMovie("myimage2.jpg");
_root.myMovieclip3.loadMovie("myimage3.jpg");

[code]......

View 2 Replies

ActionScript 2.0 :: Dynamic Loading Swf After Swf + Timing

Apr 22, 2006

I'm having a few problems with loading swf after swf. I want one swf to load after another has loaded and so on... Down a long chain until everything is loaded. I know this code doesn't work... But it shows you what I'm trying to do. Should I use listeners to achieve this? Because _root.theMC.onLoad = function(){-Do Stuff-} doesn't seem to work at all...

[Code]...

View 1 Replies

ActionScript 2.0 :: Loading Dynamic Text?

Aug 5, 2006

apparently i'm having problem loading this external text on to the movie clip... i have the main menu load the a xml menu on to a level movie clip and then the xml load menu load external swf but some how the text won't load but everything else loads

Code:
stop();
var slideInfoLV:LoadVars = new LoadVars();

[code]....

View 1 Replies

ActionScript 2.0 :: XML Loading Into Dynamic Buttons?

Sep 5, 2006

I am working on a dynamic menu for a client. This is my first time creating a menu loaded from an xml file. I have the basics down, but am hitting a brick wall. I will have six buttons that are attached at run time, and will be labeled according to the button names in the xml file. Eventually these buttons will be rotating in a circle, but I'm just testing the functionality at the moment. I tried searching through the forum, and didn't find anything that resembled what I am trying to do. To start off here is the xml file:

<?xml version="1.0" encoding="UTF-8"?>
<menu>
<button buttonName="Home">
<content contentTitle="Home">[code].............

I have been able to trace the attribute names from the xml file, but textbox's from the dynamic buttons are not being labeled. They are coming up undefined.

P.S. This is the flow of how this project will take place: Load external xml file into Flash.Loop through elements to define the button label names.Create a loop to attach a movieClip at run time into a holder clip named "mcCircle".Label the dynamic text field in each new movieClip with the label names from the xml file.Arrange the movieClips on the stage in a circle movieClip.Rotate the circle movieClip clockwise using trig: sine and cosine. Set a speed and velocity variable to the circle movieClipWhen the mouse moves Over a button, have the circle movieClip slow down it's speed to a stop.When the mouse moves Out of a button, have the circle movieClip speed up to it's normal rotation speed.When the mouse clicks on a button, have the circle movieClip shrink down and move to the lower right corner of the stage.Tell Flash to load the content from the xml file (of the button label clicked) to a dynamic textfield on the stage. When the user is done reading the content they will click on a button to clear the text field, and bring the menu back to center, and original size.

View 4 Replies

ActionScript 2.0 :: Loading Data Into Dynamic Box

May 15, 2007

I've created a piece of code that will send some info off to be inserted into a database and then it's recordID will be returned to flash. I'm trying to put the returned id into a dynamic text field but for some reason it's not going. I was wondering if someone could have alook at my code and let me know if I'm doing something wrong. The recordID is being returned to Flash as it's appearing in the trace.

[Code]...

View 2 Replies

ActionScript 2.0 :: Loading Xml Elements With Dynamic X/y?

Jan 15, 2008

i took this from a fla sample

menuXml = new XML();
menuXml.ignoreWhite = true;
menuXml.onLoad = function(success) {

[Code]....

this part gives a y position to the loaded element but, this is a standard distance between all the elements i need that the _y position will be according / next to the last element, not always with the same distance any clue?

View 1 Replies

ActionScript 3.0 :: Loading Swf Into Dynamic Movieclip?

Mar 18, 2009

What I want to do is load a swf(mp3 player) into another dynamic movieclip that has been added and tweened onto the stage. Ideally, on a button press, the swf loads into the dynamic clip first and on completion they both tween/fade onto the stage. I've got my fingers crossed that this is just a simple syntax/scoping problem but in every combination I tried I got errors galore.

[Code]...

View 2 Replies

ActionScript 3.0 :: Loading Dynamic XML And Images?

Jan 8, 2012

I have written the following to send variables to PHP which searches a MySQL database and returns the results in XML. However for the life of me I cannot get the XML data loaded into the Movie Clips of my Flash site.Is there an obvious problem that I've overlooked?

ActionScript Code:
var imageDir:String = "Images/";
var getImage:XML;
var imageList = new Array();
var newPic:MovieClip = new MovieClip();

[code]....

View 5 Replies

ActionScript 3.0 :: Loading Dynamic Xml Data?

Aug 14, 2009

Iam trying to create a user login system. i want to load all the data from an xml file. my problem is that i want to this whole thing with as3 & xml nd it shuld reject with username that does not exist in xml i do not want to use php

View 9 Replies

IDE :: Slow Dynamic Content Loading In IE?

Nov 17, 2009

This is really weird and I have no idea what could be causing this.I have this simple Flash site:

http:[url]....The main interface is loaded, and then it starts to preload a few external JPG images.The problem is that with IE it is taking about FOUR times (or even more) the time to load the same pictures with FF. In a slow connection such as a 128K the main interface takes the same time to load either on FF aswel IE - about 5-10 seconds. Then, it starts loading the external pictures - in FF it will take about 20 seconds more and in IE it will take about 80 seconds more. It is clear to me that the problem is not in the site loading itself, but in the contents loading. I can't see what in the browser could be interfering in the SWF, unless that the IE Flash plugin have some known (or unknown!) bug regarding to MovieClipLoader!

The only thing I can have in mind, is that I am not terminating the listeners in the onLoadComplete events, so theoretically they would be keeping the CPU busy even after the pictures finish to load (I spawn about 30 listeners, one for each picture). However, I doubt that this is the reason or else it would make FF slow down too, indeed? Also I noticed that when running the application in the authoring environment (control+ENTER) but loading contents from remote server, it have the same behavior as when loaded within IE (slow loading).

View 1 Replies

ActionScript 2.0 :: Dynamic Content Loading?

Sep 19, 2003

I need to create a movie that will look into some directories and display the images he founds there (or text).

View 6 Replies

ActionScript 2.0 :: Dynamic Loading Jpg Files

Apr 10, 2004

Imade a animation with 8 jpg images & I load them dynamically:

[Code]...

but I"ve a problem to make "loading",my animation start before jpg files are loaded into flash.I've test to do this with myMovieclip.getBytesTotal., but It check only a first one(but I've 8!!)

View 2 Replies

ActionScript 2.0 :: Loading Images From Dynamic URL

May 15, 2004

I have 3 movieClips on the stage. I want this to load images from urls that I have withdrawn from a php script that randomly selects from stored urls in the database. I want to load one of these into each movieclip. Here is the code that I have, but it doesn't work. (Btw, this is on a frame of the movie)

PHP Code:
loadText = new LoadVars();
loadText.load("generateQuiz.php?week="+_root.week);
loadText.onLoad = function() {
j = 1;
sortItOut();
[Code] .....

View 4 Replies

ActionScript 3.0 :: Loading Swf With Dynamic Content Into Scrollpane

Aug 5, 2009

I have been working on a file for a while now and I am trying to load an external swf into a scrollpane. The external swf gets all its content from an xml file (there is nothing on the stage, it's all done through as3) My problem is that when I load the swf into the scrollpane I don't get the scroll bars and most of my content is cut off. I have tried setting the scroll policy to auto, and true, neither helped. Can anybody tell me what I am doing wrong?

[Code].....

View 3 Replies

ActionScript 2.0 :: Saving And Loading A Dynamic Text Box?

Aug 19, 2009

I was wondering if there is a way to save and then load a message of a Dynamic text box.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved