Load Multiple Xml Files
Hi,
I have an array filled with xml files locations.
I want to load each one in and then attach the result to a variable, which describes its content, e.g. contact, home, support etc.
Is there a wau of doing this with a loop?
Also I would like to know the total size of all the files and how much is loaded whilst loading, for the preloader.
thanks in advance.
ash
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 07-14-2005, 07:17 AM
View Complete Forum Thread with Replies
Sponsored Links:
Load Multiple Xml Files?
In my movie is a slideshow with pictures. On opening it loads xml txt. What I want is when you click to the next picture, another txt file opens. How can I do that? Here's the example: http://www.tantesteef.nl/trein.html
Here's the code:
var xmlText = new XML();
xmlText.tf = textBox;
xmlText.onData = function(data) {
this.tf.html = true;
this.tf.htmlText = data;
};
xmlText.load("trein.txt");
next.onPress = function() {
if (myPic<7 && !fadein && !fadeout) {
fadeOut = true;
myPic++;
input = myPic;
}
};
back.onPress = function() {
if (myPic>1 && !fadein && !fadeout) {
fadeOut = true;
myPic--;
input = myPic;
}
};
container._alpha = 0;
myPic = 1;
// initiate change to new image when buttons are clicked
this.onEnterFrame = function() {
// when a new Photo is selected, fade out, load new image, and fade in
if (container._alpha>10 && fadeout) {
container._alpha -= 100;
}
if (container._alpha<10) {
loadMovie("images/trein/trein"+myPic+".jpg", "container");
fadeOut = false;
fadeIn = true;
}
if (container._alpha<100 && fadein && !fadeout) {
container._alpha += 10;
} else {
fadeIn = false;
}
};
regards
View Replies !
View Related
Load Multiple XML Files
Hello,
I need to load a large amount of datas into an XML object.
My files are like this:
XML CODE of file1.xml
Code:
<collection1>
<item_1>data_1</item_1>
<item_2>data_2</item_2>
...
<item_x>data_3</item_x>
</collection1>
XML CODE of file2.xml
Code:
<collection2>
<item_1>data_1</item_1>
<item_2>data_2</item_2>
...
<item_x>data_3</item_x>
</collection1>etc...
I first tried to merge all my files (file1.xml, file2.xml, etc.) into 1 big XML file but when I use this method:
Code:
myXML = new XML();
myXML.load("myBigFile.xml");
I get an error because of the SWF taking more than 15 seconds to load the fileThen, I tried to load 1 file after the other:
Code:
myXML.load("file1.xml");
myXML.load("file2.xml");
etc...
but of course, only the last one is loaded
Thanks to help me doing this using the separated files (file1.xml, file2.xml, etc.) and load the datas into ONE XML OBJECT (myXML)
Thanks
Marc
View Replies !
View Related
Possible To Load Multiple Files As One?
hey!
im making a little flash game and im wondering if this is possible..
I want to (just because) create one file which contains all the data that i want to load into my flash movie.
say i place all the files/sounds/external swf's in one folder and sort them how i like..
Then i zip that folder and place it on my webbserver.
is it now possible to load in that zip file and retrieve the contents of it using only flash?
it offcourse does not have to be zip format.. i just want that general concept.
Thanks
//VoS
View Replies !
View Related
Load Multiple Xml Files?
var myObjArray = new Array;
myXML = new XML();
myXML.load("test.xml");
myXML.ignoreWhite = true;
myXML.onLoad=displayText;
function displayText(){
map = myXML.firstChild;
us = area.firstChild;
items = us.childNodes
for (var i = 0; i<items.length; i++) {
myObjArray.push( { names: items[i].firstChild.firstChild,
color: items[i].firstChild.attributes.color,
xmllink: items[i].firstChild.nextSibling.nextSibling.firstChild}
);
}
for (var t = 0; t<61; t++) {
displayFormatName(t);
}
}
function displayFormatName(num){
pointerXMLfiles = myObjArray[num].xmllink;
additionalXML = new XML();
additionalXML.load(pointerXMLfiles);
additionalXML.ignoreWhite = true;
additionalXML.onLoad=function(success){
if (success) {
trace(myObjArray[num].name + " " + pointerXMLfiles); /*HERE IS TRACE IN QUESTION*/
if (additionalXML.firstChild.nodeName == "Timestamp"){
trace(additionalXML.firstChild.firstChild.nodeName ); /*DESIRED POINT*/
}
}
}
}
I have a question about multiple xml files being loaded into actonscripts. So I have an xml file in flash that has additional xml files with values in them. So the nodeValues are just links to other xml files
<item>
<aXML>test2.xml</aXML>
</item>
I first load the main xml file then create an object array and pour in some values (mainly links to more xml files). Once I have all that info in the object, then I loop through the object and load each xml file. But here is where the problem is essentially there are 60 xml files and when I trace in the onLoad function what comes out is not in order that it should be. The index values of the object array are out of wack, it should be 0,1,2,3,4.... but whats coming out is 1,4, 3,5, 0, 7, 14, 22, 2.... not only that but I am never getting to my disired point. Basically is there a way to load 60 different xml files so I can print out information thats in them in one motion???? Is there something obvious that I'm doing wrong????? Anyone see another way to this???
thanks, all you help is much appreciated!!
View Replies !
View Related
Load Multiple Swf Files
Hi,
I have a flash animation, and a certain movieclip has to load multiple swf
files. I know how to load one, but what to do if the first one has ended?
Also how do I refer with a button to load instantly e.g. the 3th movie?
Can anyone help me?
Thanks in advance!
View Replies !
View Related
Load Multiple Text Files Into A .swf?
Hi..
I want to create a news feeder with dynamic text.
So what I would like to happen is:
A news (dynamic text) is fading in.. Holds back for couple of seconds. It then fades out and another news fades in..
I manage to load ONE text file.. But how do I load the next one?
Im a complete newbie so Im not sure if there is a code in flash, or if I should make a code within the textfile..
(Im using MX)
Thanks!
View Replies !
View Related
[CS3] Load Multiple External Swf Files
I built a loader with three buttons, each of which loads a different external swf. The code works, and all three buttons load the correct swf, but when I click the second button before the first swf is finished playing, the two movies overlap. If I click all three buttons in succession, all three swfs play, one over the other.
How do I code the buttons so they first stop the swf that is already playing, and then play the swf they are meant to load? Here is my code:
var imageRequest:URLRequest = new URLRequest("scene1.swf");
var imageLoader:Loader = new Loader();
welcomeBtn.addEventListener(MouseEvent.CLICK, loader);
function loader(event:MouseEvent){
imageLoader.load(imageRequest);
marker.addChild(imageLoader);
}
var imageRequest2:URLRequest = new URLRequest("scene2.swf");
var imageLoader2:Loader = new Loader();
designBtn.addEventListener(MouseEvent.CLICK, loader2);
function loader2(event:MouseEvent){
imageLoader2.load(imageRequest2);
marker.addChild(imageLoader2);
}
var imageRequest3:URLRequest = new URLRequest("scene3.swf");
var imageLoader3:Loader = new Loader();
sponsorBtn.addEventListener(MouseEvent.CLICK, loader3);
function loader3(event:MouseEvent){
imageLoader3.load(imageRequest3);
marker.addChild(imageLoader3);
}
Thanks!
View Replies !
View Related
Need To Dynamically Load Multiple XML Files
A vendor has offered a data stream for elections coverage that is driving me nuts.
It's a county-by-county data stream for a given state's races. Each race has upwards of 250 XML files -- depending on the state -- one for each county's election returns. Thankfully, the XML files for the counties in a race are numberically ordered alphabetically.
Here's the problem -- I need to dynamically read the each county's candidate vote count from, say, 90 XML files. On the fly. The vote counts will then be used to color individual county movieclips based on the results (e.g. GOP = red, Dem = blue, etc.).
I have a script that I call when everything in the movie loads -- it starts looping to call the XML files (90 or so) and begins to read the data to color the county clips. Problem is, I can't switch to a different race (restarting the loop) without screwing up the XML calls and getting a bunch of undefined values which determine county clip colors.
Here's the function I'm using to dynamically color the county clips (imagine 100+ XML files being pulled in using this looping function):
Code:
var loadLeadersCount:Number = 1;
var loadLeadersTotal:Number = countyList.length;
var loadLeadersData:Function = function() {
tempCountyID = loadLeadersCount;
// prepend zeros and other prefixes for countyIDs
if (tempCountyID < 100 && tempCountyID >= 10) {
tempCountyID = "110" + tempCountyID;
} else if (tempCountyID < 10 && tempCountyID >= 1) {
tempCountyID = "1100" + tempCountyID;
} else {
tempCountyID = "11" + tempCountyID;
}
xmlInitLeaders = function() {
var xPathTemp:String = "/Vote/Race/ReportingUnit/Candidate";
leadersCandidates = new Array();
leadersCandidates = XPathAPI.selectNodeList(xmlDataLeaders.firstChild, xPathTemp);
tempLeaderXMLNode = leadersCandidates;
tempCandidateArray = new Array();
for (var i:Number = 0; i < leadersCandidates.length; i++) {
tempCandidateArray.push({tempParty:leadersCandidates[i].attributes.Party,tempVotes:leadersCandidates[i].attributes.VoteCount});
}
tempCandidateArray.sortOn("tempVotes", Array.DESCENDING | Array.NUMERIC);
tempLeader = tempCandidateArray[0].tempParty;
trace(tempLeader);
switch (tempLeader) {
case "Dem" :
tempColor = new Color(this[countyList[(loadLeadersCount - 1)]]);
tempColor.setRGB(0x0000ff);
break;
case "Lib" :
tempColor = new Color(this[countyList[(loadLeadersCount - 1)]]);
tempColor.setRGB(0x00ff00);
break;
case "GOP" :
tempColor = new Color(this[countyList[(loadLeadersCount - 1)]]);
tempColor.setRGB(0xff0000);
break;
default :
tempColor = new Color(this[countyList[(loadLeadersCount - 1)]]);
tempColor.setRGB(0x87676d);
break;
}
loadLeadersCount++
if (loadLeadersCount <= loadLeadersTotal) {
loadLeadersData();
} else {
trace("No more counties to process!");
}
}
xmlDataLeaders = new XML();
xmlDataLeaders.ignoreWhite = true;
xmlDataLeaders.onLoad = function(success:Boolean) {
if(success) {
xmlInitLeaders();
trace("XML loaded!");
} else {
trace("XML did not load!");
}
}
xmlDataLeaders.load(currentRaceXMLPath + tempCountyID + ".xml");
trace(currentRaceXMLPath + tempCountyID + ".xml");
}
Here's the combobox init code that sets up a listener for when someone would switch to a different set of XML files (for a different race):
Code:
// function to initialize race selection combobox
var initSelectRaceCombo:Function = function() {
this.comboSelectRace.dataProvider = raceList;
comboSelectRaceListener = new Object();
comboSelectRaceListener.change = function(event_obj:Object) {
currentRaceXMLPath = event_obj.target.selectedItem.data;
loadState();
loadLeadersCount = 1;
loadLeadersData();
}
comboSelectRace.addEventListener("change", comboSelectRaceListener);
currentRaceXMLPath = this.comboSelectRace.selectedItem.data;
selectRaceClip._visible = true;
comboSelectRace._visible = true;
creditsAltClip._visible = true;
loadState();
initCounties();
loadLeadersData();
}
Any thoughts? There's gotta be a better way to do this, but I can't lock down the combo box and prevent someone from switching to another race while they wait 30 - 90 seconds for the XML load loop to finish.
Thanks,
IronChefMorimoto
View Replies !
View Related
Load Multiple XML Files At Startup
The ActionScript 3 XML Basics tutorial at gotoandlearn.com has convinced me to get into AS3. The new XML loading process is so much better in AS3
What I want to do however, is load in more than one XML (each with different structures) at startup. This tutorial is just dealing with one standard RSS feed. I can probably work something out, but i was wondering if anyone can suggest a good way to go about it? I would probably duplicate the code below for every XML file i need to open, but i feel like theres a better way..
This is the AS from the tutorial (ive taken out the listbox and textarea parts):
ActionScript Code:
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);
var xml:XML;
function onLoaded(e:Event):void
{
xml = new XML(e.target.data);
var il:XMLList = xml.channel.item;
for(var i:uint=0; i<il.length(); i++)
{
trace(il.title.text()[i]);
}
}
loader.load(new URLRequest("http://theflashblog.com/?feed=rss"));
View Replies !
View Related
Trying To Load Multiple Txt Files Into Slideshow
Im trying to load multiple txt files into a scroller "dynamic" text field. I am able to load my jpgs but not my text files. I am new to flash and have no clue as to what i am doing wrong. I havent been able to find any examples of loading the files the way I am tring to. I have over 50 txt files that I am using this is why im tring to load them this way. Sorry if I am not clear but here is my code.
ActionScript Code:
//initialize variables and properties
square._alpha = 0;
whichPic = 1;
whichtext = 1;
//initiate change to new image when buttons are clicked
next.onPress = function() {
if (whichPic<10 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic++;
input = whichPic;
For (whichtext<10)
whichtext++;
input = whichtext;
}
};
back.onPress = function() {
if (whichPic>1 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic--;
input = whichPic;
For (whichtext>1)
whichtext--;
input = whichtext;
}
};
_root.onEnterFrame = function() {
// when a new Photo is selected, fade out, load new image, and fade in
if (square._alpha>10 && fadeOut) {
square._alpha -= 10;
}
if (square._alpha<10) {
loadMovie("../images/"+whichPic+".jpg", "square");
fadeOut = false;
fadeIn = true;
}
if (square._alpha<100 && fadeIn && !fadeOut) {
square._alpha += 10;
} else {
fadeIn = false;
}
// limit input field
if (input>10) {
input = 10;
}
// initiate change to new image when Enter key is pressed
if (Key.isDown(Key.ENTER)) {
fadeOut = true;
whichpic = input;
}
};
// if a number is entered in the input field but Enter is not pressed, change
// back to current Photo number when clicking anywhere else
inputField.onKillFocus = function() {
input = whichPic;
};
//loadVarsText = new loadVars();
loadVarsText.load("../text/" +whichtext+".txt");
//assign a function which fires when the data is loaded:
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
//Now that we know the data is loaded,
//set the text content of the Text Field
//with the instance name "scroller" equal to the
//contents of the variable
scroller.txt = this.var1;
} else {
trace("not loaded");
}
}
View Replies !
View Related
Load Multiple Files With One ProgressBar
Hey Guys,
first of all, greetings from Munich.
Well, i'd really!! appreciate you to help me with my problem cause i cant figure out how to manage that.
Okay, basically im puttin Loaders into an Array, after i loop the array and add a ProgressListener to each Loader, just have a look:
Code:
var totalBytes:int;
var progressOpened:Array = new Array()
private function addEventListeners():void {
for (var i:int = 0; i < GlobalVarContainer.vars.pics.length; i++) {
progressOpened[i] = false;
GlobalVarContainer.vars.pics[i].contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
function (event:ProgressEvent){progressing(event,i)});
//GlobalVarContainer.vars.pics[i].contentLoaderInfo.addEventListener(Event.COMPLETE, picL);
}
}
private function progressing(event:ProgressEvent,i:int):void {
if (event.target.bytesTotal != 0 && progressOpened[i] == false) {
totalBytes += event.target.bytesTotal;
progressOpened[i] = true;
trace("aha");
}
if (i == GlobalVarContainer.vars.pics.length-2) {
trace("totalbytes"+totalBytes);
}
}
Well, it traces absolutely nothing, do you have any advice?
Thanks a lot!
View Replies !
View Related
Can I Load Multiple Text Files Into Scroller?
Hi...is it possible to load multiple text files into a single text scroller?
I am using MX and I have a main swf movie that I am loading my link swf's into. On all my link swf's I have buttons that will control the info on those swf's. For each button (3 on each link swf's) I want to have a scrolling text box for the info. Which means I need 3 scrolling text boxes for each of my link swf's.
Is there a way to use 1 scrolling text box and just load the text for each as each button on my link swf's is pressed?
View Replies !
View Related
Multiple Flash Files Upon Page Load
i have a flash button on my home page. however, i'd like create different flash buttons with the same dimensions that would load randomly upon page load. is this possible?
i'd like to do this to add some variety to my home page. does this make sense? any help would be great.
thanks
View Replies !
View Related
Load Progress Of Multiple External Files
here's a brain twister.. at least for me:
how would one create ONE load progress bar for MULTIPLE external images? The idea is that the site would load multiple images at one time (or one after another) and the viewer would be able to see the progress via a load bar (but only one load bar.. not 50 if there were 50 images).
I know I've seen other sites do this before.
any ideas?
-Pez
View Replies !
View Related
Load Multiple Files Into Single Array
hi, I have two ordinary .txt files with several lines of text in both of them. What I want to do is to load the text of both files into a single array, is that possible?
note: the number of text-files will vary depending on user input.
at the moment I have:
PHP Code:
fileNames = ["text1.txt", "text2.txt"];
and I know you can use loadVariablesNum if you have only one file to load, but as soon as I've got two or more it just overwrites the old loaded text instead of adding it to the array.
any solutions?
thanks
View Replies !
View Related
How Can I Set Up Multiple Preloaders To Load External Files On Demand (AS3)?
I've been looking for AS3 preloader tutorials, but haven't found what I'm after.
I'm trying to make a Flash-based portfolio. Since there may be a lot of images, rather than having one progress bar for all of them I want to load the external image files for each category only when the user goes there: Paintings, Pastels, Drawings, Logos, etc.
I've seen examples of how to load an external file from an xml file, and various other tutorials about the Loader and LoaderInfo classes, but nothing that explicitly explains how to make multiple preloaders.
I have some thoughts but before possibly going down the wrong road, might someone be able to suggest some sample code for a simple preloader that would load the contents of one of three xml files based on what icon was clicked? I've made a progress bar preloader for the main swf file, so I understand how to make the progress bar itself; but I'm wondering if someone knows a (relatively) simple way to set up multiple progress bars. There seem to be so many parts, classes to import, etc., that a simple template would be a real help.
In lieu of actual code, any suggestions would also be appreciated.
Thanks a lot in advance for your time.
Darrell
View Replies !
View Related
One Master File To Randomly Load Multiple .swf Files
I am very new to using these forums, I have searched and searched and it seems I can't find any other threads to help me. I am a novice when it comes to anything beyond basic actionscript so I'm hoping for some help. I am creating a website that will have approx. 4 banner ads (.swf files) that need to randomly load every time the page is refreshed. I have a vague idea of what I need to do but I am really not sure about the exact coding. I would love for someone to tell me exactly what code I need and where I need to put it. I know the best idea is to use a master file to load these and probably an array but I just don't know how it should all look. Hoping to getting some feedback!
View Replies !
View Related
Flash 8: How Do I Load Consecutive Multiple External Swf Files?
Hello, all of you brilliant people! I have a question and hope that someone may be able to help.
I have a container .fla movie and would like to load consecutive external .swf files. Right now I have a play button triggering the loading of the next movie, but what I would REALLY like is a smooth transition from .swf to .swf using a listener so that the next .swf will load once the previous one has finished. I have a counter which determines the next .swf in order.
So far, my code is this:
Counter:
stop();
//SETUP OUR COUNTER
var mcCounter:Number = 0;
//THIS BLOCK IS ONLY TO HANDLE THE LOADER AND THE FIRST MOVIE, movie0.swf
var myMCL:MovieClipLoader = new MovieClipLoader();
var loadListener:Object = new Object();
myMCL.addListener(loadListener);
myMCL.loadClip("movie" + mcCounter + ".swf", 6);
loadListener.onLoadComplete = function():Void {
_level0.play();
}
//-------------------------<CLIP LOADERS>------------------------------\
function loadNextClip():Void {
if(mcCounter < 6) {
mcCounter++;
var nextMCL:MovieClipLoader = new MovieClipLoader();
nextMCL.addListener(this);
nextMCL.loadClip("movie" + mcCounter + ".swf",6);
}
}
//LOADS PREVIOUS CLIP , WON"T GO PAST ZERO
function loadPrevClip():Void {
if(mcCounter > 0) {
mcCounter--;
var prevMCL:MovieClipLoader = new MovieClipLoader();
prevMCL.addListener(this);
prevMCL.loadClip("movie" + mcCounter + ".swf",6);
}
}
//-------------------------</CLIP LOADERS>------------------------------\
Any suggestions? I appreciate ANY help you can offer. I have been unsuccessfully looking for hours online, and can't find any examples, although it doesn't seem as if it should be the hardest thing in the world.
View Replies !
View Related
Best Structure For Your Flash Site - How Do I Load Multiple XML Files?
I'm trying to use Mark Angeletti's excellent structure (http://www.sitepoint.com/article/structure-flash-site)
to solve my preloading problems. However, I'm having trouble loading an array of separate XML files. Here is his code for Frame 2:
var xmlData:XML = new XML();
xmlData.ignoreWhite = true;
xmlData.load( xmlFile );
xmlData.onLoad = loadXML;
BTW I don't understand what "loaded" is doing here. What is this importing? Nothing that I can find... from the above code. How does it know if loaded is TRUE? Please explain.
function loadXML(loaded) {
if (loaded) {
trace (xmlData)
var xnRootNode:XMLNode = this;
//add firstChild.childNodes stuff here...
}
I don't want to use his system of firstChild.childNodes in the function because my XML files are very simple - just heading and plain text. All I need to do is import all 43 of them. So I tried creating an array in the Global Variables import Frame (1) and going through them like this:
var counter:Number = allText.length, ii:Number = 0;
for (var i:Number = 0; i<counter; i++) {
var xmlData:XML = new XML();
xmlData.ignoreWhite = true
var loadText = this["eachText"+i]
xmlData.load(loadText);
xmlData.onLoad = loadXML;
}
Works so far - I can do a trace and see each one. However I can't get them into the loadXML function - one at a time. Do I need to create another loop in the function or can I put the function inside the above loop? Then how do I create another array of objects? Whatever syntax I try - ie - var xmlData[i]:XML = new XML(); comes up with an error.
Thanks for your help.
Charles
View Replies !
View Related
Load Multiple Text Files In A Single Textbox On Click
Hi,
I'm trying to build an online learning experience for children and i have a set of 7 characters: princess, alien, caveman, clown, dr, chaplin and hippie. I have a dynamic textbox named infotext and i want to be able to load a different text file when the user clicks on the corresponding character. "readthis" and "area" are just graphics that will have to appear no matter where the user clicks. I have managed to get it to work with the first character and I'm stuck somewhere about there. I'm new in flash so if you could make it as detailed as possible that would be great. My code so far for this is:
Quote:
readthis.visible = false;
area.visible = false;
infotext.visible = false;
princess.addEventListener ('mouseUp', function() {
infotext.visible = true;
readthis.visible = true;
area.visible = true;
var url:String = "princess.txt";
var loadit:URLLoader = new URLLoader();
loadit.addEventListener(Event.COMPLETE, completeHandler);
loadit.load(new URLRequest(url));
function completeHandler(event:Event):void {
infotext.text = event.target.data as String;
Thanks in advance,
- Theo
View Replies !
View Related
Targeting Multiple Preloaders For Multiple Files...
Hi there!
I just can't figure out how to use a preloader script for multiple loaders displaying at the same time. And I also just don't understand the target movieclip parameter for onLoadProgress. What is this parameter suppose to be?
The movieclip beeing loaded according to Macromedia but if you put mc.swf it gives you an error so it should be mc then or what? I thought I could use this parameter to kind of target and tell flash what file it was suppose to listen to and then control what preloader to start but it just doesn't work. Also what is the function of this parameter - I just don't get it... When I use the script below the loader starts for every file loaded into a listener called myMCL but I would like to have different preloaders that can be seen at the same time.
For example a preloaderbar for background loading and another one for content loading etc. How can I achieve this using something similar to this code...
myListener.onLoadError = function (target){
bkgMCL.loadClip("error/error.swf", bkg);
_root.gotoAndPlay(28);
};
myListener.onLoadStart = function (target){
this.bkgPreloader._visible = true;
}
myListener.onLoadProgress = function(target:MovieClip, loadedBytes:Number, totalBytes:Number){
var preloadPercent = Math.round((loadedBytes/totalBytes)*100);
_root.bkgPreloader.gotoAndStop(preloadPercent);
};
myListener.onLoadComplete = function(target){ //loading contents after bkg loaded
this.bkgPreloader._visible = false;
};
View Replies !
View Related
Multiple External Text .txt Files In Different Swf Files
I'm trying to have several external files (txt or html) attached to a several swf flash files, loading in different levels of one main movie, for easy updating.
Example is: loadVariablesNum("ext-track.txt", 0);
This I can do, partly working.
Say you click the button for "about" that loads that flash file (in a layer), it fails to load in the relevant external file (the movie loads just not the external text file).
When you open up the "about.swf" on its own, it loads up the external file no problem. It just fails to do it when I am loading it from the main swf movie file that then loads this in a layer.
I can get all the text files working by putting in all the loadVariable parts in the main movie but I need them put into their relevant swf movies.
Does that make sense?
How do you correct, something to do with layers or targetting? I'm sure it'll be easy for you guys, Actionscript ain't my thing.
Thanks.
View Replies !
View Related
AS3: Load Multiple Variables Into Multiple Dynamic Text Fields
I have a php file that makes this list
Code:
Cid1=3
&Lid1=22
&Title1=amazing
&Date1=1212128413
&Ext1=jpg
&Hits1=129
&Rate1=9.5000
&Cid2=1
&Lid2=22
&Title2=cool
&Date2=1212128413
&Ext2=jpg
&Hits2=129
&Rate2=8.5000
Now, I want to load the 7 bits of data into 7 dynamic text boxes.
I have to code to load a movieclip as a button onto the stage.
When I click that button I want the data to load.
I can kind of load all the data as a string into one dynamic field but don't know how to get each variable into a different text box. Any help would be great.
Regards,
Glen Charles Rowell
This is some working code for loading one variable but I need help with the rest please.
Code:
var url:String = "http://www.secretcanttellsorry.php?cid=3&orderby=ratingD&guid=on";
var Cid1:URLLoader = new URLLoader();
Cid1.addEventListener(Event.COMPLETE, completeHandler);
Cid1.load(new URLRequest(url));
function completeHandler(event:Event):void {
poptext.text = event.target.data as String;
}
View Replies !
View Related
Replacing Multiple Url's In Multiple Fla Files
Hi, i have multiple .fla files in dutch language with various buttons with an url pointing to a dutch website. Now i need an enlish version but i need to change 200 url's manually. There is only one thing i need to change in the URL and that is t=nl into t=e (language t=nl is dutch and t=e english).
I there a way to find and replace in multiple .fla files to do this action?
Greetings,
Tom Viguurs
View Replies !
View Related
How Can I Load, Multiple Images Into Multiple Key Frames At Once..
Hey guys, I have this..pseudo 3d model viewer for my site that I am working on. The only problem is, I don't want to manually add every image to the flash...especially if I have 45 images or so and I am pretty sure there is no way to automate this in actionscript..
http://www.pcgamemods.com/slideshow/revolve.html
this is a pretty crude example but it shows you what I am aiming for. I just wanted to know if there was an easier way to add images to frames or if there was a program to do it for you.
View Replies !
View Related
Multiple Swf With Multiple Image Load Methodology.
I can't seem to get my head on straight tonight.
My scenario is this…
One main site frame swf and one swf per page, I have a small pre-load anim for the frame itself and one nice pre-load anim in the main frame to use with the subsequent pages.
In the default page I am loading right at the start I have an image gallery with several images loaded using a single MovieClipLoader instance. I'd like to monitor the load of the page and the image loads using the root level preload anim I'm wondering if using a single MovieClipLoader am I precluding this from working since the loads are happening concurrently.
How would/do you handle situations like this?
Thanks,
J.
View Replies !
View Related
How To Load .swf Files In Other .swf Files In HTML Tables?
Ok I need help on figuring out how to place several different flash files in table cells in HTML. basically how to make a flash website, i did the tutorial for it but it just loads .swf files from one movie clip into another. how do you load a .swf file into another .swf file in an html table? for instance say I have 3 rows for my table. each row has one TD cell. inside each cell is one .swf file.
so we have one .swf file in each row. if i click a button in the top row(top .swf file), how do i get it to make a .swf file load into a blank .swf file in the middle row? i want a top menu in flash and i want it to load .swf files into a middle display area. how do i do this with external .swf files that are not all in the same movie? know what i mean? i hope i didnt confuse everyone. basically, can you target a .swf file in a table cell from a .swf file in another table cell? please email me if you know how to help me, thank you I appreciate your time.
tyr
View Replies !
View Related
How To Load .swf Files In Other .swf Files In HTML Tables?
Ok I need help on figuring out how to place several different flash files in table cells in HTML. basically how to make a flash website, i did the tutorial for it but it just loads .swf files from one movie clip into another. how do you load a .swf file into another .swf file in an html table? for instance say I have 3 rows for my table. each row has one TD cell. inside each cell is one .swf file.
so we have one .swf file in each row. if i click a button in the top row(top .swf file), how do i get it to make a .swf file load into a blank .swf file in the middle row? i want a top menu in flash and i want it to load .swf files into a middle display area. how do i do this with external .swf files that are not all in the same movie? know what i mean? i hope i didnt confuse everyone. basically, can you target a .swf file in a table cell from a .swf file in another table cell? please email me if you know how to help me, thank you I appreciate your time.
tyr
View Replies !
View Related
Can I Load Movieclips From A Textfile? Or Load Other Text Files?
i am pulling in variables from a text file like so:
on (release){
textbox.loadVariables ("text1.txt");
}
now... my question is... is it possible to load another movie clip from that textfile???
i have a bunch of news headlines that are from a text file, and i want them to link and load another movie clip on another section of my page... i have figured out how to link URL's but i cannot get it to link a movieclip, or, another textfile...
i want the movieclip to load into a already running swf file... is it possible for flash to do this?
any help would be much appreciated.
View Replies !
View Related
LoadVars: Multiple Text Boxes, Multiple Text Files.
Is it possible to use one LoadVars object to load different text files into different text boxes?
I know I can do this:
ActionScript Code:
var textLoader:LoadVars = new LoadVars(); textLoader.onData = function(content) { trace("Data loaded successfully."); someBox.text = content; };button1.onRelease = function() { textLoader.load("file.txt");}button2.onRelease = function() { textLoader.load("file2.txt");}
I know this will load two different text files into the same text field, but I want to be able to define different boxes, like maybe
ActionScript Code:
textLoader.load("file.txt", someBox.text);
though that is obviously not correct.
Any ideas?
View Replies !
View Related
Load Movie To Load Jpeq Files
Load Movie in MX allows you to load .jpg files dynamically.
In test mode the output window will show you an error if the
file cannot be found.
Is there any way determine if there is a file error when not in
test mode? Is there something equivalent to the LoadVar if (success)?
thanks,
YJ
View Replies !
View Related
Using Multiple Swf Files
Hi,
I have my preloader as one swf file, and then when the preloader has finished playing i have 700x438 space between two symbols, anyway i was wondering if it was possible to make another swf file (which is 700x438) fit into that space on my preloader swf, This file i want to add is the actual site. I think this is something like using external swf files.. i have no clue but i plan on uploading these two swf files to host, just don't know if they will work properly. Does anyone have any suggestions ?
Thanks for all your help
View Replies !
View Related
Using Multiple Swf Files
Hi,
I have my preloader as one swf file, and then when the preloader has finished playing i have 700x438 space between two symbols, anyway i was wondering if it was possible to make another swf file (which is 700x438) fit into that space on my preloader swf, This file i want to add is the actual site. I think this is something like using external swf files.. i have no clue but i plan on uploading these two swf files to host, just don't know if they will work properly. Does anyone have any suggestions ?
Thanks for all your help
View Replies !
View Related
Multiple Fla Files
I want to know if there is a way to take multiple fla files and import them into a new flash document to create a whole new fla/swf file. I have 15 segments created in flash and want to only use 5-6 segments to create a whole new presentation.
Any suggestions?? Is this possible??
View Replies !
View Related
Multiple Swf Files
ok i am quite new to flash and i have just completed my first proper site: www.designhousestudios.co.uk .
i am quite happy with ,although its a little slow to load - The thing is i want to add another section that is password protected for clients only - not all my visitors will view this section so i dont want it to load automatically eveytime someone types in the address. if i create a seperate swf file for the section will it only load once the link to the password protected section gets clicked? - basically i dont want to add more to the loading time if dont have to. Many thanks
hope this makes sensenulldesign house
View Replies !
View Related
Multiple XML Files
I could not find any other topics regarding this matter, which I think is somewhat special.
I am constructing a site, and the images and texts will all load through xml files on a server. The thing is that a friend of mine (who is not very good with Flash and Actionscripting, although a good programmer) is constructing a small CMS that generates these xml files.
Now, I've managed to load all the dynamic content on one page from ONE xml file. But the CMS developer wants me to load each text field from separate xml files, and he is not compromising no matter how stupid I tell you that idea is.
Now one of my "pages" have got 3 unique text fields. This of course results in loading content from 3 different xml files. I've tried everything, but they seem to disturb each other.
Can anyone help me out!?
View Replies !
View Related
MVC And Multiple XML Files
Hi all
Im trying to work out how to load separate XML files for each section of the site, which is built with MVC. I didn't write the code, so this is already tough - the site is heavy and I've been asked to lighten the sites load time by splitting up the XML loads, by chopping up the single XML file into several individual XML files.
My problem is that I cant work out the best way to achieve this. At present the Document class loads in the XML. This then creates an instance of the Model class with the XML data.
My problem is that I can't work out the best way to tell the Model class to load a different XML file each time the Navigation View class is clicked, as there is no connection back from the Model class to the Document Class.
dai2
View Replies !
View Related
Multiple Swf Files
Im wanting to have multiple swf files on my website. There are around 5 that I want to load seperatly - but have a mouse listener in each one - which is why I want to keep them seperate.. however, I hear that if the swf files are added in multiple paramaters, they bog each other down? Whats the best way to add all of these swf files on my html page.. I could make a container - but was hoping to keep them seperate..
any ideas - more so - whats the best optimization method for this..
Thanks!
View Replies !
View Related
Preloading Multiple SWF Files?
Hello.
I have 4 swf files and when the 1st one finishes playing, it goes to the 2nd and plays, then to the 3rd and so on.
(by using loadmovie in Actionscript)
Is there a way to preload all 4 files at once and then play?
All the tutorials seem to only cover preloading a scene.
View Replies !
View Related
Pre-Loading Multiple SWF Files
Hey all,
I'm realy stuck even after all the help i had from you guys.
I'm having an opening SWf file with a game and a preloading animation.
The idea is to let people play this little game untill all the other swf files are loaded completely.
Where do i tell my first swf to pre-load all the swf files and what code should be used. I tried a bunch of things but i'm not the best (if not the worst) with scripts. My idea is that i have to give all the swf files there own pre-loaders, but i'm not sure.
As soon as all the swf's are loaded the game has to stay onscreen but the preloader animation has to be replaced by a button like "enter".
What to do?
Who can Help?
View Replies !
View Related
Preloading Multiple Swf Files
hi, thanks for any help. My question as stated in the Subject involves preloading multiple seperate swf files into the cache at one time. Heres the situation explained alittle better....
The page is set up starting with an intro which then brings you into the main page. The intro and first(or "main") page are two seperate swf files. From the main page you are able to click on 7 different links, each link loads another seperate swf file. Now i realize the best and easiest way to load is page is on demand, but my client has specifically said they do not want on demand loading, and they are very adamant on the point. So my actual question to the board is: how would i load all of the seperate swf files into the users cache before viewing the intro so that they are ready when links are clicked within the main page?
Feel free to Instant message me or email me if you would like to help, thanks.
View Replies !
View Related
Preloader Multiple Swf Files
hello out there,
can anyone tell me how to build a preloader which
loads about 10 movies into one main movie at once.
i also need to show the loading process in with a
loading bar.
i tried this (if u ned a fla file just tell me!):
frame 1:
stop();
this.createEmptyMovieClip ("a", 1010);
this.createEmptyMovieClip ("b", 1005);
this.createEmptyMovieClip ("c", 1001);
this.createEmptyMovieClip ("d", 1004);
a.loadMovie ("a.swf", 1);
b.loadMovie ("b.swf", 2);
c.loadMovie ("c.swf", 3);
d.loadMovie ("d.swf", 4);
this.onEnterFrame = function(){
TotalBytes = a.getBytesTotal()
+b.getBytesTotal()
+c.getBytesTotal()
+d.getBytesTotal();
LoadedBytes = a.getBytesLoaded()
+b.getBytesLoaded()
+c.getBytesLoaded()
+d.getBytesLoaded();
Percent = Math.round(LoadedBytes/TotalBytes*100);
if (LoadedBytes != TotalBytes) {
_level0.progessbar.gotoAndStop (Percent);
}
//progessbar is a movie with 100 frames to show the progress..
if (loadedBytes == TotalBytes && LoadedBytes > 0) {
_level0.nextFrame();
}
}
frame 2:
stop();
loadMovieNum("a.swf", 1);
loadMovieNum("b.swf", 2);
loadMovieNum("c.swf", 3);
loadMovieNum("d.swf", 4);
View Replies !
View Related
|