[FMX] Stopping Loader And Interval Before Movie Is Completely Loaded
I have a button that loads an external swf using the movie clip loader. The problem is if I want to stop the moving from loading before it is completely downloaded I can't. The movie still loads.I thought using clearInterval would stop this, but it doesn't seem to be the problem. I have attached my actionscript and test fla's. You can view the movie here: http://www.visualscientists.com/vste...rinterval.htmlIf you click the orange square it will load an external swf. If you click the yellow square it will unload the movies and clearInterval.Thanks! ActionScript Code: #include "lmc_tween.as"var _nInterval:Number;var _nIntervalFlipContent:Number;var _nFlipInterval:Number;var _nFlipBackInterval:Number;//clear intervalfunction unloadContent():Void{ clearInterval(_nInterval); clearInterval(_nIntervalFlipContent); clearInterval(_nFlipInterval); clearInterval(_nFlipBackInterval); trace(_nIntervalFlipContent); unloadMovie("_parent.mc_flip"); unloadMovie("_parent.mc_flipcontent");}//portfolio flipvar my_mcflip:MovieClipLoader;my_mcflip = new MovieClipLoader();var myListenerFlip:Object = new Object();myListenerFlip.onLoadInit = function(target_mc:MovieClip) {};myListenerFlip.onLoadComplete = function(target_mc:MovieClip) { function loadFlipFade():Void{ loadFlipContent(); loadWorkPad(); trace("loadcomplete"); clearInterval(_nFlipInterval); } _nFlipInterval = setInterval(loadFlipFade, 400); };my_mcflip.addListener(myListenerFlip);// load flip functionfunction loadFlip():Void{ _parent.createEmptyMovieClip("mc_flip", _parent.getNextHighestDepth()); my_mcflip.loadClip("work_flip.swf", "_parent.mc_flip"); _parent.mcHolderwork._visible = false; trace("load flip");}//portfolio flip contentvar my_mcl2:MovieClipLoader;my_mcl2 = new MovieClipLoader();var myListener2:Object = new Object();myListener2.onLoadComplete = function(target_mc:MovieClip) { trace("transform"); target_mc._alpha = 0; target_mc._visible = false; function contentIntro():Void{ target_mc._visible = true; target_mc._alpha = 0; //mcHolder.tween("_alpha", 100, 5, sTween, 0.020); target_mc.alphaTo(100, 2, sTween, 0.005); clearInterval(_nIntervalFlipContent); } _nIntervalFlipContent = setInterval(contentIntro, 0);};my_mcl2.addListener(myListener2);function loadFlipContent():Void{ _parent.createEmptyMovieClip("mc_flipcontent", _parent.getNextHighestDepth()); my_mcl2.loadClip("flipcontent.swf", "_parent.mc_flipcontent"); trace("flipcontent loaded");}mc_btn.onRelease = function():Void { trace("mc_btn clicked"); loadFlip();};mc_btn2.onRelease = function():Void { trace("mc_btn2 clicked"); unloadCo
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 06-21-2005, 11:45 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
What Keeps My Movie From Stopping Properly? Math.floor/interval
Hey all,
this is driving me nuts.
I have a movie, in it lies a button with which I jump to another position in the _root timeline.
At that position is a stop(); command.
The movie just wont stop while this is running in another mc1 deeper in the file
:
Code:
stop();
onEnterFrame = function() {
c=Math.floor(Math.random() * (1500 - 0)) + 150;
var Interval1 = setInterval(function () {
b=Math.floor(Math.random() * (7 - 0)) + 1;
gotoAndPlay(b);
clearInterval(Interval1);
}, c);
}
What this does in the mc1 is basically creating a random number between 150 and 1500 and a random number between 0 and 7, then jumping to a random frame (numbered from 1-7) after waiting for a random time (150-1500ms).
My _root stops properly when I remove the code posted above.
Why is this happening and how can I have a mc1 in my movie which waits for a random time and then jumps to a random frame, while I want to move around in my _root timeline?
I should add, the mcs1 which wait and move to a random frame are non existent on the position I want to move to in _root.
Could that be part of the problem?
Do I have to somehow remove the wait and choose random frame to jump to function in mc1, when moving around in _root?
How would i do this?
Any help is greatly appreciated,
dual
My Preloader Appears When The Movie Is Almost Completely Loaded
my preloader appears when the movie is almost completely loaded..
it stays a blank page for seconds.. sometimes even 20 sec when i deleted the temporary files
whats the problem xith my preloader.. in some occasions the swf is 8 mb.. is that the problem?
http://users.skynet.be/spacecowboy/
got to writings or check the ones in earlier?
its a pain in my ass
i will be very gratefull if you could help me out
Stopping A Scene COMPLETELY
ok i have three scenes in my little presentation
the first scene is a little introduction and then the next scene kicks in automatically, but i wanna be able to completely stop everything that is happening in the First scene so nothing gets covered up in the second scene by the first scene.
also can i get some help(actionscript) in getting a button to work properly so that in the 2nd scene i can click and the button will advance to the third scene and once again stop everything in the 2nd scene so it does not show up in the 3rd scene.
Trace And Interval Not Working In Prototype Code Of Loaded Movie
I've got a movie that is pausing and then fading-out when the movie ends. This is being done (thanks to the excellent advice from clbeech) by
1) modifying the MovieClips prototype and adding a fade() method
2) calling that method in the last frame (after saying "stop" of course)
It's all working splendidly.
Now, I'm using the MovieClipLoader class to load that standalone movie into a "loader movie". Basically the loader loads a bunch of movies sequentially and relies on the fade-out embedded within the loaded movie to make a nice transition to the next one in line.
The problem I'm having is two-fold:
1) The pause-before-fade-out method works great when the movie is played within the "loader" but fails when the movie is loaded into another via the MovieClipLoader. The fade works but the pause (the interval) seems to be ignored.
2) Trace statements in the fade prototype function work fine in standalone mode, they cease working when the movie is loaded into another via the MovieClipLoader. The function is definitely getting called (the fade begins) but I don't see the trace statements. Trace statements in the other "normal" frame code of the loaded movie appear fine, just not the trace statements in the custom prototype function.
Code is attached...
NOTE: the loader movie isn't actually fully working yet, that part is code-in-progress. But it works well enough to demonstrate the problems above. I still have to figure out how to signal the next movie to start as the fade-out of the last one begins (I'm thinking I'll define a global and call that in the loaded movie when it initiates its fade out). I certainly wouldn't mind advice/guidance on the loader-portion of things, too, particularly if what I'm doing seem really wonky.
Thanks!
- Gary
P.S. Using AS2 and Flash 8 publish settings.
Stopping Loaded Movie Clip
HI,
could anybody explain me how to control a loaded movieclip.
1) I have loaded a moviclip in a target using command
loadMovie ("images\module07\anim_01.swf", "movie");
where imagesmodule07 is directory name & anim_01.swf is loaded file, & "movie" is the target in which I have loaded the movieclip
2) Now if on click of a button I want to stop the anim_01.swf at a particular frame say _currentframe . what is the best to control it & what command should I use.
please help me. i'm stuck up
Stopping FLV In Loaded Movie Clip
Okay... I have a Shell site that I'm loading different swf Clips into depending on the button press. In this Clip is loading a streaming FLV. When I go to press another button in the Shell to load a new Clip, the FLV continues from the last Clip continues to play! How do I stop it?
thanks!
Stopping FLV In Loaded Movie Clip
Okay... I have a Shell site that I'm loading different swf Clips into depending on the button press. In this Clip is loading a streaming FLV. When I go to press another button in the Shell to load a new Clip, the FLV continues from the last Clip continues to play! How do I stop it?
thanks!
Stopping A Loaded Movie With ..hitArea?
this (old) scroll code is in a movie that is loaded into the main movie.
timeline:
startDrag("track", true);
setProperty("track", _visible, "0");
stop();
inside the symbol:
dX = ../track:_x-230;
ypos = ../track:_y;
if (Number(ypos)<60) {
ypos = 60;
}
setProperty("", _x, _x-dX/14);
reset = _xscale/100*360;
if (Number(_x)>Number((230+Number(reset)))) {
setProperty("", _x, _x-(_width/2));
} else if (Number(_x)<Number((230-reset))) {
setProperty("", _x, Number(_x)+Number((_width/2)));
}
so as you prolly know, this then reacts to the mouse movement in the main movie. i prefer it to only read when the mouse is near the scroller and i can't seem to figure this out.
i have this code in the mainmovie timeline but its not working either:
this.onMouseMove = function(){
if(_root._xmouse >= 500 || _root._ymouse <= 400){
_root.slider.stop();
}
thats the area i want the mouse to work in, only activating the scroller when its in the bottom left area of the main movie.
there's got to be a very simple solution to this and i can't figure it out. please help.
thank you
Stopping Sound In Another Loaded Movie.
I have a main index.swf which has a bg track within an MC (myMusic) and i have buttons to stop and play the track.
Code:
on(press){
stopAllSounds();
myMusic.gotoAndStop(1);
}
The index.swf also has an empty MC in which I have other movies loading into, for example "mainmenu.swf". Now, main menu has a button to stop the sound playing in myMusic. with the same code above but the sound only stops for a minute and then begins to play. How do i get the loaded movie to contol the sound in the parent movie?
Loader Not Loading In Some Cases - Completely Bizarre - Maybe Quick Fix?
Please ignore this post. I found the problem to actually be a bug. I'm contacting Adobe. I may also start another post about the bug.
Hey guys,
I'm once again working on a kiosk for a client. This time around, I used many loader components, so the client could easily change the content. I think I might be doing something wrong with the loader component. I publish as a projector file (exe). I've been stripping the design down to figure out what went wrong. I now have only two lines and it still screws up.
To load a picture into the loader, I'm doing this:
Code:
my_ldr.contentPath = "Background/Main2.jpg";
my_ldr.load();
Extremely simple and it works fine IF I simply double click on the kiosk.exe file. In the real application of this kiosk, the exe file is started by another piece of flash that starts a script that starts the kiosk.exe file.
Start.exe This Flash exe runs when the computer is booted. It's the kisok configuration utility. One of it's option buttons is to start the kiosk. It does so by using:
Code:
on (release) {
fscommand("exec", "start_kiosk.exe");
fscommand("quit");
}
start_kiosk.exe is the script (made in autoit) that simply does a Run(kiosk.exe) script. I know I could also use a bat file, but I don't want any black box to pop up, so I use autoit.
kiosk.exe is the actual kiosk file.
I can start kiosk.exe on its own and the loader loads fine.
I can run the start_kiosk.exe script on its own and the kiosk.exe starts fine and loads the picture into my_ldr.
If I run the Start.exe flash, the kiosk does start, I get all the text, including dynamic text, but the loader remains empty. Pretty crazy, eh?
This is always running directly from a hard drive, so speed is not an issue. It's completely baffling why the loader loads pictures in every case but when it is start by a script that was started by another piece of Flash. I know, this sounds very confusing. I have stripped it down to just two lines of code, so I figure it has to be in the way I am using the loader.
The simple question is, is the above example code have a problem?
Thanks for the help, I've been tearing my hair out trying to see what is going wrong. BTW, Don't look to the Start.exe or start_kiosk.exe as being the source of the problem. I have used them both on dozens of other kiosks that are not using the loader component, and they work fine.
Stopping Movie From Playing Till Certain Percent Has Loaded
Hi im using the netStream object to play an external FLV.
my question is if someone is on a low bandwidth then the movie will keep jamming when the playhead catches upto the amount downloaded...
part of the code is
Code:
netStream_ns.onStatus = function(info:Object):Void{
if(info.code=="NetStream.Play.Start"){
//movie has started playing so lets start playhead
playbackProgress();
}
if(info.code=="NetStream.Play.Stop"){
currVideoNum++;
if(currVideoNum>totalNumVideos){currVideoNum=1;};
playVideos(currVideoNum);
}
}
so flash starts playing movie autmoatically when a certain amount has downloaded..
the question is how do I decide MYSELF when to start the playing of the movie for e.g i may want it to start playing only after at least 30% has of the movie has been downloaded..
thanks in advance
Passing Variables From Loader Movie To Loaded Movie, Flash Satay Method
I like the Flash Satay method for its clean integration and standards-compliance, however there are still some things I can't manage the way I want to... I'm trying to implement a working method to pass variables from the loader movie to the loaded movie. As you may know, the Flash Satay method uses a small SWF file which uses a bit of code to load the desired movie, all in order to allow IE browsers to retain streaming capabilities when rendering Flash content through the <object> tag. Basically it's just a small file with the following AS2 code in the first frame:
loadMovieNum(path, 0);
This means the c.swf file is ENTIRELY replaced at level0 with the desired movie, and any variables that were passed to the loader movie turn to smoke.
I'm trying to generate a querystring using all other variables the loader movie receives, and pass that along with the filename for loadMovieNum. This seems to be working very well in most cases, but whenever there's a URL in the querystring (even URLEncoded), BAM, everything turns to lowercase... EVERYTHING... here's an example:
c.swf?path=banner.swf&myLifeSUCKS=true&Icantbelieve=ITSNOTBUTTER
this successfully loads banner.swf in place of c.swf, with the following correct querystring appended
banner.swf?myLifeSUCKS=true&Icantbelieve=ITSNOTBUTTER
If I try:
c.swf?path=banner.swf&clickTag=http://www.myurl.com/&ANOTHER=variable
this successfully loads banner.swf in place of c.swf, but I end up with lower-cased querystring (all of it!!):
banner.swf?clicktag=http://www.myurl.com&another=variable
what happens to my capital letters?? I need these to remain case-sensitive as there is no saying how the loaded movies are programmed. The generally accepted convention for "clicktag-enabled" banners is to use _root.clickTag as the link button's URL...
Even URL-encoding the URL doesn't change this
For reference, here's the HTML snippet and ActionScript 2 code I use:
---- html ----
<object type="application/x-shockwave-flash" data="c.swf?path=banner.swf" width="728" height="90">
<param name="movie" value="c.swf?path=banner.swf" />
<param name="FlashVars" value="clickTag=http://www.google.com/" />
</object>
Attach Code
----c.swf----
var queryString:String = "";
for (var i in _root){
if (i != "path" && i != "queryString" && i != "$version"){
if (queryString) { queryString += "&"; }
queryString += i + "=" + _root[i];
}
}
if (queryString != "") {
loadMovieNum(_root.path + "?" + queryString,0);
} else {
loadMovieNum(_root.path,0);
}
Edited: 10/01/2008 at 10:40:48 AM by Inzoum
Xml Variables' Paths In A Loaded Movie Via Movie Cliip Loader
Okay, I found 3 different .fla files:
1] an XML photogallery [including image, thumbnails and title & description]
2] a Navigational type file [when a button is pressed, the screen moves to that section, set by x & y coordinates, with friction]
3] a file featuring loading multiple external .swf's into specific movie clips [movie clip loader, instead of loadMovieNum]
All the files work fine independently.
I put the actions of the movie clip loader into "navigation-1.swf".
The movie clip loader calls "gallery4.swf" and places it in a movie clip deep navigation-1.swf.
Gallery4.swf loads almost loads fine in navigation-1.swf; the images and thumbnails show, but the title and descriptions do not.
a] It might be the paths in gallery4.swf. I read the tutorials in paths/advanced paths from actionscript.org. I tried applying it in the code. Still I'm not sure if this is it. So, I went to investigate the movie clip loader script and thge navigation-1.swf file.
b] I was thinking the problem was the navigation-1.swf. I tried something to test that out. I called the gallery4.swf using loadMovieNum into level1. Everything in the gallery showed up, images and text. So now, I'm thinking it's not the navigation-1.swf that's giving me a problem. I think it's the movie clip loader script that might be playing games with me.
The only reason why I'm set on using the movie clip loader to load gallery4.swf into navigation-1.swf is because I like the effect of everything on the stage moving; this is accomplished when gallery4.swf is loaded in a particular movie clip in navigation-1.swf.
Can anyone help me out with this one? I'm okay with flash [that's stretching it], but you guys/gals are the gurus!!!!
Here's a link to view navigation-1.html, the file that calls gallery4.swf
Here's a link to just view gallery4.swf
Here's the .zip of the files involved.
Mind you the visuals aren't done yet, I'm still trying to figure the functional part, hopefully!!! AAAAA
Hope your brains' are sharp tonight because I think mine has worn as my eyes tonight!!!
Thanks,
upp'ed to motrin5xaday for tonight...
Xml Variables' Paths In A Loaded Movie Via Movie Cliip Loader
Okay, I found 3 different .fla files:
1] an XML photogallery [including image, thumbnails and title & description]
2] a Navigational type file [when a button is pressed, the screen moves to that section, set by x & y coordinates, with friction]
3] a file featuring loading multiple external .swf's into specific movie clips [movie clip loader, instead of loadMovieNum]
All the files work fine independently.
I put the actions of the movie clip loader into "navigation-1.swf".
The movie clip loader calls "gallery4.swf" and places it in a movie clip deep navigation-1.swf.
Gallery4.swf loads almost loads fine in navigation-1.swf; the images and thumbnails show, but the title and descriptions do not.
a] It might be the paths in gallery4.swf. I read the tutorials in paths/advanced paths from actionscript.org. I tried applying it in the code. Still I'm not sure if this is it. So, I went to investigate the movie clip loader script and thge navigation-1.swf file.
b] I was thinking the problem was the navigation-1.swf. I tried something to test that out. I called the gallery4.swf using loadMovieNum into level1. Everything in the gallery showed up, images and text. So now, I'm thinking it's not the navigation-1.swf that's giving me a problem. I think it's the movie clip loader script that might be playing games with me.
The only reason why I'm set on using the movie clip loader to load gallery4.swf into navigation-1.swf is because I like the effect of everything on the stage moving; this is accomplished when gallery4.swf is loaded in a particular movie clip in navigation-1.swf.
Can anyone help me out with this one? I'm okay with flash [that's stretching it], but you guys/gals are the gurus!!!!
Here's a link to view navigation-1.html, the file that calls gallery4.swf
Here's a link to just view gallery4.swf
Here's the .zip of the files involved.
Mind you the visuals aren't done yet, I'm still trying to figure the functional part, hopefully!!! AAAAA
Hope your brains' are sharp tonight because I think mine has worn as my eyes tonight!!!
Thanks,
upp'ed to motrin5xaday for tonight...
Dynamic Interval Image Loader Problem
The first of 12 images loads fine, then k increments with out any other images loading. onLoadComplete stays true and function just cycles. Where did I go wrong?
Quote:
_
_global.k = 1;
function nextPic() {
trace(">> k = " + k);
var loadListener:Object = new Object();
loadListener.onLoadComplete = function(target_mc:MovieClip):Void {
trace(">> loadListener.onLoadComplete()");
setInterval(nextPic,500);
}
loadListener.onLoadInit = function(target_mc:MovieClip):Void {
trace(">> loadListener.onLoadInit()");
}
if (k < 12) {
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(loadListener);
var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mcLoader.loadClip("http://www.jmkac.org/images/stories/MIKE/MIKE_" + k + ".jpg", mc);
k++
}
}
How To Use A Loader Scene Until Entire Movie Is Loaded
Basically is what I need to know is the right action script to use, I understand how a loader works and how to make the actual loader. My question is this, how do I link the scenes together so that..... The loader scene runs until the entire movie is loaded and once it is loaded the movie starts. I was trying to use code something like this on frame 1 of the first scene which is my loader.
If (Frame 53 of Scene 2 is loaded) {gotoAndPlay Frame 1 of Scene 2} Else (Loop Scene 1)
I understand this code is probably way off but I'm hoping one of you guys can see what I'm trying to do and show me the correct code. I have been messing around trying to do this for about 3 hours and as easy as I'm sure it is still can't get it right. I would really appreciate it if one of you would take a few minutes to help me out. Thanks, Stea|th!
Loaded Movie Communicating Back To The Loader
Hi,
We have got a swf which loads another swf. everything works fine, we can change things in the loaded movie through the loader. But now we need the buttons in the loaded movie calling a method or trigging an event in the loader. We have been doing that by using LocalConnection, but now we need another approach.
How to do that?
Cheers
Letting Loaded Movie Control Loader
I'm having some problems trying to figure something out in flash and can't find out what the best way is to do this.
I want to first load in my menu of my website with loadMovie and then let the menu control the rest of the website. But don't know how to do this.
This is what i got now:
Code:
loadMovie("menu.swf", "menu");
var someListener:Object = new Object();
someListener.onMouseUp = function () {
trace("active menuitem = " + menu.curMenu);
if (menu.curMenu == "about") {
loadMovie("main.swf", "main");
}
};
Mouse.addListener(someListener);
In my menu swf i set curMenu to some value when a button is pressed. The only problem seems to be that there is an delay that is to big. So when i pres a button in my menu swf, the main swf checks the value and it hasen't changed yet. If i check half a sec. later. Then there it's changed!
Is there some other way to do this? Or do i have to get some sort of sleeptimer in my current code?!?
Thanks in advance.
Letting Loaded Movie Control Loader
I'm having some problems trying to figure something out in flash and can't find out what the best way is to do this.
I want to first load in my menu of my website with loadMovie and then let the menu control the rest of the website. But don't know how to do this.
This is what i got now:
Code:
loadMovie("menu.swf", "menu");
var someListener:Object = new Object();
someListener.onMouseUp = function () {
trace("active menuitem = " + menu.curMenu);
if (menu.curMenu == "about") {
loadMovie("main.swf", "main");
}
};
Mouse.addListener(someListener);
In my menu swf i set curMenu to some value when a button is pressed. The only problem seems to be that there is an delay that is to big. So when i pres a button in my menu swf, the main swf checks the value and it hasen't changed yet. If i check half a sec. later. Then there it's changed!
Is there some other way to do this? Or do i have to get some sort of sleeptimer in my current code?!?
Thanks in advance.
Percentage Loader For SWF Loaded Into Movie Clip
I've been trying to figure this one out for a while. I'm using a percentage preloader at the beginning of my movie lets call it movie1. Once its loaded "Scene 1" will play. When I click on a link I have a swf called movie2 loading into a blank movie clip on the movie1 stage. The problem is that if I try and use a preloader on movie2, then movie1 will just reload.
Is there special code needed to use a loader inside a movie?
XML File Not Loaded Completely
NEVER MIND SOLVED IT!!! ignorewhite syntax was wrong so corrected it(strange though not getting any error)
Hi this my first action script so this might be a beginners problem so be kind
My code works fine except the part that when I parse (or create xml object sorry used to 3g languages) the xml I only get 12 nodes instead of 30 nodes and the structure is very strange. So I have 2 questions
1) why do I get all nodes under one node which causes Parent and Child nodes to be null. So the structure is not as it is supposed to be in actionscript reference. I have to use a syntax like this in order to get to nodes
(xml object).childNodes[1].childNodes[counter].childNodes[1].childNodes[0].nodeValue == date
and structure skips one node for each child node(thats very interesting)
(xml object)..childNodes[1].childNodes[counter].childNodes[2*i+1].childNodes[0].nodeValue ( I have multiply counter(i) with 2 inorder to get skip the empty node)
2)why does xml parses only 12 nodes instead of 30 nodes? Could it be because of the parsed xml structure being under one node only?
Here is my code (or you can download from http://alover.to.md/salat.zip) and thanks for ur help...
PHP Code:
function getTime(filename:String,date:String){
var filepath:String = "../../salat/"+filename+".xml";
salatTimes = new XML();
salatTimes.ignoreWhite;
salatTimes.onLoad= function(success){
if(success){
for(counter=1;counter<31;counter++){
if(salatTimes.childNodes[1].childNodes[counter].childNodes[1].childNodes[0].nodeValue == date){
for(i=1;i<12;i++){
SALAT_LABELS[i-1].text = String(salatTimes.childNodes[1].childNodes[counter].childNodes[2*i+1].childNodes[0].nodeValue);
}
break;
}
for(i=1;i<12;i++)
SALAT_LABELS[i-1].text = "N/A";
}
}
else
for(i=1;i<12;i++)
SALAT_LABELS[i-1].text = "N/A";
}
salatTimes.load(filepath);
}
and my xml file is like
PHP Code:
- <dataroot>
- <SalatTime>
<Day>01</Day>
<Fajr>03:00</Fajr>
<JFajr>03:45</JFajr>
<Sunrise>05:00</Sunrise>
<Dhur>13:00</Dhur>
<JDhur>13:30</JDhur>
<Asr>17:00</Asr>
<JAsr>17:15</JAsr>
<Magrib>20:15</Magrib>
<JMagrib>20:20</JMagrib>
<Isha>22:15</Isha>
<JIsha>22:30</JIsha>
</SalatTime>
..
</dataroot>
Mp3 Tag Before Sound Has Completely Loaded?
hi there,
im currently working on a little streaming mp3 player that uses external mp3s. I also want to be able to read the ID3 tags of the .mp3's. I was wondering if it is possible to let flash load the id3 tag before it loads the sound... because now the title of the songs says undefined untill the whole songs has loaded...
http://thomas.zeal-music.com/flash/thomvis/
who could help me out?
Images Are Not Loaded Completely
I have PHP web page, that has embedded flash object (that calls some php script too). In addition I have regular HTML contents on the page which is driven by PHP and it displays 5-6 thumbnails and other images. On IE only it doesn't load them completely sometimes (especially if the page is not cached on the browser).
I was trying different things (caching, removing some objects), and found out that if I remove flash object, it loads all images fine. How does flash affect this problem?
Can anybody give me an idea what could be wrong?
Here's the code I'm working with...
<code>
-----------------------------------------------------------
<script type="text/JavaScript">
function Hide(id) {
document.getElementById(id).style.display='none';
}
//-->
</script>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="(URL address blocked: See forum rules)=8,0,0,0" width="225" height="140" id="flex" align="middle" style="position:absolute;
top:1px;
left:50%;
margin-left:-414px;
z-index:0;">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="media/swf/logo/flex.swf" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="media/swf/logo/flex.swf"
loop="false" quality="high" wmode="transparent" bgcolor="#ffffff" width="225" height="140" name="flex" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="(URL address blocked: See forum rules)" />
</object>
<div id="logo_static" style="position:absolute; top:1px; left:50%; margin-left:-414px; z-index:1;">
<img src="media/swf/logo/bolts.static.gif" alt="Logo"/>
</div>
</code>
---------------------------------------------------
I'm using the javascript to swap out div containers so that I can display static content for browsers not flash enabled. Meanwhile, I call some other functions in my index page that load rollovers and other media.
Somehow the interplay between my javascript function and my flash object affect whether those other images load...
<a href="(URL address blocked: See forum rules)">You can see the page here. />
Passing Variables From Loaded Movies To The Loader Movie
I am loading a swf file into an empty movie clip in the main Flash program (mainApp). I am trying to pass variables by value from the loaded movie to mainApp.
This function is in mainApp:
function read_1_vars(band,qual, lang){
trace("--------------------");
blnBandwidth=band;
blnQuality=qual;
language=lang;
}
This is the code used in the loaded movie to contact mainAPP:
_root.read_1_vars(blnBandwidth, blnQuality, language);
All this code worked just fine when contained in one one single file.
Any ideas? What am I missing? Thanks.
Completely Removing Externally Loaded Swf's
Hi!
I have a new problem in the development of my site...
I have a main swf that loads external swf's using this code:
Code:
var swfLoader:Loader = new Loader();
swfLoader.load(new URLRequest(swfArr[numArr]));
addChild(swfLoader);
Nothing wrong here... Just Checking...
The problem is that in my main swf I have an Event Listener for stage resize... And inside each external swf too... So, when after I've loaded a 2nd external swf it's still listening for the 1st swf event listener!! It throws the error: "TypeError: Error #1009: Cannot access a property or method of a null object reference."
How can I prevent this from happening??
Detect If External Txt Has Loaded Completely?
hi there,
I am loading an external txt file into a dynamic text field with loadVariables(). I perform some calculations, which are based on the text length. All works fine so far, but I am worried that if somebodys internet is too slow my calculations could execute before the text has completely loaded.
Is there a way to detect, when loading with loadVariables() is complete?
thanks a lot.
Pre-Loader For A Dynamically Loaded Text Field With In A Movie Clip
How would I go about creating a Pre-Loader for a dynamically loaded text field with in a Movie Clip.
Check out this link for an example of what I'm talking about:
http://www.islandrecords.com/thrice/home.html
I want the Pre-loader to wait for the text file to load like in the above example. Any help would be great appreciated.
Thanks,
Chris
Last Character Of Loaded Text Not Completely Visible
I load text into a dynamic text field, I set embedFonts property to true, set autoSize, apply a text format and set antiAlias to advanced (the text format uses a exported font from the library). When I test my movie, a part of the last character of my text is not visible. What is the cause of that and how can I fix it ?
External JPEGs - Play When Completely Loaded
I am using the following to load external JPEGs into 24 separate buttons:
Code:
for (i=1; i<=24; i++) {
var thumb_load:MovieClipLoader = new MovieClipLoader();
var preload:Object = new Object();
thumb_load.addListener(preload);
preload.onLoadStart = function(thumb_load) {
stop();
};
preload.onLoadComplete = function(thumb_load) {
play();
};
preload.onLoadInit = onLoadInit;
thumbNum = i
thumb_load.loadClip(_parent.folderdir+"/"+_parent.sectionxml+"-th-"+thumbNum+".jpg", "btn_"+thumbNum+".t_pix_holder");
}
function onLoadInit(mc:MovieClip) {
mc.forceSmoothing = true;
}
What I would like to do is to make the the playhead move (ie. "play();" ) when ALL the JPEGs are loaded. Right now the playhead goes as soon as the first JPEG is loaded. I think I should be using an array but I'm not too good at them and I get hung up on the targeting because the JPEGs need to load in 24 separate movieclips.
Any help would be appreciated.
Flash Doesn't Show Until Completely Loaded
I'm working on a photo slideshow with 300+ images. I have the images on individual frames of the main timeline with an actionscript to go to a random frame after 1 second has passed.
Obviously with 300+ images the file size is going to be huge. So I created a little loading screen that loops until 30 frames (pictures) are loaded and the random frame script loops until it selects one that is less than _framesloaded. This allows the show to start with whatever pictures are loaded and show more as they're loaded.
The problem is this only works with the flash preview and simulate download and not on the actual website. All I get is a blank screen until the entire (7MB) file is loaded. What am I missing?
Here's the link: http://www.prestwicklimited.com/endl...sibilities.asp
Preloader Does Not Stop Until Move Is Completely Loaded
like the title says, my movie starts playing when at 66% total loaded, this wasn't like that from beginning it worked before. noticed it after i've made changes to frames and layers (no changes i recall to even come close to affecting this functionality)
On Slower Speeds (as tested within flash preview) my objects stutter when moving instead of smoothly flowing about.
Here's my code that's applied to my preloader movie symbol:
Attach Code
onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
txt_percent = percent+"%";
gotoAndPlay(percent);
if (loaded == total) {
_root.gotoAndPlay(2);
}
}
Need Hlep:about Mask_mc Begin Play & Loaded Completely
in my work,i need first image loaded completely ,and then ,the mask_mc play its first part to show that image;when i press another botton,the mask_mc play its last part to hide the first image,and after the second image loaded completely, the mask_mc play again to show it.
here is the .swf link:http://www.impx.nease.net/test.htm
here is what i did:
Code:
stop();
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
firstImage();
duplicateList();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images_test.xml");
// ///////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (maskmc._currentframe<10 && loadIn) {
maskmc.play();
}
}
};
function firstImage() {
if (loaded == filesize) {
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
//////////////////////////////////
function duplicateList() {
itemX = 0;
clips = [];
for (i=0; i<total; i++, itemX += 55) {
trace(total);
clip.push(mylistmc.listmc.duplicateMovieClip("item"+i, i, {_x:itemX, picNum:i+1, picName:description[i]}));
}
}
////////////
function checkButtons() {
if (maskmc._currentframe>38) {
maskmc.play();
}else{
maskOut=true;
}
for (i=0; i<total; i++) {
currentItem = "item"+i;
if (currentItem == ActiveItem) {
p = i;
picture_num();
desc_txt.text = description[i];
if (loaded == filesize && maskOut) {
picture.loadMovie(image[i], 1);
loadIn = true;
}
}
}
}
Stopping A Loader While It Is In The Process Of Loading?
Hello to you all and thanks for your time. My problem goes something like this. I am creating an application for a website selling cars and I have used a loader to automatically load in the car pictures from an xml file. However when I test the application by simulating a download, what happens is that the pictures of the car loads as expected however if the user selects another car while the loader is in the process of loading and initiates another load function the loader still continues to load the previous car until it is complete, then it loads the one the user selects. Can anyone tell me a way around this problem I want to stop the loading of the picture whenever the user selects another model. I've tried loader.unload and that doesnt seem to work so please if anyone can help me please do all comments and suggestions are accepted.
Again thanks for your time.
How To Find Unnamed || Named Interval In Loaded SWF?
Hi all!
Here's my problem: I'm loading one SWF into another. The loaded SWF has one interval set by setInterval(), but if I load it second time after unloading it I'm getting 2 intervals and so on...
I've tried this:
Code:
var itr:Number;
_root.onEnterFrame = function(){
clearInterval(itr);
itr = setInterval(someFunc, 1000);
delete this.onEnterFrame;
}
But it doesn't seem to help =
Any help is most wellcomed.
Stopping A Action Scrpit Without Stopping The Movie ?
Hello all,
I new to flash and used a snow script i found on flash kit. Anyway my problem is i cannot stop the snow half way thought the movie ?
Link to the working file
http://www.megaupload.com/?d=S0ZNMFP6
Thanks
Stopping A Action Scrpit Without Stopping The Movie ?
Hello all,
I new to flash and used a snow script i found on flash kit. Anyway my problem is i cannot stop the snow half way thought the movie ?
Link to the working file
http://www.megaupload.com/?d=S0ZNMFP6
Thanks
How To Reference A Loaded Swf, When Loaded Inside A Loader Component?
I am trying to control a movie (swf) that I loaded into the flash loader component. I have two files: preloader.swf and movie1.swf.
Preloader.swf has the Flash component from mx.controls.loader.
I have given this component the instance name "myLoader".
Once preloader.swf is called, it loads movie1.swf.
Movie1.swf has a button that controls the frame of a mc played within movie1.swf. When I test the movie1.swf without loading it into the preloader component, the button works as expected. However, when I load movie1.swf into the preloader.swf, it doesn't control the play of the mc.
#This is the AS I attached to button in movie1.swf when I am loading movie1.swf into the preloader.swf. Which DOESN't work.
_root.myLoader.mc1.gotoAndPlay(10);
#This is the AS I attached to button in movie1.swf when I am playing movie1.swf WITHOUT loading it into the preloader.swf. Which DOES work.
_root.mc1.gotoAndPlay(10);
I can't seem to figure out how to reference the loaded movie in the preloader.
Any help would be appreciated.
Thanks!
Stopping A Movie Without Stopping Submovies
I have a looping animation contained in another movieclip, the parent clip stops on about frame 20 and this causes the submovie to stop playing, is there anyway round this.
Completely Reset A Movie?
I am making a game and it has lots of variables that start without values and movie clips that play through and everything you'd expect in a game. It would be ridiculously tedious to reset everything by hand, removing the values of the variables and moving the clips back to their starting places and everything.
So I need something that could go into an on(press) that would completely restart the movie. I've tried the goToAndPlay() and goToAndStop() methods, but those don't reset the variables or rewind the movie clips. Can anyone help? If absolutely necessary I can show the .FLA to someone but it's rather sloppy (I thought this would be a simple game that even a noob such as myself could make).
Unload A Movie...completely
I am using:
Code:
on (release) {
_root.unloadMovie("_self");
}
to unload my movie.
The movie does disappear, but i am loading it in a web page over html text (that is hyperlinked). When the movie unloads, the area where the movie was, is not clickable. areas outside of it are clickable though. When i highlight the text, etc on the page, a box that is the same height & width of my movie also gets highlighted. This tells me that the movie is still there, it's just not visible.
I did make the window mode transparent when i published the movie...
is there a way to completely unload the movie?
Anyone Know How To Restart Movie Completely?
Hello all,
I have a game and it plays through perfectly now(finally ).
Whether you win or lose there is a button to restart the movie which takes you back to the first frame of the movie. So heres a generic schematic.
Frame1: Welcome screen
Frame2: Declares variable
Frame3: Main Game
Frame4: Lose Screen
Frame5: Win screen
So when you click on the button on the win screen or lose it goes back to
Frame 1. The only problem is all of the variables still hold the values from the last game. I would like it so that when you click the button it reloads the movie compltely like you were starting freshly does anyone know the code?
Thanks for any help.
How Do I Import A Movie Completely
I made a mc that I want to add to another project. Every time I try to copy the mc it tells me that the symbol numbers are already taken do i want to replace? I hit no and it seems to replace them anyways. I've tried to import the fla or swf and it breaks it down to about 2 frames and it would be like starting over. Any way to do this?
Completely RELOAD Movie?
hey, making a simple banner with complicated animation and things... I have lots of subtimelines... so how can I reload the parent movie, I just want my movie to start from the fresh, as if it was just loaded.. so is there any way to "refresh" my swf, or reload it in some way? oh, and the script will be placed inside the mc...
thanks in advance...
Unloading A Movie And Replace It Another One Completely.
Hi
can anyone please help me with action script code. I have two flash files with common background(graphic) with both lets assume they are 1.swf and 2.swf.
Now what I need to do is click on a button so the movie 1.swf is unloaded completely and 2.swf is loaded in its place. and since the background is common people won't notice that movie 2 has taken place of 1.
But i don't know much about action scripting, I searched this forum and found something like loading a movie in a parent screen on clicking a button but it didn't work.
Thanks.
Ad.
Cannot Completely Remove Movie Clip
Hey guys,
Im still developing my Asteroids game and the problem that i am having is that i can kind of make the asteroid dissapear when i shoot it, however it still seems to be doing a collision detection. If you run the attachment, you can see that when you shoot a circle, it goes away...but if you shoot the space where it is, the bullets disappear like the object is still there. I dont know how to completely remove it and its driving me up the wall.
Please help
Rodent
[try-catch] How To Stop The Movie Completely
Hi,
I'd like to use the try-catch statements and once the error is caught, stop the main movie for GOOD! I tried _root.stop() and nothing happened. I tried also to immediatly do _root.onEnterFrame = null; This time the movie stopped but it's not too kosher of a solution.
Thanks for any help.
Stopping Loaded MC
I am working on a portfolio website and have several movies being loaded into a placeholder, they were not originally swf so they are being converted to swf from their original format. The problem I am having is that since the conversion does not put keyframes on every frame I cannot use the basic stop command to stop the movie during play. Is there another way to stop the movie or is there some sort of program I have overlooked that will allow me to convert to swf and add keyframes to every frame.
Thanks
|