Loading SWF Files
Hi there, could someone point me in the right direction please;
i have a series of swf standalone games, (I dont have the .FLA files)
i want to display the swf files into a web page that is html only.
as i dont know the <object id> and such, the swf game loads full screen into the browser
I would like it to load to its default size in the browser, perhaps in a table cell,
i cant seem to find a solution,
Many Thanks
FlashKit > Flash Help > Flash MX
Posted on: 12-15-2004, 10:27 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Loading External Text Files With Links To .swf Files
i am loading a external text file with html links. I would like to know if anyone out there know how to make those links load .swf files, that would work with the levels hierarchy of the original level0 file. I tried passing a variable that would be detected by a movie clip on EnterFrame but no success, maybe I had written something wrong. Loading just the swf file will replace the html page on the browser.
Flash, Loading Files & Temp Internet Files
Hi guys,
I have a problem with files getting stored in the Temp folder of a client's machine.
When I host an SWF file on a site, that swf file gets downloaded to the client's (in this case , my) machine in the Temporary Internet Files. Now, if that same SWF is loading a text file or an XML file stored on the server to read data, using either LoadVars.load() or XML.load() method and a relative URL as path, that text or XML file also gets stored in the Temp files of the client machine.
I wanted to know, is there a way to prevent the text files and XML files from getting downloaded to client machines ? Or is that the way the load method works ?
If the swf files has a need to make repeated loads of the same file, will it read from this downloaded file or will it make repeated calls to the server ?
Please tell me if I can clarify the problem more.
Thanks for your help
~TNE
Loading .swf Files While Main Movie Clip Is Loading
Hello,
I know How to do a Loadmovie command, but I can only get it to work when I goto the Movie Clip that I have that command in. For ex:
In movie clip B I have a command: loadMovie ("Submovie.swf", "_root.MovieClipB");
Which works fine.
What I want to do is while movie clip A is playing I what a command to Start the Load movie function into MovieClip B.
I have tryed many diff. commands and Cannot get it to work
Any help?
Thanks
Importing Files/ Opening Files In Files/ Adding Files Into Scenes.
Alright Here is the deal.
I got some movies, which are seperate FLA. files, and I want to eventually add all these 4 seperate files, into scenes in one main FLA. file. How do I do this so that I have the symbols ect. I am pretty sure you can't just copy/paste.
Which FLASH** guru out there can lead me in the right direction?
greatly appreciated...
*g.guru.
Loading .MOV Files
Can someone help me out with a problem I am having loading a quicktime movie upon clicking a button. I want the movie to play in a quicktime video window since this will be on a cd. I also want the movie to stop and have the swf file come back to the top when the clip is finished. Any help would be of great value and appreciated more. THanks Guys.
Loading Txt Files
ok i have this on frame 1:
loadVariables ("songs.txt", "");
songsarray = songlist.split("
");
i = int(0);
in the txt field i need to know what syntax to put songlist in. like simply:
songlist=blah blah blah
blah blah
blah blah
dosent work in the above if you can understand what i mean thanks if not reply and i can fill in what ever im leavin out
Pre-Loading Several .swf Files?
I have a button that will load the main.swf file for a directory on my server, what I would like is to pre-load all the movies in that directory prior to the main.swf file loading, Can that be done??
If so, can you leave me directions as to how to get this done?? It would be greatly appriciated!!
Thanks
Kenny
Loading 3 Swf Files-- Plz Help
you have 3 swf files: first_load.swf, second_load.swf, and main.swf
first_load has a movie clip "second" that loads second_load.swf into it
main has a movie clip "first" that loads first_load.swf into it.
when i run first_load.swf it will load second_load.swf fine
when i run main.swf it will load first_load.swf but not second_load.swf
please help me out.
i've uploaded the .flas as well
thanks!
Loading Txt Files
i am making a standalone projector and im having trouble loading txt files into my movie. can someone tell me which frame i have to load files into. i have loaded 2 files into the first level of the movie (scene 1) but im having trouble getting others loaded into other parts of the movie (symbols and tweens) can anyone tell me how to do this
thanx
Loading Txt Files
I have a problem with a txt files, in local mode, i can load my txt files in my flash movies witohout any problem BUT on the SERVER the flash movie don't load the txt file, may be it's a target problem or i don't know, please help me!!!!!!!!THANK YOU
Loading From Different Ext. Txt Files
I have a problem loading from different txt files. text1.txt, text2.txt,... The all have the variable plaintext=blablabla.
When I try to load these files to different textfields in flash (f.e. text1, text2,..., flash gets confused loadvars doesn't work, he always loads the plaintext and gets mixed.
I enclosed the files. Please help, I'm looking for a sollution for days now.
Not All The Files Are Loading
Hi all,
I have a question about loading variables from external files.
Code:
loadText = new loadVars();
loadText.load("test.txt");
loadText.onLoad =loadVariablesNum("test.txt","0");
I have tried all I can think of to get my movie to work. If I take out the "loadText.onLoad =loadVariablesNum("test.txt","0");" everything loads just fine. Except the dynamic textfields dont load the variables from the .txt file. All my other variables,images etc. load fine. However if I include the last statement. The dynamic textfields do load the variables and the rest of my stuff doesn't load, such and the rest of AS and images. Any suggestions??
Thanks Joey
Loading Swf Files
Hey all,
I've been trying to teach myself some actionscript of late and have been fiddling around with it. Well, I'm making a movie that calls up another .swf file using the loadMovie command. It works fine and loads the movie except for one thing. The .swf file that it loads uses actionscript to duplicate a lot of objects on higher levels. I don't see why that would be a problem, but when the first movie loads the second movie, all of the original movieclips can be seen, but the ones duplicated don't show up. Is there something I'm missing about levels, or is this just something that happens?
Frozley
Loading Jpg Files (V5)
I have seen a lot of galleries, but have not found what I am looking for. No bells and whistles, just a simple way to load jpg files onto their own layers. Have tries load movie, but I have a lot of updating to do and would much rather not have to make an swf out of each jpg.
Appritiate the help.
-Poyla
Loading Swf Files?
I read somewhere that being able to load different SWFs into the main page (or movie) of your site is better because it reduces download time. I have done a google search and found nothing I could understand (the tutorials always seem to leave things out so that nothing ever works)
If anyone here knows of a tutorial that it is possible to follow for someone new to flash like myself, That would be great.
Also, If I do ever learn this technique, How do you know where the loaded SWF will appear on your main movie?
Might sound naive, but I am new and I have done my best to research this.
Thank you
Loading .exe Files
How do you launch an exe from flash at runtime.
ie: clicking on a button within the movie will launch an external exe file.
Help With Loading Swf Files
Hi,
I desperately need some help. I have a website with seven seperate swf files. The first is called intro, the second is home and the rest are suppose to be active when you click the menu in home. The problem I am having is that the intro takes you to the home swf, but then the home swf buttons don't work to load new swf files, but when I open the home sepeartely all the moies load properly. I can't figure where I have gone wrong. The code I am using is:
on (release) {
loadMovie("http://www.ghlcorp.com.au/home.swf", 0);
}
I have tried loading them into seperate levels, when I do I can see the movie playing underneath, the only way I can seem to get around it is to load all the movies into the same level, but when I do this intro links to home but then home won't link to anything else.
Your help would be so much appreciated. Thanks
Loading Different .swf Files
I created six .swf slide shows
I created my site in Dreamweaver
Can I put six different text links in my HTML page and (when clicked)have them load the different slide shows into the page? I am trying to avoid loading a new page with each slide show because my navigation would have to reload also and everything would be too slow.
Sort of swapping it out.
Hope you can help
Loading Txt Files In MX
I have been messing around with templates since I am new at flash. I have researched tutes and such for loading a text file into flash but have not had any luck being able to recreate it. Because this deals with Action Scripting, the tutorials I have found are a little over my head (and they start by saying you should have working knowledge of this and that). It seems like this would be such a simple, useful thing so that clients and whoever can update news and things on their website without having to edit the flash file.
Can anyone give me a step by step on how to have a text field load from a txt or html file?
On a different issue, still related to editing templates, one template I have uses png images that are transparent or using an alpha channel. I have used Photoshop for a long time (not fireworks though I have it now). How do I create my own image that will retain transparency when I import to library over the old png file that came with the template?
Thanks,
Wim
Loading Mx Vid Files
Hi again,
I just remembered another problem i was having.
I have exported a *.swf with only a short video inside it with controls.
When i import that into a main *.swf it tends not to show. When it is done downloading, and i click the link to import the video again, it completely loads it, BUT when i click right after and it isn't done downloading, it will give me the same problem. It half loads then disappears.
i don't understand.
Loading TXT Files
Ok. I need some major help. I have been using Flash for about a year now. Now I am working on my school's website and I need to be able to load an external TXT file into Flash so I can easily update the news section. First of all, how do I create a TXT file? Can I do it in SimpleText? My major question is how do I get the file into Flash? Do I use a dynamic text box or a movie clip? What actionscript do I use? Any help is greatly appreciated.
I am using Flash 5.
Thanks,
Jason
Loading Avi Files...
Is there a better way to loading an avi, mpeg, quicktime, etc. file from one of the buttons on the stage other than having it link directly to the video file in the folder the whole project is saved in?
Loading SWF Files
Hi,
I am new with Flash and i need a little help.
I have a menu....3 buttons and on the main time line i have the followind code.
one.onRelease = function() {
loadMovieNum("movieone.swf", 1);
};
two.onRelease = function() {
loadMovieNum("movietwo.swf", 1);
};
three.onRelease = function() {
loadMovieNum("moviethree.swf", 1);
};
this is simple but i want the buttons to communicate to the movies to do the following :
I click on button one. its movie plays
THEN i click on button 3 for example , button one movie goes to a frame when the movie alpha out and button 3 movie comes in......i hope this makes sense.
Loading Files = Can It Be Done?
Hi!
Right my situation is that i've been asked to produce a flash presentation that can be placed onto a CD, and then given out to
clients.
Probably and hopefully not that complicated - But I've encountered a few problems that i'd be eternally grateful for some help with;
Firstly is there a way I can set the commands for a button so that they open up another file? In this particular its a Acrobat Document - Now i've tried importing the file over - this doesn't work. So is there another way?!
Next I have a movie imported into my presentation, i want to set controls for two buttons one to start, and one to stop it. I've had sound files previously in flash and when i've stopped the presentation midway through the sound has continued playing - I'd like to avoid this in future - especially with this vid. So how do i do it? Stoping and starting! I don't want it to play automatically - it has to start when the user presses the button - not before! So how'd ya do it?
Help, help, help help, help!
Ta 'ery much Chucks!
Loading Files
Can flash load files(mp3,swf,text files) from sub directories like c:windowssectA1DCG.swf...?
If yes, how?
Regards!
[help] Loading .swf Files
Hey,
I was wondering how i can load a .swf file into a main file, then use an attachMovie function from the library of the loaded .swf
ex.
I have one .swf file called "tiles.swf" (one mc in it [linkage tiles])
the movie "main.swf" calls on the tiles file and then uses an "attachMovie" function to add in tiles from the "tiles" swf file
Kind of difficult to explain, but hopefully someone knows what im talking about
Phlook
Loading .gif Files, Possible?
I have
loadMovie("urlimage.jpg",0);
This works for .jpg, but the following doesn't work:
loadMovie("urlimage.gif",0);
How do I call up a .gif file, is it possible?
Loading SWF Files
Not sure what happed to my previous thread!! repost
Hi there, could someone point me in the right direction please;
i have a series of swf standalone games, (I dont have the .FLA files)
i want to display the swf files into a web page that is html only.
as i dont know theand such, the swf game loads full screen into the browser
I would like it to load to its default size in the browser, perhaps in a table cell,
i cant seem to find a solution,
Many Thanks
Loading MP3 Files
I want people to download MP3 files from my site. How would I do that?
Loading Txt Files
Hi all,
major actionscript issue here, i am trying to get this bio to work, The movie works however the bio.txt file in the root dir won't load, could someone please assist?
Greetings from amsterdam, holland
I have used actionscript in the movie as follows:
< on the first frame > textbox.loadVariables("bio.txt");
< on the last frame > textbox.loadVariables("bio.txt");
stop();
< the txtbox > contains the following to make it scroll >
onClipEvent (load) {
function scrollResize() {
lastHeight = scrollbar._yscale;
totalLines = (text.maxscroll - 1) + numLines;
newHeight = 100 * numLines / totalLines;
scaleDiff = Math.abs((newHeight - lastHeight));
currentPosition = scrollbar._y;
pixelDiff = currentPosition - (arrowUp._height - 1);
}
function scrollPosition() {
scrollbar._y = lineHeight * (text.scroll - 1) + (arrowUp._height - 1);
}
numLines = 18;
tolerance = 1;
speed = 5;
origHeight = scrollbar._height;
origX = scrollbar._x + 1;
text = "Loading file...";
}
onClipEvent (enterFrame) {
scrollResize();
if (lastHeight != newHeight) {
if (scaleDiff < tolerance && scaleDiff > -tolerance) {
scrollbar._yscale = newHeight;
heightDiff = origHeight - scrollbar._height;
lineHeight = HeightDiff / (text.maxscroll - 1);
rePosition = false;
text.scroll = 1;
scrollPosition();
} else if (newHeight < lastHeight) {
scrollbar._yscale -= scaleDiff / speed;
} else if (newHeight > lastHeight) {
scrollbar._yscale += scaleDiff / speed;
}
}
if (rePosition == true) {
currentPosition -= pixelDiff / speed;
scrollbar._y = currentPosition;
pixelDiff -= pixelDiff / speed;
if (currentPosition == (arrowUp._height - 1)) {
rePosition = false;
}
}
if (startScroll == true) {
if (scroll == "up" && text.scroll > 1) {
text.scroll--;
scrollPosition();
}
if (scroll == "down" && text.scroll < text.maxscroll) {
text.scroll++;
scrollPosition();
}
}
if (paging == true) {
if (hitLocation < scrollbar._y) {
text.scroll -= numLines;
scrollPosition();
if (hitLocation >= scrollbar._y && hitLocation <= (scrollbar._y + scrollbar._height)) {
paging = false;
}
} else {
text.scroll += numLines;
scrollPosition();
if (hitLocation >= scrollbar._y && hitLocation <= (scrollbar._y + scrollbar._height)) {
paging = false;
}
}
}
}
onClipEvent (mouseDown) {
if (scrollArea.hitTest(_root._xmouse, _root._ymouse) and !scrollbar.hitTest(_root._xmouse, _root._ymouse)) {
hitLocation = this._ymouse;
paging = true;
resize = false;
}
if (arrowUp.hitTest(_root._xmouse, _root._ymouse)) {
scroll = "up";
startScroll = true;
arrowUp.gotoAndPlay(2);
resize = false;
}
if (arrowDown.hitTest(_root._xmouse, _root._ymouse)) {
scroll = "down";
startScroll = true;
arrowDown.gotoAndPlay(2);
resize = false;
}
if (scrollbar.hitTest(_root._xmouse, _root._ymouse)) {
startDrag(scrollbar, false, origX, (arrowUp._height - 1), origX, (heightDiff + (arrowUp._height - 1)));
scroll = "scrollbar";
scrollbar.gotoAndPlay(2);
resize = false;
}
}
onClipEvent (mouseUp) {
scroll = "";
startScroll = false;
paging = false;
stopDrag();
resize = true;
scrollbar.gotoAndStop(1);
arrowUp.gotoAndStop(1);
arrowDown.gotoAndStop(1);
}
onClipEvent (mouseMove) {
if (scroll == "scrollbar") {
text.scroll = Math.round(((scrollbar._y - arrowUp._height) / lineHeight + 1));
if (scrollbar._y == Math.ceil(((arrowDown._y - (arrowDown._height - 1)) - scrollbar._height))) {
text.scroll = text.maxscroll;
}
}
updateAfterEvent();
}
onClipEvent (data) {
rePosition = true;
scrollResize();
text.scroll = 1;
}
Loading Files
Hi
Using the loadMovie script to load some presentation. However, they load up in different size window. How can I get then to load full screen?
Loading Different XML Files
hi,
im a bit of a begginer at actionscript so please bare with me if this is pretty simple. Basically i have been given the code below to work with and want to beable to select different xml files to load depending on what one the user chooses. I have written the statement at the bottom called function GetOntology, however this does not appear to work. I'm not sure if it is a logical problem or an error in this statement.
Heres the code anyway and would much appreciate any ideas, Thanks john
(iv changed the colour of my code to navy blue)
<code>
//funtion in order to parse the XML file
function parseXML(creatXML) {
//defining a new array to get the object created in the following for loop
parseArray = new Array();
for (i=0; i<creatXML.childNodes.length; i++) {
//create an object with name of node in the XML and fill values in XML node to variables in the object
this[creatXML.childNodes[i].nodeName] = new Object();
this[creatXML.childNodes[i].nodeName].name = creatXML.childNodes[i].nodeName;
this[creatXML.childNodes[i].nodeName].isa = creatXML.childNodes[i].attributes.isa;
//uses split to create an array
this[creatXML.childNodes[i].nodeName].has = creatXML.childNodes[i].attributes.has.split(",");
//assigns the object with the array parseArray to give an array of objects
parseArray.push(this[creatXML.childNodes[i].nodeName]);
}
// ends for loop
//sets the array createsArray to ParseArray
_global.creaturesArray = parseArray;
}
// End of the function
//New Function to take the name of the creatures and assign the array to the comboboxes
function parse1XML(creat1XML) {
comboNameArray = new Array();
for (i=0; i<creat1XML.childNodes.length; i++) {
this[creat1XML.childNodes[i].nodeName] = new Object();
this[creat1XML.childNodes[i].nodeName].name = creat1XML.childNodes[i].nodeName;
comboNameArray.push(this[creat1XML.childNodes[i].nodeName]);
Compare1.dataProvider = comboNameArray;
Compare2.dataProvider = comboNameArray;
}
// end of for
_global.creaturesArray = parseArray;
}
// End of the function
//takes the value of the creature name
function getParents(creatureName) {
//clears currentISA
currentISA = "";
//creates a new array
parentArray = new Array();
//adds creature names to array
parentArray.push(creatureName);
for (creatureIndex=getIndex(creatureName); currentISA != null; creatureIndex=getIndex(currentISA)) {
//takes value from object and pushes it to the new array
currentISA = _global.creaturesArray[creatureIndex].isa;
parentArray.push(currentISA);
}
// ends for loop
//removes the last element fromt the array and returns the new value
parentArray.pop();
return (parentArray);
}
// End of the function
function getIndex(creatureName) {
//creates a new array
localArray = new Array();
creatureIndex = null;
//assigns the new array to the creaturesArray
localArray = _global.creaturesArray;
for (i=0; i<localArray.length; i++) {
//compares al values in local array which are equal to creatures array
//to see if the entry matches the parameter creatureName passed to the function
if (localArray[i].name == creatureName) {
creatureIndex = i;
break;
}
// end if
}
// end of for
return (creatureIndex);
}
// End of the function
function relateCreatures(creature1, creature2) {
matchFound = false;
returnMsg = "";
creature1Array = new Array();
creature1Array = new Array();
creature1Array = getParents(creature1);
creature2Array = getParents(creature2);
for (i=0; i<creature1Array.length; i++) {
for (j=0; j<creature2Array.length; j++) {
if (creature2Array[j] == creature1Array[i]) {
matchFound = true;
returnMsg = creature1Array[0]+" and "+creature2Array[0]+" are both in the "+creature2Array[j]+" family";
_global.creature1Array = creature1Array.slice(0, i+2);
_global.creature2Array = creature2Array.slice(0, j+2);
break;
}
// end if
}
// end of for
//procedure to call function if a match is found
if (matchFound == true) {
_global.drawRelationship = true;
drawRelationship();
break;
}
// end if
}
// end of for
//fall out if a match is not found
if (matchFound == false) {
_global.drawRelationship = false;
_global.creature1Array.splice(0, global.creature1Array.length);
_global.creature2Array.splice(0, global.creature2Array.length);
returnMsg = "No relationship between "+creature1Array[0]+" and "+creature2Array[0]+" could be found!";
}
// end if
//displays message if the names matched
return (returnMsg);
}
// End of the function
//new function in order to gather creature names from combo boxes to be compared
function Relate() {
AnswerText.text = relateCreatures(Compare1.text, Compare2.text);
}
// End of the function
function hasProperties(arrProperties) {
rtnMessage = "";
for (i=0; i<_global.creaturesArray.length; i++) {
for (j=0; j<_global.creaturesArray[i].has.length; j++) {
for (k=0; k<arrProperties.length; k++) {
if (arrProperties[k].toString() == _global.creaturesArray[i].has[j].toString()) {
rtnMessage = rtnMessage+(_global.creaturesArray[i].name+" has "+arrProperties[k]+"
");
}
// end if
}
// end of for
}
// end of for
}
// end of for
if (rtnMessage == "") {
rtnMessage = "No match found for "+arrProperties.toString();
}
// end if
return (rtnMessage);
function GetOntology(){
if (cboOntology.text == "Creatures") {
ontologyXML.load("creatures.xml");
}
else{
ontologyXML.load("cars.xml");
}
}
//end if
}
// End of the function
_global.creaturesArray = new Array();
_global.drawRelationship = false;
_global.creature1Array = new Array();
_global.creature2Array = new Array();
ontologyXML = new XML();
ontologyXML.ignoreWhite = true;
ontologyXML.onLoad = function(success) {
parseXML(this.firstChild);
parse1XML(this.firstChild);
parse2XML(this.firstChild);
};
ontologyArray = new Array("Cars","Creatures");
cboOntology.dataProvider = ontologyArray;
//ontologyXML.load("creatures.xml");
</code>
Loading Files
How do you load a file from a user's computer. And also write in it?
[MX] IIS Loading SWF Files - HELP
Hello,
I have been searching endlessly on Google for this problem, and have yet to find any articles on how to resolve this, or what the issue is in the first place.
Basically, I have an swf file embedded into an ASP and a HTML page.
When the HTML page is run normally the SWF clip loads no problem. (file://)
But if i load the page from the localhost (http://localhost/.......) the swf File will not load.
The page does not hang, no errors, you can leave it for hours and it still says loading page... and the swf movie clip never appears.
This is obvoisly an issue with IIS, as they work when not run through the localhost. If i upload this to my remote web-server that uses IIS it works fine, so there must be a setting or something wrong in my IIS.
Its the same for all browsers, Netscape, IE, mozilla - If the page is run through the localhost the clip never loads, and the page always say... still loading...retrieving from localhost
Better Loading SWF Files
I am fairly new to flash. I created a preloader that starts with a Preloader scene that contains 1 graphic and one line of text "gallery loading...". The dots appear 1 after each other every 5 frames for 25 total frames. I am using the following action script in the first frame of the preloader scene:
Code:
if (_root._framesloaded >= _root._totalframes) {
gotoAndPlay("Gallery",1);
}
and this script on the last frame (frame 25) of the preloader scene:
Code:
gotoAndPlay(1);
When you load the page it is taking a very long time for the preloader to appear... then the preloader appears and just after that the flash movie runs (the flash movie is the second scene called Gallery). It seems like the way I have it setup the preloader isn't appearing until almost the entire movie is loaded (i think... it is taking too long)?
I also noticed that 1 of my swf files (editorial) loads quicker and is less than 1 meg in size while all of the other files, which are setup the same way are about 3.5 megs... I checked the basic publishing settings and I can't figure out why the one files is soo much smaller...
Can someone explain and/or point me to a better preloader tutorial or method. I am looking to learn so any explanation is very very helpful!
You can view the site here: http://www.bellissimofoto.com/dallas...otography.html
Loading Mp3 Files
is loading mp3 files any different than loading other files, .jpeg,.html,... ? can I load the mp3 completley before playing it or it should buffer --->play buffer--->play ?
Loading SWF Files Via XML
I have created a flash movie that loads in a static URL with a .swf extension and then on a button action loads. It works out well, however, I'd like to take the next step. I want to load exactly several movies with an XML file and have the first movie load by default, and then have a forward button and back button to move back and forth through the movies. How can I do this?
Loading .as And Xml Files
I know you can only load .as files from the same directory as the .swf - it seems to be the same with .xml files - has anyone been able to load an xml file from other sub directories?
Also, I had some glitch when I was loading .as files and xml files. The code worked fine as long as I loaded one or the other, but not both. They were loaded into separate arrays...
Po~
Loading 2 XML Files At Once?
I have this:
ActionScript Code:
function loadXML(loaded) {
if (loaded) {
_root.newsdate = this.firstChild.childNodes[0].firstChild.nodeValue;
_root.heading = this.firstChild.childNodes[1].firstChild.nodeValue;
_root.news = this.firstChild.childNodes[2].firstChild.nodeValue;
_root.author = this.firstChild.childNodes[3].firstChild.nodeValue;
date_txt.text = _root.newsdate;
topic_txt.text = _root.heading;
update_txt.text = _root.news;
author_txt.text = _root.author;
} else {
trace("file not loaded!");
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("updates.xml");
I have another XML file which i want to load on the same frame... how do i go about this, tried copying my current code and modifying it but it will load only one of them... im sure it's simple... as i have just started using XML to update data in flash. At the moment i just want some dynamic textfield to be updated...
Loading AS2 .swf Files
I've been tearing my hair out trying to figure out how to properly load old AS2 .swf files so that they don't have mouse issues, or cause my AS3's timeline to screw up. The main problem comes down to:
The old AS2s are using _root within their source code and its creating major bugs as when I load the AS2 it somehow sets its AS2's root to the AS3 container, this causes major mouse event bugs, screws with my AS3's timeline etc...
Now, this would be an easy fix if I had access to the old AS2 source code (which I don't) by adding _lockroot = true in the first frame of every AS2 .swf. That would lock the root of the AS2 to itself, but I don't have access to do that. So I tried to make a separate AS2 loader with _lockroot = true that simply loads the old AS2s and then I would load the AS2 loader into my AS3 .swf. This didn't work because what would happen is the addchild("AS2 loader") would execute before the AS2 loader had completed loading the old AS2 .swf and nothing would be displayed. For this to work somehow I would have to sent a custom Event.COMPLETE from the AS2 Loader to the AS3, but I don't think that is possible?
Anyways, basically I'm just trying to load old AS2 .swf which I don't have the source code for anymore without them having mouse issues or causing the AS3 timeline to screw up.
Here is the basic AS3 loading code I'm using,
Code:
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
var request:URLRequest = new URLRequest(url);
loader.load(request);
public function completeHandler(event:Event):void {
this.addChild(event.target.content);
}
Thanks in advance
Help Loading Different .swf Files, Help Please
ok so can someone explain this to me, im new to as3, i got the code to LOAD an external.swf. but the problem is, it only loads the 1 swf properly.
heres what i mean
im working with a book and in the example/tutorial it tells me to load an external swf called "movie.swf"
var imageRequest:URLRequest = new URLRequest("movie.swf");
var imageLoader:Loader = new Loader();
imageLoader.load(imageRequest);
addChild(imageLoader);
now when i put another .swf in place of that "movie.swf" the preivew window comes up with a blank screen. and when i change the .swf BACK to "movie.swf" it works again. and im putting the swf file in the same folder as the fla.
can anyone tell me why it wont load anything OTHER then that "movie.swf" ? oh heres another thing, i got help from this forum and the code works also when i want to load the "movie.swf" but if i try and put in a different swf name nothing happens blank screen
var myLoader:Loader = new Loader();
var url:String="movie.swf";
var myRequest:URLRequest = new URLRequest(url);
myLoader.load(myRequest);
addChild(myLoader);
Loading Txt Files
The purpose for my question is to determine if I am doing something in the most effecient way. For my movie I have several txt files that I will need to access.
Typically, I load the txt files on the frame that I need the information using the LoadVars() object. Is it necessary to load the txt file at each frame where information is needed or can everything be loaded in the start of the movie? I have never been very clear on this part of flash.
Help With Loading Flv Files
Ok guys, I am building a site in cs3 and using action script 2. So when you open my page a short video is supposed to load and play. This works, but then I want it to go to the second frame and just loop there. This does not work. Then I have some buttons on the sides that will go to a new frame and play another video, this doesn't even want to work. I don't know what I am doing wrong. Any help would be great. here is where my site is http://www.emoneydesigns.com/edible_arrangements/tasteful_tales.html
if you would like to see my fla, here it is http://www.emoneydesigns.com/edible_arrangements/tasteful_tales.fla
Loading Swf Files
I am loading swf files from past jobs into my online portfolio which i have put off from some eight years. Some of the past work are banners, interactive multimedia pieces and self-running presentations. My question is this, How can I if possible load these movies of multiple sizes and inactivity into my online portfolio?
I'm in CS3. Is there any way of loading the swfs at a certain size to fit my present layout and to mask them off if possible?
Thanks Brian
Loading PHP And XML Files
I am trying to load a php that outputs xml data from a database. It then calls a function to display the thumbnails. For some reason I can't get the php file to load. Can anyone help. I have spent all day looking at the code and cant figure out why its not working. Thanks heaps
Attach Code
Thumbs = function () {
this.__init__ ();
};
Thumbs.prototype = new MovieClip ();
// ** init class ** //
Thumbs.prototype.__init__ = function () {
this._xscale = 100
this._yscale = 100
//this._thumbs_.unloadMovie()
this._dataProvider = new Array ();
this._count = 0;
this._depth = 1;
this._isLoaded = -1;
if (this._S_) {
clearInterval (this._S_);
}
this._xmlfile='get_category_index.php';
if (this._xmlfile != "") {
this.loadPHPXML (this._xmlfile);
}
};
Thumbs.prototype.loadPHPXML = function (x) {
var _xml = new XML();
_xml.ignoreWhite = true;
_xml.path = this;
_xml.load (x);
_xml.onLoad = function () {
trace(this.firstChild.childNodes.length);
for (var i=0; i< this.firstChild.childNodes.length; i++) {
var _categoryName = this.firstChild.childNodes[i].attributes.catname;
var _catID = this.firstChild.childNodes[i].attributes.catid;
var _img = this.firstChild.childNodes[i].firstChild.nodeValue;
this._dataProvider.push ({img:_img, categoryName:_categoryName, catID:_catID});
};
delete this;
};
this.selectThumbs();
trace(this._dataProvider.length);
}
Thumbs.prototype.selectThumbs = function (first) {
trace(this._dataProvider.length);
for (var i = 0; i<this._dataProvider.length; i++) {
//for (var i = 0; i<3; i++) {
// set variables - you can adjust gap and columns
//this.thumbMC._alpha = 100;
var name = i;
var gap = 50;
var columns = 3;
var startx = 0;
var starty = 0;
var w = this.thumbMC._width;
var h = this.thumbMC._height;
var x = (i%columns)*(w+gap);
var y = (Math.floor(i/columns))*(h+gap);
// duplicate button
this.thumbMC.duplicateMovieClip(name, i,this.getNextHighestDepth());
// position button
this[name]._x = x+startx;
this[name]._y = y+starty;
// load image
this[name].imageMC.loadMovie("gallery/"+this._dataProvider[i].img);
// when clicked
this[name].onRelease = function() {
trace(image[this._name]);
//Object.Main.containerMC.loadPic(image[this._name],theGallery, this.j);
// this._alpha = 50;
};
};
// hide the thumbMC (original)
this.thumbMC._visible = false;
}
Thumbs.prototype.isLoaded = function (num) {
this._isLoaded = num;
};
Object.registerClass ("Thumbs", Thumbs);
//////////////PHP FILE///////////////////////////////
include("conf.php");
$qr = mysql_query("SELECT * FROM photo_category WHERE parentID=0",$server); echo mysql_error();
$nrows = mysql_num_rows($qr);
$nl = "
";
echo "<?xml version="1.0" encoding="UTF-8" ?>" . $nl;
echo "<ROOT>".$nl;
for ($i=0; $i < $nrows; $i++) {
$row = mysql_fetch_array($qr);
echo "<imageUrl catname="".$row['name']."" catid="".$row['ID'].""><![CDATA[".$row['image_url']."]]></imageUrl>".$nl;
}
echo "</ROOT>" . $nl;
Loading SWF Containing XML To JPG Files
I was wondering if someone could help me with this flash problem. It’s probably really easy (one or two lines of code) but for some reason I can’t seem to figure it out.
I simplified the design to make it easier. I just need help with the code. I’m trying to load “slideshow.swf” (after “but2” is pressed) into “mainPage.swf”. If you play the slideshow.swf by itself it works exactly how I want it to. But when you execute the mainPage.swf with the loaded slideshow.swf file most of if seems to work (after pressing "play") except that the jpg slide show does not start and no jpg images load up at all. The xml files controls the jpgs and the text and since the text part works I know that it sees the .xml file… so something is not letting the jpg’s work.
I’m using flash 8 and Action 2 (haven’t upgraded CS3 yet).
I really appreciate any help.
Tim
Here's the link to the files:
zip:
Flash Gallery Project Zip
rar:
Flash Gallery WinRar
Loading New XML Files
Hello, I am trying to make a mp3 player with different channels of music. The player can load an xml file and then it does play on complete. My problem is loading a new xml file with different music and having it play the new playlist.
does anyone have any ideas on how to successfully do this?
here is what i have tried but is not working.
Attach Code
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, whenLoaded);
loader.load(new URLRequest("songList.xml"));
function onDown(e:MouseEvent):void{
switch(e.target.name){
case "genre":
trace("genre")
loadNewXml("genre.xml");
break;
case "genre2":
trace("genre2")
loadNewXml("genre2.xml");
break;
}
}
// xml complete listener
function onLoadXML(e:Event):void{
xml = new XML(e.target.data)
trace(xml);
}
// custom method used to load in xml data
function loadNewXml(path:String){
loader.load(new URLRequest(path))
loader.addEventListener(Event.COMPLETE, whenLoaded);
}
function whenLoaded(e:Event):void {
xml = new XML(e.target.data);
songlist = xml.music;
getMusic = new URLRequest(songlist[0].path);
music.load(getMusic);//load music
soundChannel = music.play();
soundChannel.addEventListener(Event.SOUND_COMPLETE, nextSong);//runs the next song function when a song completes
}
genre.addEventListener(MouseEvent.CLICK, c1);
function c1 (event:MouseEvent): void {
stopSoundChannel(genre);
theCurrent=1;
onDown();
}
genre2.addEventListener(MouseEvent.CLICK, c2);
function c2 (event:MouseEvent): void {
stopSoundChannel(genre2);
theCurrent=2;
onDown();
}
Edited: 08/31/2008 at 10:18:53 AM by ervarner
Loading Swf Files
If i want to load say 3 swf files into empty movieclips from the main timeline, should i load them one by one in each frame or can i load all of them in just one frame??
I know that i can make a progressbar for each swf in their own swf file but, is it possible to make a progress bar from main timeline for all movieclips togehter, a "total" loading progressbar??
Loading SWF Files
Hello Fellows
Its been while since I last bothered you I needed to know how can I load a movie in such a way that the movie existing on the lower level is not onscured by newer movie. I have seen it on a web site what it did was simple he had differnet swf files one of them was called background.swf and the other was content.swf both these files were loaded in a third file say parent.swf, make changes in an of the file(background and/or content) and run parent.swf youd see the difference applied on those files. It suggests that there definitly is a way to do it coud anyone tell me how can we do that. I'd appreciate anyways thanx in advance hope to hear from u guys.
Wadood
|