Trouble With Xml.load
I'm trying to load an xml file, but am getting nothing (althought I get a 0 status). When putting in the path, I've tried both "/" and "" (with I had to use \).
So how do I enter the path?
FlashKit > Flash Help > Flash MX
Posted on: 06-25-2002, 11:05 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Please Help Me (I'm In A Load Of Trouble)
I'm in a real bind here...I have a huge project due and I have stumbled into a major glitch that I can't solve.
I am making a flash demo of the product that our company sells, and it is rather long (which is the way management wanted it).
Because of it's length, I figured that I would divide the movie into eight different sections and then set up preloaders for each section (just in case that entire section isn't loaded).
Everything works great, except for one problem: I had to build a "quick jump" menu into the movie so that people could jump to any of the eight sections instantly without waiting through the rest of the movie. I seperated each section using frame labels, and the problem is that if the frame label isn't loaded corresponding to the frame that the user wants to jump to...well the menu doesn't work.
In other words, if I load up this movie from the web, and just as the movie is getting started I want to jump to section eight, I won't be able to because the label for frame eight isn't loaded yet.
I also tried doing it be specifying the frame number, but if the frame number is higher than what is loaded, it merely advances you to the highest frame that has been fully loaded.
Is there ANY way that I can get my menu to jump to a place in the movie and immediately start loading from that frame on?
If you can help me out, I thank you profusely. I'll include the code that I have used in each of the buttons in my menu...in case that might help.
THANK YOU, THANK YOU, THANK YOU!!!
NL
Here is a graphicless version of the movie in question:
http://www.jason-petersen.com/ICServ/index.html
Code for each menu button:
Note 1: The menu is designed to slide out when they click on the menu tab, and then slide back in once they click a section. The first gotoAndPlay simply slides the menu back in.
Note 2: The menu is in it's own MC, which is why I had to include the tellTarget ("_root") command in the second gotoAndPlay. Second goto is the one that jumps the main movie timeline forward to each of the sections.
on (release) {
gotoAndPlay ("menuin");
menu = "1";
tellTarget ("_root") {
gotoAndPlay ("Hosting");
}
}
Trouble In 'load URL', Plz Help
hi, i'm working on a freelance project and something is not working.
can you make a button to load a URL(another flash movie) and go to a specific frame in it?
deadline is coming up, help plz!!
Load Movie Trouble
I have deadline in two days to deliver website to my client and site doesn't work properly.
I have flash movie that is consist out of three MC(top navigation, content-middle section, and bottom sub menu). When exported as a one piece, one flash file, everything seems fine. Clicking top navigation button that calls another movie to load in middle section(loadmovie/target) which it does fine but frame rate kind of drops from 25 fr/s to 1 fr/s. All three movies slow down(barely moving, ha).
If you know how to fix this problem please help, i would realy appreciate.
Trouble In Load Txt After Wroten By Asp
hey,someone help
i write some asp code:writeline("c="&myvariable),then the text wrote
c=variable,but it added a ENTER end of it,so,when i use loadvariable(mytext,0) in my flash to load the text,it did not work,
oh,how can i do with the unwanted ENTER,let flash load my text?
thanx
Trouble With Load Movie
Hi, I have created a blank movie clip with the instance name "contents" and then put this code on my button:
PHP Code:
on (release) {
_root.contents.loadMovie("portfolio1.swf");
}
When I try it with a swf that I made using the original movie, it will display only one of the background layers, but when I try it with any other swf it does nothing. Does anyone know what the problem might be? I have attached the fla.
Thanks!
Load Movie Trouble
I have been working on a gallary section for a web site and I am having some trouble getting some of the pics to load Here is the like to my site where it is hosted.
>http://web.tampabay.rr.com/agraser/gallary-p.html<
I have all the code right Beacause the same code is used for the top and bottom rows of pics that I used for the Non-workjing links any suggestions would be helpfull.
If you need me to post the FLA I will.
Trouble With Random Swf Load
Using MX 6.0
-------------------
My movie starts with base.swf at level0 frame 1 which calls movie.swf to level2 then stops at frame 2.
Movie.swf on level2 executes an animation which at its end commands level0 playhead to move ahead to frame 3.
Frame 3 of level0 executes a command to randomly pick and load banner*.swf to level1 and then move its playhead back to frame 2 with stop command.
At the end of each externally loaded banner a command tells level0 playhead to move ahead to frame 3 and do it all over again.
I currently have 2 banners and the process works fine for 2 cycles and then it freaks out and something seem to be placing the playhead of level0 in constant loop of frame 3 so it keeps calling banners without the banner playing to its end.
The following is the random load script I am using on frame 3 of base.swf at level0
Code:
movies = ["banners/flash/banner1", "banners/flash/banner2"];
loadMovieNum(movies[Math.floor(Math.random() * movies.length)] + ".swf", 1);
gotoAndStop(2);
base.swf and movie.swf are 2 folders outside the banner folder.
Can anyone assist with this problem? Thanks.
Load Movie Trouble
I've been having some trouble getting my external swf files to load into this navigation setup. I've tried doing it outside of this setup and it seems to work but I can't get it to work on this project. Please take a look at the file and call me a moron then throw some suggestions at me. All I'm looking for, right now, is to get one of the external swf to load in the center when one of the nav buttons is clicked. Also is that the best way to do it? or should I be loading/attaching the movie clip within the main fla?
http://www.WagonNation.com/squirrel/SliderTest.zip
Load Movie Trouble
I'm loading an image into a frame with a button containing the code...
function loadcover(theFile) {
cover.loadMovie("http://www.mysite.com/"+theFile);
cover._height = 100;
cover._width = 100;
cover._x = 25;
}
Now everything is ok however the first time this is run the image is loaded in real size so if the image is 480x600 it will load at that size and ignore the set size. But if I push the button again the image is resized to the correct size. And any image loaded after the first is in the correct size. Any reason why this is happening?
Trouble Getting Mp3s To Load
Hi everyone. I have an mp3 song play list but having some trouble getting songs to load. I followed a tutorial at http://kennybellew.com/tutorial/preload_multiple.htm, but it seems that some songs don't play after loading has finished, I'll have to hit play a couple times for it to play. My only guess is the fact I am using Flash 8? maybe the coding should be a little different? a little confused. Ive attached the fla with songlist txt files to load but adding audio files would be to big. The audio files are sample 30 sec clips.
Load Movie Nav Bar Trouble
jan1st2004
I am building up a site in flash on which there are a 7 buttons navigation bar ;
Buttons are home , introduction , company , depts , services , location , contact and
they´re on a base movie ;
As one of the buttons is clicked the correspondent movie will be loaded ; for
instance , services button is clicked 1st and then - loadMovieNum("flash/services.swf",5); -
services movie will be loaded on level 5 ;
Let´s suppose then that introduction button is clicked , services has to be unloaded and
introduction to be loaded (following the order on level 2) ; and so on the navigation will
be made by loading and unloading movies.
The trouble is that buttons may be clicked randomly and the last movie will have to unload
to allow the next on to load ;
Is there a reasonable simple way to do it ?
Adding Load Bar Trouble
hey guys, i think i posted this once before but i still havnt gotten a solution.
basically what i want to achieve is a site like the "Preloader and Transition for Dynamic Files" tutorial but where it says "loading" i want to replace with a loading bar. now i thought this would be pretty simple and straight forward but as hard as i try to make it work, it wont
this is my best guess so far in the 'content' actionscript
onClipEvent (enterFrame) {
if (!loaded && this._url != _root._url) {
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.transition.loadBar._width = getPercent*100;
_root.transition.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
loaded = true;
_root.transition.gotoAndPlay("opening");
}
}
}
i thought that should work but it doesnt? can anyone help me out? ill really appreciate some help.
cheers, evan
Popup Load Trouble
I'm almost done with my friend's photo portfolio site. Unfortunately it's being a b***h and won't do what it's told, even after repeated batterings . Basically the popup page will say "Done" in the lower left, but all I'll see is a black page, sometimes after closing and reopening - it opens properly, but only after a long pause and the preloader is visible for only a millisecond. The swf file is ~3M, not that bad imho.
You can view the problem here (just click the entry image to launch the popup):
http://www.aieou.com/photoslug/index.htm
Do try the above first, coz if you open the swf (below) the problem appears to go away. It's that first load and the preloader being there for a miliisecond that's irking me.
http://www.aieou.com/photoslug/pslug4.swf
and the fla:
http://www.aieou.com/photoslug/pslug4.fla
Any help/advise would be very much appreciated.
Peace,
Kombo.
///
Load Movie Nav Bar Trouble
jan1st2004
I am building up a site in flash on which there are a 7 buttons navigation bar ;
Buttons are home , introduction , company , depts , services , location , contact and
they´re on a base movie ;
As one of the buttons is clicked the correspondent movie will be loaded ; for
instance , services button is clicked 1st and then - loadMovieNum("flash/services.swf",5); -
services movie will be loaded on level 5 ;
Let´s suppose then that introduction button is clicked , services has to be unloaded and
introduction to be loaded (following the order on level 2) ; and so on the navigation will
be made by loading and unloading movies.
The trouble is that buttons may be clicked randomly and the last movie will have to unload
to allow the next on to load ;
Is there a reasonable simple way to do it ?
Adding Load Bar Trouble
hey guys, i think i posted this once before but i still havnt gotten a solution.
basically what i want to achieve is a site like the "Preloader and Transition for Dynamic Files" tutorial but where it says "loading" i want to replace with a loading bar. now i thought this would be pretty simple and straight forward but as hard as i try to make it work, it wont
this is my best guess so far in the 'content' actionscript
onClipEvent (enterFrame) {
if (!loaded && this._url != _root._url) {
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.transition.loadBar._width = getPercent*100;
_root.transition.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
loaded = true;
_root.transition.gotoAndPlay("opening");
}
}
}
i thought that should work but it doesnt? can anyone help me out? ill really appreciate some help.
cheers, evan
Load A Mc Then Move Within It ..trouble
Code:
function dataRummet() {
loadMovie("linje.swf", "tv");
_root.tv.gotoAndStop("slut");
};
Why doesn't my second row in the function work?
It's a simple animation that loads all right in the mc "tv".
But when I tell it to go to a certain place in the movie (and I have tried frame numbers too) it doesn't work.
Something simple I've missed??
Could it be that the whole movie hasn't loaded? How do I solve that?
/Ottomannen
Load External .swf = You Are In Trouble
Hi,
I have a small problem. I am trying to load some images to some buttons on a menu.
The buttons work fine, but when I load the images (external .swf) onto the buttons, all the features of the holding MC (the button) are lost, such as the event handlers that were assigned to them.
What am I missing here?
I’ll give you two example codes that I have been working with. The first one works just fine, but has no images loaded onto the buttons. The second code loads the pictures to the buttons, but are like static images, nothing happens.
NOTE: As I have no problem with the XML bit, I did not post this in the XML forum.
ActionScript Code:
// The buttons have been attached and work OK
XML.prototype.xmlLoaded = function() {
var child_array = this.firstChild.childNodes;
var lngth = child_array.length;
_global.picButt = new Array();
for (var i = 0; i<lngth; i++) {
// create buttons
picButt[i] = buttHolder_mc.attachMovie("picButt", "picButt"+i, i);
// give butt qualities
picButt[i].isButt();
// add pic properties
picButt[i]._picName = child_array[i].attributes.NAME;
picButt[i]._picDate = child_array[i].attributes.DATE;
picButt[i]._picWidth = child_array[i].attributes.WIDTH;
picButt[i]._picHeight = child_array[i].attributes.HEIGHT;
// position buttons
i == 0 ? picButt[0]._x=0 : picButt[i]._x=picButt[i]._x=picButt[i-1]._x+64;
}
};
ActionScript Code:
// Here I try to load external picture holding MCs.
// picture swfs are loaded, but do not have access to the button events the holder MC were assigned.
XML.prototype.xmlLoaded = function() {
var child_array = this.firstChild.childNodes;
var lngth = child_array.length;
_global.picButt = new Array();
for (var i = 0; i<lngth; i++) {
// create buttons
picButt[i] = buttHolder_mc.createEmptyMovieClip("picButt"+i, i);
// give butt qualities
picButt[i].isButt();
// add pic properties
picButt[i]._picName = child_array[i].attributes.NAME;
picButt[i]._picDate = child_array[i].attributes.DATE;
picButt[i]._picWidth = child_array[i].attributes.WIDTH;
picButt[i]._picHeight = child_array[i].attributes.HEIGHT;
// position buttons
i == 0 ? picButt[0]._x=0 : picButt[i]._x=picButt[i]._x=picButt[i-1]._x+64;
// modified bit
picButt[i].loadMovie("foto/"+picButt[i]._picName+".swf");
}
};
Trouble In Load Txt After Wroten By Asp
hey,someone help
i write some asp code:writeline("c="&myvariable),then the text wrote
c=variable,but it added a ENTER end of it,so,when i use loadvariable(mytext,0) in my flash to load the text,it did not work,
oh,how can i do with the unwanted ENTER,let flash load my text?
thanx
Load Movie / Targetmovie Trouble ....
Hi All,
I am using the following to load a movie into a target MC:
Code:
on (release) {
loadMovie("illuminator.swf", "_root.containergeneric");
setProperty ("_root.containergeneric", _y, "24");
setProperty ("_root.containergeneric", _x, "0");
}
For some unknown reason the user must click the button twice for the load to actually happen
Does anyone know why ???
Cheers!!!
URL: http://www.millenniumit.com.au ...click on any nav button to see what i mean....
PS: I have posted this prob 2 times now...and still i cant resolve the issue...lets go for a 3rd time lucky!!
Load Movie Deep Trouble...please Help
I've made another movie that's too big and needs breaking up. I'm
finding it, however, very hard to learn a simple way of doing this.I have 1 movie with 5 scenes which put together weigh about 8 mb. Also, If not a bother, after the movie is broken up, would I put a preloader on every movie and just call them up as needed? or can I somehow start loading them as my intro starts?
Thanks for any help
Weird Trouble With Load Movie?
I have 5 movies. After MC 1 is finished there's script what loads new movie...
Everything works offline, but online it dosen't load mc 2, but after refresh and playing mc 1 again then it loads. Same problem with other MCs too?
By the way, script is simple and should be correct:
PHP Code:
loadMovieNum("part1.swf",1);
stop();
stopAllSounds();
And i got in every movie its own loader...
Thx in advance who can help me
Having Trouble Getting Music To Play On Load
I have a simple MP3 player on stage.
On the play button I have this:
code: on (release) {
if (playing == undefined or playing == false) {
music = new Sound(this);
music.loadSound(tracks.firstChild.childNodes[nodeNum].attributes.path);
title = tracks.firstChild.childNodes[nodeNum].attributes.name;
if (pause == true) {
pausePos = ((slider.dragger._x/100)*music.duration)/1000;
music.start(pausePos, 0);
pause = false;
} else {
music.start(0, 0);
}
playing = true;
gotoAndPlay(2);
}
}
when you click the play button it plays.
I want it to start playing track#1 when the file loads though.
I've tried to modify the code on the play button and place it on the first frame but I get no music and an undefined in my dynamic text box that shows the track name. I tried creating a MC and using a clipEvent(load) but that bombed too.
Can anyone help?
Is this enough information?
-lemorris
Trouble Getting Loadmovie Load Status
I'm having trouble getting verification of my external
JPGs progress. Any ideas on what I am doing wrong?
tmp.createEmptyMovieClip('imgA',1);
tmp.imgA.loadMovie('images/img1.jpg');
tmp.onEnterFrame = function() {
var total = this.imgA.getBytesTotal();
var loaded = this.imgA.getBytesLoaded();
if (total && loaded == total) {
// trace(this.imgA._height + " / " + this.imgA._width);
delete this.onEnterFrame;
}
}
Thanks,
- Bullfro9
Trouble With Scope And Delegate,load XML
Hi All,
I'm sure this is a common error, and I've tried searching around for the answers, but after a whole day of unluck yesterday I've decided to post it on the forum.
I'm having a hard time with a scoping issue. I have a mc that is to load some XML. I want to grab the info from the XML, stick it in an array, and have the array be accessable in my class.
Simple right??!??!
Getting the XML and parsing it is no problem. I can't get it to retain the correct scope and let the class variable reflect the results from the XML file.
I've read all the posts as well as kirupa and some other sites. I can't seem to figure out what's up with the delegate and why the scope is not working.
Please help I have been trying this all day long. Thanks!!!
Here it is in a class::
HTML Code:
import mx.utils.Delegate;
dynamic class mc_random_img extends MovieClip{
public var images:Array;
private var _xml:XML;
private var xml_source:String;
function mc_random_img(){
images = new Array();
xml_source = new String();
_xml = new XML();
_xml.ignoreWhite = true;
_xml.onLoad =Delegate.create(this, onLoadEvent);
_xml.load("random_img.php");
}
function onLoadEvent(success:Boolean):Void{
if (success) {
xml_page_node = xml_source = _xml.childNodes[0];
my_images = xml_page_node.childNodes;
for (var i=0; i<my_images.length; i++) {
rand_pic = my_images[i];
rand_file = rand_pic.attributes.thumb2;
trace(rand_file) //prints file OK
// add the value to the images array!
images.push(rand_file);
}
trace("IMAGES FINAL:" + images.length); // prints out the correct length
} else {
trace("xml NOT loaded ok");
}
}
function get_images(){
trace("get images" + images.length); // prints 0...
trace("get images" + xml_source); // prints undefined...
}
}
.... and I call it like this::
HTML Code:
test = new mc_random_img();
test.get_images();
Man it's frustrating, if someone would be kind enough to explain what I'm missing I would really appreciate it. Thanks again and THANK YOU KIRUPA, your tutorials are excellent.
Frizzo
Question Concerning A Load Movie Trouble
I have a base movie that is sitemap.swf on where I want to load at its time 3 movies, sitemapesp.swf and sitemapeng.swf ;
I created a control layer on sitemap.swf where I placed on frame 10 the action : loadMovie ("flash_folder/sitemaport.swf", "sitemaportloader");
( sitemaportloader is an empty movie clip on which sitemaport.swf will load in its x/y position onto base movie) ;
Testing sitemaport.swf ,when time line reached frame 10 I´ve got an error messsage :
“Error opening URL "file:///E|/%21%5Fmy%5Fwebs/silvatrim/silvatrim%5Fv2/flash%5Ffolder/flash_folder/sitemaport.swf" ;
I expected to see sitemaport.swf loaded onto base movie.
As it hasn´t worked I have not continued to place on sitemaport.swf further time line loadmovie commands for , sitemapesp.swf and sitemapeng.swf , but as I discover what is wrong I intend to do it , that´s the way it will work, with two others mc loaders , sitemapesploader and
sitemapengtloader ;
What in the h e l l am I doing wrong ??
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="250" height="50">
<param name=movie value="http://sites.uol.com.br/multi-media-mkt/mmktxtdance.swf">
<param name=quality value=high>
<embed src="http://sites.uol.com.br/multi-media-mkt/mmktxtdance.swf"
quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="250" height="50">
</embed>
</object>
Trouble In Load Txt After Wroten By Asp(and I Post My Code)
hey,someone help
i write some asp code:writeline("c="&myvariable),then the text wrote
c=variable,but it added a ENTER end of it,so,when i use loadvariable(mytext,0) in my flash to load the text,it did not work,
oh,how can i do with the unwanted ENTER,let flash load my text?
and i changed the code:writeline("c="&myvariable) to writeline("c="&replace(application("countnum"),vbc rlf,"")) ,but i am failing in it,it always added a ENTER at the end,why?
this is my txt text:
c=28
this is my homepage code:
<HTML>
<HEAD>
<TITLE>counter3</TITLE>
<%
if isempty(session("conn")) then
application.lock
set counterfile=server.createobject("scripting.filesys temobject")
set temp=counterfile.opentextfile(server.mappath("coun t.txt"),1,true,false)
application("countnum")=temp.readline
application("countnum")=mid(application("countnum" ),3)
application("countnum")=application("countnum")+1
temp.close
%>
</HEAD>
<BODY bgcolor="">
visiters£º<%=application("countnum")%>
<%
set temp=counterfile.createtextfile(server.mappath("co unt.txt"),true,false)
temp.writeline("c="&replace(application("countnum" ),vbcrlf,""))
temp.close
application.unlock
else
response.write "visiters£º"&application("countnum")
end if
session("conn")=true
%>
<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
WIDTH=550 HEIGHT=400 align="top">
<PARAM NAME=movie VALUE="counter3.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=>
<EMBED src="counter3.swf>" quality=high bgcolor= WIDTH=550 HEIGHT=400 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" align="top" width="550"></EMBED>
</OBJECT>
</BODY>
</HTML>
this is my flash code:
loadVariablesNum ("count.txt", 0);
num = c;
j = num.length;
s = Number(num.charAt(j-2));
g = Number(num.charAt(j-1));
with (siwei) {
gotoAndStop(s+1);
}
with (gewei) {
gotoAndStop(g+1);
}
Awww Snap Trouble With Array And Load Movie
hi y'all... i'm trying to use an array to match up with a variable from an .asp page.. that is, i want to load a particular .swf file based on that returned variable.
I'm not sure that loadMovie even supports this kind of tomfoolery... anybody out there who be's smarter than me know?
Code:
var swfs2Load=new Array("sin.swf","flirt.swf","entertainment.swf","dizzyfunk.swf","aura.swf","privilege.swf","envy.swf");
function dayTest(){
_root.maincontent_mc.loadMovie(swfs2Load[getData.day])
}
getData = new LoadVars();
getData.load("whatday.asp", getData, "GET");
Awww Snap Trouble With Array And Load Movie
hi y'all... i'm trying to use an array to match up with a variable from an .asp page.. that is, i want to load a particular .swf file based on that returned variable.
I'm not sure that loadMovie even supports this kind of tomfoolery... anybody out there who be's smarter than me know?
Code:
var swfs2Load=new Array("sin.swf","flirt.swf","entertainment.swf","dizzyfunk.swf","aura.swf","privilege.swf","envy.swf");
function dayTest(){
_root.maincontent_mc.loadMovie(swfs2Load[getData.day])
}
getData = new LoadVars();
getData.load("whatday.asp", getData, "GET");
Advance Load Movie Trouble ... And I Mean Advance
What i need to do is load a movie into another and position it perfectly... big deal huh ! well the problem is that say the main movie is the container which has the dimention of 100 x 100 but it will be changed in the hard coded object tag say might written as 300 x 300 in the html. The need for this cause i want to load a movie with the dimention of 300 x 300 into the container. Ofcourse the loaded movie will distore but that can be fixed with the
fscommand(allowscale,false)
i guess.Anyway .. i manage to positioned the loadded movie in the 0,0 loaction as long as the container movie has the dimention written more than it's original one. ( ie. more than 100 x 100 ) ..
but when i go bellow the original dimention ... everything stop working including that fscommand.
I hav attached the files with this post if any one cares to take a look on this matter. Hope my post/problem was clear to understand.
If you find any solution please let me know ..
Thanks
LoadMovie Trouble Trouble Troubles
hello,
i'm having a little bit of trouble here trying to load multiple movies into the same container. not all at one time. like this:
when a button is clicked this happens in my preloader clip which is located in my _root movie:
********************************
// set vars
sectionMovie = _root.currentSection + ".swf";
// un/load movie
unloadMovie("_root.SectionContent");
loadMovie(sectionMovie, "_root.SectionContent");
********************************
then the next frame of the preloader says:
********************************
// get the percent of the movie loaded
bytesLoaded = _root.sectionContent.getBytesLoaded();
bytesTotal = _root.sectionContent.getBytesTotal();
percentLoaded = int((bytesLoaded / bytesTotal)*100);
// if it's loaded then continue
if (percentLoaded == 100) {
this.gotoAndStop (1);
}
********************************
it all seems like it should work. i click "button1" which loads "movie1.swf" perfectly. then i click "button2" and it will unload the movie fine, but it just stops when it gets to "loadMovie"... anyone know what is happening?
thakns in advance for the help, it's a school project...mwaahaha!
xo
"Oooooh Trouble Trouble..." (Foghat Reference +1000 Points)
I am attempting to add X movie clips to the stage via script, with follow AI behaviors added to each of them. But for now I am just having them immediately start moving left until they hit the stage edge OR eachother...which is the problem.
I cannot get them ALL to stop when they collide with somehting else on the stage...
the way I atempted to solve this problem was to start an array... a list... and to add to that list the name of every object I add to the stage when I add it to the stage. So before ANYTHING moves it loops through this array to see if it is hitting anything else on the stage. Sounds simple right?
Well it seems to only work for the LAST movie attached in my function.
I have attached the script to this post. Please take a look, provide some help, give me some alternative ideas, tell me a good joke :-P, just gimme some feedback. Thanks in advance to anyone who even tries to help.
Trouble Explaining The Trouble
i am having a hard time explaining this problem so i have attached my fla file with some notes attached to it.
i'm trying to customise the a.s. but alas i'm not very good at it yet.
i have an element on the page that when it is clicked on it zooms big and comes to the center of the stage. when you click on it again it zooms back to its original position. - i have this part working.
the problem is i want elements within the zoomed elements to behave the same way. essentially zooming further into the stage. i just can't get it to work.
at this point i am completely lost, any help on this is much appreciated.
thanks everyone
Chromeless Windows That Open On Movie Load Or Load Of Html Page (Flash Ad Kit)
Hi guys,
I was wondering if someone could help me out in creating these flash ads that appear out of nowhere. I see them mostly on rediffmail, yahoo and about.com.
I know how to create a popup window on button click, but how you do that without a button.
There's another dimension of ads nowadays. They are the transparent ads. They really look cool. Could someone with this knowledge pleeeeeeeeese help me out. I urgently need to create these ads.
Regards,
designable
Chromeless Windows That Open On Movie Load Or Load Of Html Page (Flash Ad Kit)
Hi guys,
I was wondering if someone could help me out in creating these flash ads that appear out of nowhere. I see them mostly on rediffmail, yahoo and about.com.
I know how to create a popup window on button click, but how you do that without a button.
There's another dimension of ads nowadays. They are the transparent ads. They really look cool. Could someone with this knowledge pleeeeeeeeese help me out. I urgently need to create these ads.
Regards,
designable
Scrollpane - Load Swf - Load Movie Symbol Controled By Buttons And Variables?
Ok i have searched the board, and racked my brain and read hundreads of bit and pieces. So far 'not happy jan'. Anyhow I thought well I shall start a thread where first I ask a question of 'can it be done' then go away try and do it and if fail 'ask how to do it' or if suceed then say 'how i did it'. Of course all questions are going to relate back to this original post so no new threads need to be started. Anyhow onto my question!!
I have a website I want to make. so I started... called it 'site.swf'. now site.swf has a scrollpane in it called 'content'.
Now I have also created 'home.swf' which has 2 movie symbols in it. one called 'homein' the other 'homeout'.
'Homein' is located in frame1 of home.swf and 'homeout' is located in frame2.
When site.swf loads I want to load home.swf into 'content' and home.swf plays 'homein'.
When the user clicks on the first button (in site.swf) 'content' plays 'homeout' before loading 'button1.swf' into 'content' and playing 'button1in'
see the pattern forming. Now I am sure this has been asked thousands of times, but I haven't found it once. At least in a form that is easy to understand.
Now can this method be done, or do i need to go away and rethink it. (my main reason for loading external.swf's is because i wish to preload where needed).
If all this can be done tell me now... I am sure I need to use 2 variables.... 'loadedmovie' and 'tobeloaded' to communiticate with 'content' and to follow the users clicks of buttons.
Thanks for any help.
Trent
Load Asp Into Flash& Load Content From Hyperlink Into Same DYNAMIC TEXT BLOCK
i'm trying to load content from database into my flash SWF. asp scripts call the info from server to render pages as HTML FRAMES at the moment. there are also hyper links on the HTML rendered pages that i want to work still, and call the content into the same page...or in my case same SWF file. is there a way to do this, as i have gotten it to load the content into the SWF, and pressing the hyperlink it opens the content, but in another browser window......however i want it to load into the same DYNAMIC TEXT FIELD.
anyone with suggestions??????
please help
Load Asp Into Flash& Load Content From Hyperlink Into Same DYNAMIC TEXT BLOCK
i'm trying to load content from database into my flash SWF. asp scripts call the info from server to render pages as HTML FRAMES at the moment. there are also hyper links on the HTML rendered pages that i want to work still, and call the content into the same page...or in my case same SWF file. is there a way to do this, as i have gotten it to load the content into the SWF, and pressing the hyperlink it opens the content, but in another browser window......however i want it to load into the same DYNAMIC TEXT FIELD.
anyone with suggestions??????
please help
Movie Taking Long Time To Load, Needs To Load Faster
I am a loading several movies into level 2 of the main movie. The movie is taking up to 1.35secs to load. The issue is that the images are too big. Can I do something about the movie itself or do I need to compress the images more?
(mx) Transfering Actions Which Load With Movie To Load When Button Is Pressed
hi,
I have some code which draws a line when the mouse is pressed (to when it is released)
This code is within an object, loads when the movie starts and works fine:
Code:
// ***** Set some opening parameters
onClipEvent (load) {
// Make original line invisible
_root.line._visible = 0;
// Initiate some variables
number_lines = 0;
line_active = 0;
}
// ***** Every time the mouse button is released...
onClipEvent (mouseDown) {
// Get the position of the mouse
origin_x = _xmouse;
origin_y = _ymouse;
// Increase the number of lines by one
number_lines++;
// Generate a new line name
name = "line"+number_lines;
// Duplicate a new line
_root.line.duplicateMovieClip(name,number_lines);
// Position the line's end point at mouse position
_root[name]._x = origin_x;
_root[name]._y = origin_y;
// Update line length / orientation
_root[name]._xscale = _root._xmouse - origin_x;
_root[name]._yscale = _root._ymouse - origin_y;
// If this is the start of a new shape
if (!line_active) {
// Set the line tracking variable
line_active = 1;
// Set the start point of the new shape
start_x = origin_x;
start_y = origin_y;
}
}
onClipEvent (mouseUp) {
line_active = 0;
}
// ***** Every time the mouse is moved
onClipEvent (mouseMove) {
// If there's a line currently being drawn...
if (line_active) {
// Update line length / orientation
_root[name]._xscale = _root._xmouse - origin_x;
_root[name]._yscale = _root._ymouse - origin_y;
updateAfterEvent();
}
}
I want the user to press a button before this code is usable - just as with any drawing program.
How do i go about telling the code only to start when the button has been pressed?
thanks,
jeff
Load A Xml File That Contains Urls - Want 2 Load A Movie Instead Of Open URL Links
i'm just wondering how does one go about to load an xml / text file into a text box.. this text file - has url links.. or a href tags.. how do i change it such that the url links can call actionscripts instead of opening the window to a url..
does that make sense?? if it still doens't - go to www.praystation.com
if you click on the "news" section - his urls open/load movie clips how do i make something similar to that
thanks
Load Movie...Park/Play...Load A Button Into Level
Okay, I tried the Park/Play tutorial in order to load a movieclip and have a button on the stage that controls the main movie. Problem is that I have a background that covers up my button which is in level0. My movie clip is in level1. How do I bring that button out in front of the background? Do I load it into level2? If so, how do I do this?
Thanks alot,
Roger
URGENT Load Movie Doesnt Load Textfields
i mad a form in flash that send the variables to a php email script. The problem i am having is that the form loads into my main movie but when it loads it doesnt load the text fields. I have border.BG checked and everything seems to be in order. Please get back to me a.s.a.p. ANYONE I HAVE ONE DAY TO COMPLETE THIS!!!! blinero@email.com
Jagged Bitmaps: Not When Load In Level, Yes When Load In Target
I noticed that I get distorted bitmaps when I load a swf into a target movieclip. When I load them into levels the bitmaps look alright. Anybody knows of a bugfix for this. I prefer to load into targetmovies because then the swf's get cached in the browser.
thanks already.
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.
Load Variable From Txt File To Load Movie From Server
my webserver has a dynamic ip adres
now i have a program that writes my ip adress to a static server.
my question:
load textfile and make the link for the swf complete
i think it should look something like this but i can't find it anywere
code:
loadVariablesNum("redirectphp/currentip.txt", 0);
this.gastenboek.loadMovie("http://"+ip+"/flash/Guestbook.swf");
the txt file is like:
&ip=90.128.82.20
the swf file is in flash 7
please help me
Load Movie Into Empty Clip On Page Load
I have a series buttons and two empty clips on the main page (one to hold the text and the other to hold the pictures / slide show) I have all the buttons working and loading the text etc correctly.
My problem is that when my page firsts loads all I have is the buttons. I want to have the empty clip that holds my text have my "welcome" load when the page loads (without clicking on any buttons).
I have tried using
onClipEvent(enterFrame) {
loadMovie("welcome.swf",this.mtTextClip);
}
but I get an error message that clip events are only allowed on movie clip instances and as I want this to happen when the page loads there isn't an instance name...
Clear as Mud??
Using Load Vars To Load A Dynamic URl Form .txt File AS2
OK I have looked all over the net and these forms for a solution and cant seem to figure out what is going on here. I have a flash header that has a button on it that will change form time to time and I need to pull a url from a txt doc. So here's my code.
PHP Code:
var urlLink = new LoadVars();
urlLink.load("feature_link.txt");
link_btn.onRelease = function() {
getURL("http://"+urlLink ,"_self")
};
In the text file I have
PHP Code:
url=mydomain
When I hit the button I get a web page saying that it cant find the url http://www.url=mydomain.com
I have also tried
PHP Code:
link_btn.onRelease = function() {
getURL("http://"+url ,"_self")
};
and I get http://www.undefined.com/
Why wont it see the url variable in the txt file.
Thax
|