Checking Which Movie Is Playing
Here's the deal. I'm loading a swf file into a mc. The swf calls another swf file upon it's completion and that file calls another etc. etc. I'm wondering if there is anyway to check which file is currently playing in the mc in the root file. I hope that makes sense. Some help would be greatly appreciated.
-Jeff www.jeffmagliola.com
FlashKit > Flash Help > Flash MX
Posted on: 03-11-2003, 06:33 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Checking If Movie Loaded Into An Instance Has Fully Loaded B4 Playing
Hi,
I'm building a site that streams a series of small movies into some preset into instances on the _root timeline but are paused on an empty frame 1 until needed. So while the first movie is playing the second movie is already being loaded and is cued on frame 1 ready to play.
However, if the timeline tells the loaded movie (i.e. _root.content ) to play frame 2 before this movie has finished loading it will not play. This shouldn't happen because the movie loaded into _root.content should have loaded, but I need a failsafe.
Is there a way to run a routine once the _root timeline is finished to constantly check the status of the movie being loaded in _root.content and then play once it is loaded.
I've tried running this code in a routine:
if (_root.content._framesloaded >= _root.content._totalframes) {
_root.gotoAndPlay(2)
}
..but I'm not sure if it will work.
I really want to avoid a preloader (each movie is only about 10k big )
Any help would be greatly appreciated
Cheers
[CS3] Checking If A Movieclip Is Playing Or Not
I need to do a really simple thing since I've just star learning actionscript.. I'm using actionscript 2.0
I have a movieclip with movement tweening which starts from a still position. By pressing a button it begins to move, and if I press the button again it must stop. My problem is that I can't check if the movieclip is in movement or it's stopped.
Important thing: if I press the button just once, my movieclip must keep on moving in an eternal loop. Thanks in advance for the help
---Mark Harris---
Checking Whether Netstream Is Playing?
Hey everyone
I'm coding a FLV player, and I'm just beginning to make a play/pause toggle button. Therefore I want to be able to check, whether the movie is playing or not. The onStatus events only work when the movie starts playing the first time, and when it ends.
When i use the netstream.pause();, the onStatus "Play.Stop" doesn't see it.
How do I check whether or not my movie is pause or are playing?
- Ronze
Checking If Song Is Playing
I'm making a flash site with 4 frames. 1 Frame for each section of the web site. On the first frame I have attached a soundtrack. There are buttons on the page which bring you to each section of the site. My problem is that when you go back to the first frame, the music plays again, even when the other one is still playing. I'm not sure, but I'm guessing I have to write a function to check and see if the soundtrack is already playing...Can anyone direct me in the write direction.
Checking If Sound Is Playing
Hi all,
I was hoping that someone knew this off the top of their head, I don't think it's too complex. I have an interface where if the viewer is in a specific set of keyframes, there is specific audio that accompanies the visuals. The code below starts the audio in the specific areas that I need it to be started and stops when I go to a different area - just what I need. However, if they click and then remain in the same section, the audio starts all over. I was curious if there is anything I can do with the below code for it to test if the audio of the section is already playing, and if it is, to allow it to continue playing, and if its in a different section, to stop it and allow the other audio of the section to play.
Code:
function scrubRelease() {
stopDrag();
delete this.onEnterFrame;
if ((dragger._x>=23) && (dragger._x<=59)) {
stopAllSounds();
s40.start(0, 1);
} else if ((dragger._x>=60) && (dragger._x<=115)) {
stopAllSounds();
s50.start(0, 1);
} else if ((dragger._x>=116) && (dragger._x<=172)) {
stopAllSounds();
s60.start(0, 1);
} else if ((dragger._x>=173) && (dragger._x<=234)) {
stopAllSounds();
s70.start(0, 1);
} else if ((dragger._x>=235) && (dragger._x<=296)) {
stopAllSounds();
s80.start(0, 1);
} else if ((dragger._x>=297) && (dragger._x<=358)) {
stopAllSounds();
s99.start(0, 1);
} else if ((dragger._x>=359) && (dragger._x<=420)) {
stopAllSounds();
s00.start(0, 1);
} else if ((dragger._x>=421) && (dragger._x<=476)) {
stopAllSounds();
s10.start(0, 1);
} else if ((dragger._x>=477) && (dragger._x<=539)) {
stopAllSounds();
s20.start(0, 1);
} else if ((dragger._x>=540) && (dragger._x<=559)) {
stopAllSounds();
s30.start(0, 1);
}
}
Thanks in advace for the help.
Checking If A Loaded Swf Has Finished Playing
I'm using loadMovie to load a swf into flash at runtime. The swf that I'm loading was created in Macromedia Captivate. It's about 2 minutes long but it shows up as only 45 frames long. Further the _currentframe function never passes frame 2. I'm wondering, am I looking at the wrong timeline or something? Is there a way to check if a swf has finished playing besides checking if the currentframe equals the totalframes - 1?
Checking To See If The FLV Playback Component Is Playing
I have a FLV Playback component set up on my stage with a video chooser under it. I need to see if the player is playing because if I click the same video that already playing my play button comes up and the video starts to play again. I am including the code that I have on the chooser button:
Code:
thumb2.onPress = function () {
vidPlayer.removeEventListener("complete", shareLinks);
videoToPlay = box2;
vidPlayer.seek(0);
vidPlayer.stop();
checkAd();
if(textAdVisible == true && textAdType[videoToPlay] == "full"){
closeAdFull();
}else if(textAdVisible == true && textAdType[videoToPlay] == "half"){
closeAdHalf();
}
}
It seems that as long as I choose a different different video than what is playing it works fine.
thanks in advanced for any help
brostd
Check If Movie Clip Finish Playing Before Playing Next
I'm trying to figure out how to create a conditional variable script to check to see if one of the 4 movies are finished before starting the next selected one.
I have 4 menus with 4 movie clips that have an opening and closing animation in them.
When clicking the one of the buttons I would like it to check and see if any of the movie clips are in the open position. Then have the movie that is in the open position play it's closing animation. Then play the selected category movie that the person clicked on.
I know it's all done with variables but just cant figure out how to put it together.
here is what i have so far.
menuStatus = 0;
trace(menuStatus);
but1.onPress = function() {
if (menuStatus == 0) {
menuwork.gotoAndPlay("start");
menuStatus = 1;
} else if (menuStatus == 2) {
resetMenus();
}
};
but2.onRelease = function() {
if (menuStatus == 0) {
menuwhoweare.gotoAndPlay("start");
menuStatus = 2;
}else if (menuStatus == 1){
resetMenus();
}
};
function resetMenus() {
if (menuStatus == 1) {
menuwork.gotoAndPlay("close");
menuStatus = 0;
} else if (menuStatus == 2) {
menuwhoweare.gotoAndPlay("close");
menuStatus = 0;
}
}
thanks for any help in advance
Checking To See What Movie Is Loaded
I'm putting together a site using external .swf files loaded on different levels. There are 4 main sections to the site. Each section has a header at the top of the page and text at the bottom. Two of the sections have dropdown menus with subsections. These sections use the same headers, but different text. So, here is my problem...I want to check which header is loaded into the top, so that if the correct header is already loaded, it doesn't reload everytime the text is loaded. I have tried to use the following code in various ways, but the "if" statement isn't being read, but the "else" statement seems to work just fine.
on(release) {
if(_level1 == "prodheader.swf") {
loadMovie("prodservice.swf", 2);
} else { loadMovie("prodheader.swf", 1);
loadMovie("prodservice.swf", 2);
}
}
This is the site address in case my explanation is too confusing: http://www.lunabay.com/award/
Checking To See If Movie Is Loaded
On level1 I have the main links(which load an swf file onto another level). also in the 1st level are some visual elements(movies) which are constant, and will move into a certain postion depending on which link(swf) is loaded. when one of those is loaded, and another link is clicked from the main level 1 links, I want it to check to see which movie is loaded, and play the frame which reverses the position of the constant.... and then goes into the next swf and moves the constant into the position for that swf.
kinda hard to explain.........hope I'm making sense.
Checking If A Movie Is Loaded
hi there,
i have a menu bar that contains subitems, now when i press on certain subitems they load in a movie on a different level, now i want to ensure that if the user clicks on the button again whilst the movie that is going to be loaded is already loaded then the button will just not perform.... so in short i am asking if it is possible to check that a certain movie is loaded on a certain level
Thankyou
Load Movie Checking
Hi, I just wanted to know if theres a way to have a script check if my emptyMc contains a movieMc and if so, unload it ..
>>Heres the Scenario:...
I currently have a mainMc calling a menuMc which in turn calls in other sectionMc(s), now, when I just put this script on my frame
_root.sectionMc.unloadMovie();
I get an error saying can't locate file, which is understandable because the file (swf) isn't loaded on the sectionMc unless I ..
on (release) {
gotoAndPlay("section");
}
on (release) {
_root.sectionMc.loadMovie("section.swf");
}
Keeping in mind that I have multiple sectionMc(s) [with specificMc names] that my menuMc is calling into which are located in my mainMc, can I have the code do a check and see if the sectionMc(s) are empty or not? and if they are loaded to unload them?
on that note: is it advisable to have the sectionMc(s) loading on one emptyMc or specificMc(s) like I have?
wow, what a confusing state am in!
HELP! ...anyone?
Checking To See If A Movie Has Loaded?
Can someone help me with an if statement.
I need flash to check to see if a movie has loaded. and if it has,
I want it not to reload on the (on release) action.
In other-words, I dont want flash to reload the movie every time a user clicks on that same button.
this is what i have and is not working
if (_root.container._currentframe > 2){
stop()
}else{
_root.mc.play();
}
// Checking For A Loaded Movie
Is there any way to detect or check for a loaded movie.
What I am doing is loading a movie into level 2. I want to check if the movie has actually loaded to execute other functions.
Thanks in advance
Checking To See If A Movie Is Loaded
hi,
i'm working on project that i need some help with.
what is happening is this:
a button in the main movie loads another movie movie(an image gallery) into level 1.
basically what i need to happen is this:
when the button to load the image gallery is pressed, the main movie should stop on a certain frame and wait for the image gallery to competely load. once the gallery is fully loaded, the main movie continues on playing.
how do i make this happen? i'm still fairly new to flash, and i'm a bit confused as to how to get this to work. any help would be great!
thanks,
dave
Checking To See If A Movie Is Loaded
hi,
i'm working on project that i need some help with.
what is happening is this:
a button in the main movie loads another movie movie(an image gallery) into level 1.
basically what i need to happen is this:
when the button to load the image gallery is pressed, the main movie should stop on a certain frame and wait for the image gallery to competely load. once the gallery is fully loaded, the main movie continues on playing.
how do i make this happen? i'm still fairly new to flash, and i'm a bit confused as to how to get this to work. any help would be great! (i'm using flash mx)
thanks,
dave
Checking If Movie Is Loaded?
Hi Guys, need some assistance her. I have a project that currently is near comlpetion but I have just had to ad an intro movie that plays while the user selects from a menu on the left. There are two menus in play here, initial menu then a sub menu then another final menu. these are on 3 frames respectively. What I need to do is load the into movie into a placeholder on Frame 1, then when the user clicks to go to frame 2 to the next menu, the intro movie keeps playing rather than reloading from the beginning. Then I need to be able to reload the intro file from the beginning if the user click back to frame 2 from frame 3 of the main timeline. So I need some code to
A: Initially load the external intro.swf into container (Already got this bit)
B: Check to see if the intro.swf is loaded and if so leave it running and not reload it.
C: Check to see if the intro.swf is unloaded and if so, load it!
I'm currently trying this code but to no avail.
Frame 1 (Main Timeline)
loadMovie("swf\INTRO\Intro.swf","_root.main_cont ainer");
_root.currentmovie=="Intro";
Frame 2 (Main Timeline)
if(_root.currentmovie=="Intro"){
// Do nothing
}
else{
loadMovie("swf\INTRO\Intro.swf","_root.main_cont ainer");
}
Frame 3 (Main Timeline)
unloadMovie(_root.main_container);
_root.currentmovie="";
Any suggestions would be helpful as I'm running out of time on this.
P.S. I have three instances of the container - 1 on each frame.
Andy
Checking To See If Movie Is Cached
Hello all!
Excuse the noob question, but I was wondering if there was a way to check to see if an swf file was cached, and if it was to automatically go to a frame in that swf file. I know you could kind of do this with a preloader, but the file is fairly small so unless the viewer is on dialup, the first part is more than likely skipped. I want it so that when someone first comes to the site it plays if and only if the swf file is not cached. If the file is cached it would recognize that and move to a later part in the movie.
Is there a way to do this?
Thanks in advance,
phpkata
Checking For Keypress, With Out Movie Clip
Is it possible to check for a key press without a movie clip? I have a fraame with a stop() and the user can select choices at this spot. Given what key they press, sends the movie to the next place. Can I do thid, and if so where do i find the actionscript to do it?
Thanx,
paruby
Regarding Checking Of Movie Clips Hitting Each Other
I have a long list of actionscript for my flash movie to check whenever two movie clips hit against each other using "hitTest". But after checking, I discovered that it works perfectly sometimes only, and sometimes it just went crazy. Is it because the amount of actionscripts for the "hitTest" function to check that causes it? Or is it something wrong with my scripts?
Urgent, someone help me please..
Thanks
Checking If A Movie Clip Is Inside Another Mc
hi
someone told me that getBounds() can be used to check if a movie clip is completely inside another movie clip
is this true? and if it is how does it work? i can't work it out
thanks
Checking For A Variable In Another Movie Instance
Hi all,
I know a little about actionscripting but I am new to this whole thing Need some help if possible.. if you know of a tutorial that might help me then please let me know about it..
Anyhow,
I have a logo that slides in, then stays there.. then we someone clicks on the submenu buttons I want the logo to slide down and go small so this is what I did.
First I made a movie clip of for the logo, so first it slides in and stops on frame 30 and then if someone clicks on something it will go to frame 35 and shrink down.
Second I made this menu that has a bunch of submenu items in it.. I want to be able to click on those buttons check for a variable in the logo movie clip and then tell it what to do..
So if the logo is not on frame 35 I want the buttons to know and tell the Logo movie to go to frame 35. If the logo movie is on frame 35 then I want the buttons to check for the variable and do nothing.. does it make sense? I assigned a variable like size=1 to the logo movie frame 35.. then I used an "If" statement but that didn't seem to work.. so I now turn to you guru's.. any help would be much much much appreciated.
Checking IfFrameLoaded In Loaded Movie
Can somebody help me out...here's the scenario (flash5):
I am using the LoadMovie command to load a music only swf (swiftmp3 made). It plays great, but I want to check the frame loaded status of this movie so that I can control an animation in the root movie. Does that make sense?
The idea is this:
When frame x of the LoadedMovie is loaded, goto and play frame x in the root movie. I'm trying to sync animation to audio without the horrible quality loss of Flash's built in stream function.
Any ideas?
Checking Movie Clips In Preloader
I understand one particular method to creating a preloader. You can start with one scene and check to see if certain frames have loaded and if so, continue. That covers the main time line but what if you have several movie clips placed on single key frames? I would think that it would be necessary to preload them as well but how do you tell a preloader to check which frames have loaded in a movie clip (a sub time line)?
Mark
Checking To See If A Movie Clip Has Been Attached
Hey all, got a problem thats been bugging me. Let's say I have a MC named square that has a motion tween (like in a slider). We have another MC named circle and a button. When the button is pressed I used attachMovieClip() to attach the circle to the square, so now the circle follows the same motion as the square.
The problem lies on the loop. When the square hits its last frame it has a gotoAndPlay (1); action on it to loop the animation. When that happens the circle no longer appears on the square, you have to hit the button again.
How would I check to see if the square has a movie clip attached to it and if it does the movie clip that is attached stays on it until a further action tells it to be removed? Or is there something I need to place withing the "circle" MC to make it continue?
Thanks in advance,
-DigitaL FusioN
Checking Position And Starting Movie
OK Here we go
If you wanted a movie to start depending on the ypos of another movie clip how you code that?
if (getProperty("_root.hex_blue", _y) == 433) {
tellTarget ("_root.middlebox") {
gotoAndPlay("_root.middlebox", 3);
}
} else if (getProperty("_root.hex_blue", _y) == 373) {
gotoAndPlay("_root.middlebox", 1);
}
Is that completely off?
Thank you!!!
Checking Which Button/Movie Is On The Stage
Hi,
I am hoping you can help me... I have implemented a 5 button state navigation (when a button is pressed it becomes "unclickable" until another button is pressed) but need some help developing it further for my navigation system.
I have the 5 mvcBtn/buttons on the stage and within another movieClip I have a further 5 movies on another timeline (each with a beginning and end sequence). I want each mvcBtn/button to play the end sequence of the movieClip which is currently visible on the stage, and then play the beginning sequence of the movieClip that the mvcBtn/button is related to.
Heres the code for the mvcBtn: //(each one named mvcBtn0 - mvcBtn5)
onClipEvent (load) {
_root.fncBtnBuild(this, "btnStateChange");
}
Heres the code for the _ root.function
fncParseNum = function (strValue) {
for (var idxChar = 0; idxChar<=strValue.length; idxChar++) {
numCharCurr = strValue.charAt(idxChar);
if (!isNaN(numCharCurr)) {
break;
}
}
return parseInt(strValue.substr(idxChar));
};
fncBtnBuild = function (refClip, strBtn) {
refClip.numBtnID = refClip.strBtnID=_root.fncParseNum(refClip._name);
refClip.strClip = refClip._name.substr(0, refClip._name.length-(refClip.strBtnID.length+1));
refClip[strBtn].onRelease = function() {
this._parent._parent["mvcBtn"+this._parent._parent.numBtnCurr][strBtn]._visible = true;
this._parent._parent.numBtnCurr = this._parent.numBtnID;
this._visible = false;
};
refClip[strBtn].onDragOut = function() {
this.onRelease();
};
};
For Clarity: say I have a mvcBtn/button called "about", when this is clicked the idea is that it will then play the movieClip called About. But if say, a movieClip called Welcome is already on the stage, when the user clicks the mvcBtn/button called "about" it will play the end sequence of Welcome first and then play the movieClip called About.
It needs to do this for all five buttons and movies. I'm unsure how to modify the code (_root) to allow me to check which button has been pressed...
Any help you can give would be much appreciated!!
Checking That My LoadMovieNum Movie Has Loaded
Hi,
I have made this big waterfall 'flow' in a flash movie for online viewing.. and on some pages I want a petal to go down either the left or right side...
So I have made a simple 1stpage.swf that loads 2 seperate movies inside it.
1 is the moving waterfall 130k
2. is the falling petal - 2k
so right now I load them both like this;
loadMovieNum("woodstonewaterfall.swf", 2);
loadMovieNum("petalleft.swf", 3);
stop();
I need a command that checks that the first one is fully loaded, before it will load and play them both...
right now the petal starts falling before the waterfall is loaded!
Anyone?
Thanks...
Checking If External Movie Is Loaded
ok - this is killing me. have a timeline and i want that time line to sit on the first frame until 2 external movies has loaded, and then play. You can see in my code below that I'm loading my movies into empty clips and then checking to see if the bytes loaded = bytes total, but it's not working - the timeline is playing anyway.
The progress bar with the same scripting is working fine, but for some reason this isn't...any thoughts why?
ActionScript Code:
this.onEnterFrame = function(){
if (_global.movtoload==undefined){
_global.movtoload = _global.home;
}
if(_global.flag == true) {
_root.oldphoto.overmain.mainload.unloadMovie();
_root.oldphoto.overmain.image.unloadMovie();
_root.oldphoto.overmain.mainload.loadMovie(_global.movtoload);
_root.oldphoto.overmain.image.loadMovie("loadimg/image"+_global.pic+".jpg");
_global.flag = mypause;
trace("load");
}
if (_root.oldphoto.overmain.image.getBytesLoaded()==_root.oldphoto.overmain.image.getBytesTotal() && _root.oldphoto.overmain.mainload.getBytesLoaded()==_root.oldphoto.overmain.mainload.getBytesTotal()) {
this.play();
_global.bkload = false;
_global.contentload = false;
_global.flag = false;
delete this.onEnterFrame;
trace("DELETED");
}
}
stop();
Checking Frame Number On Loaded Movie
I'm creating an emptymovieclip called dummyclip and then calling dummyclip.loadMove("bla.swf") to load a swf in real time. But on the last frame of the loaded swf I want the program to move on and do something else. I tried using:
dummyclip.onEnterFrame = function()
{
if (dummyclip._currentframe == dummyclip._totalframes)
{
do stuff;
}
}
But it doesn't work. Any suggestions?
Checking For JPG Files Loaded As Movie Clips ?
Hi,
I need to check if a JPG file is loaded into a blank movie clip. I am using the loadmovie comment:
loadMovie("media/jazz/b9/image"+pic+".jpg", "_root.mc_main.mc_jazz.SubNav.photo.square");
It sounds petty easy, you will think... Let me explain.
I need to create an If() statement that check is a JPG file is fully loaded
am I on the right track using this?
if ("_root.mc_main.mc_jazz.SubNav.photo.square.image" +pic+".jpg"_framesloaded >=_totalframes) {
trace("waiting for the text to load photo.");
setProperty(_root.mc_main.mc_jazz.SubNav.photo.but 1, _alpha, 0);
setProperty(_root.mc_main.mc_jazz.SubNav.photo.but 2, _alpha, 0);
} else {
trace("finished loading photo.");
setProperty(_root.mc_main.mc_jazz.SubNav.photo.but 1, _alpha, 100);
setProperty(_root.mc_main.mc_jazz.SubNav.photo.but 2, _alpha, 100);
}
here a link to the project I am working on:
http://www.nelsonhstudios.com/Clients/EDP/
From there: go in Jazz and then click on musicians.
Thanks for the help.
Checking For JPG Files That Are Loaded As Movie Clips?
Hi,
I need to check if a JPG file is loaded into a blank movie clip. I am using the loadmovie comment:
loadMovie("media/jazz/b9/image"+pic+".jpg", "_root.mc_main.mc_jazz.SubNav.photo.square");
It sounds petty easy, you will think... Let me explain.
I need to create an If() statement that check is a JPG file is fully loaded
am I on the right track using this?
if ("_root.mc_main.mc_jazz.SubNav.photo.square.image" +pic+".jpg"_framesloaded >=_totalframes) {
trace("waiting for the text to load photo.");
setProperty(_root.mc_main.mc_jazz.SubNav.photo.but 1, _alpha, 0);
setProperty(_root.mc_main.mc_jazz.SubNav.photo.but 2, _alpha, 0);
} else {
trace("finished loading photo.");
setProperty(_root.mc_main.mc_jazz.SubNav.photo.but 1, _alpha, 100);
setProperty(_root.mc_main.mc_jazz.SubNav.photo.but 2, _alpha, 100);
}
here a link to the project I am working on:
http://www.nelsonhstudios.com/Clients/EDP/
From there: go in Jazz and then click on musicians.
Thanks for the help.
Checking For JPG Files That Are Loaded As Movie Clips?
Hi,
I need to check if a JPG file is loaded into a blank movie clip. I am using the loadmovie comment:
loadMovie("media/jazz/b9/image"+pic+".jpg", "_root.mc_main.mc_jazz.SubNav.photo.square");
It sounds petty easy, you will think... Let me explain.
I need to create an If() statement that check is a JPG file is fully loaded
am I on the right track using this?
if ("_root.mc_main.mc_jazz.SubNav.photo.square.image" +pic+".jpg"_framesloaded >=_totalframes) {
trace("waiting for the text to load photo.");
setProperty(_root.mc_main.mc_jazz.SubNav.photo.but 1, _alpha, 0);
setProperty(_root.mc_main.mc_jazz.SubNav.photo.but 2, _alpha, 0);
} else {
trace("finished loading photo.");
setProperty(_root.mc_main.mc_jazz.SubNav.photo.but 1, _alpha, 100);
setProperty(_root.mc_main.mc_jazz.SubNav.photo.but 2, _alpha, 100);
}
here a link to the project I am working on:
http://www.nelsonhstudios.com/Clients/EDP/
From there: go in Jazz and then click on musicians.
Thanks for the help.
Checking A Movie Clip's Frame Position Help
Hello,
I was just wondering if there was a way to check what frame a specific movie clip was on, for use in an "if" statement.
For example: if (movieClip is at frame 10) { do these things; }
Thanks in advance!
Checking If Several Movie Clips Exist On Stage
Hi all,
I am making a game where you are attacked by a waves of zombies. The first 'wave' is just one zombie and when this is off stage (either gone passed you or been killed) i use this code to check if it's gone and then instigate the 2nd wave of enemies (ie, change wave2ready variable to true)
ActionScript Code:
if( _root.Zombie1)
{
wave1Timer = wave1Timer + 1;
}
else
{
wave2ready = true;
delete wave1Timer;
}
That works great, my question is this however. The '2nd wave' has 3 zombies attacking and I wish to run a similar function to check if all 3 of these are gone from the stage. I presumed that I could just use this to check it all three were destroyed:
ActionScript Code:
if( _root.Zombie2 & _root.Zombie3 & _root.Zombie4)
{
wave2Timer = wave2Timer + 1;
}
else
{
wave3ready = true;
delete wave2Timer;
}
However this sets wave3ready to true when any one of Zombie 2 3 or 4 are destroyed.
Any help on this much appreciated
Fankoo
Real Time Checking Of Movie Clip Status
Im a noobie to actionscripting, though I have knowledge of Toolbook open script.
How can I set up code in Flash that checks for the status of a movie clip in real time or with 2 second gaps?
If you can hlep, you could make me
Many Thanks
Graham
Checking If Button Is Pressed In Nested Movie Problem..
So i am trying to use an OnRelease on a button in a nested movie but check if it's been pressed from the parent timeline..i have used the target path button and it got me this but it doesn't work..
this.titletabs.evolution.onRelease = function() {
this._parent[current].gotoAndPlay(2);
this._parent[current].alpha(5, 0);
};
the button instance is evolution in a movie instance called titletabs - any ideas why this doesn't work - thanks a lot..
Checking If Button Is Pressed In Nested Movie Problem..
So i am trying to use an OnRelease on a button in a nested movie but check if it's been pressed from the parent timeline..i have used the target path button and it got me this but it doesn't work..
this.titletabs.evolution.onRelease = function() {
this._parent[current].gotoAndPlay(2);
this._parent[current].alpha(5, 0);
};
the button instance is evolution in a movie instance called titletabs - any ideas why this doesn't work - thanks a lot..
Movie Clip As A Button And Constantly Checking Rollover Variable?
Hello,
I have a movie clip that I need to use as a button.
I am cuurently using 'on (rollOver)', and it is working, except that I need the movieclip/button to constantly update/read a variable.
My current code:
on (rollOver) {
if ((_currentframe<10) &&
(_root.Playable == true)) {
checkFourH();
}
}
If the mouse is over this movieclip, and the variable 'Playable' changes from 'false' to 'true', it currently can't figure this out, until the mouse is moved away from the movie clip, and then moved over it again.
Is there a way to make the movie clip constantly check this variable, OR make the 'on (rollOver)' code constantly update?
I am guessing that an enterFrame event may be the way to go, but I don't know the command for "If mouse is over me" in an enterFrame event
(I am using Flash MX)
Wacky Crashing On PC When Running Movie, Checking Code Syntax, Et Al.
I would greatly appreciate any insight into these... issues. There will be no code unless it's specifically requested, mostly because I'm hoping more to run into someone who has seen these problems before than for debugging help. I am somewhere between an AS noob and an intermediate user, however I have prior programming experience.
This is all using CS3 Professional.
First problem: Earlier today I had Flash open with my file (a simple allele pairing simulation that takes user input and pseudo-randomly pairs x bouncing balls of two types as they run into each other and then displays the results), and at some point, I think during code editing, Flash crashes. It also set my file back to the state it was in when I first opened it this morning, despite my predilection for heavy Ctrl-s use. After this:
a) I can no longer open ANY of my Flash files via their shortcuts in my project folder, I have to open them from Flash (<-- lesser problem)
b) Whenever I try to test my movie via Ctrl-Enter, click the checkmark in the Actions window to debug the program, or click the formatting button in the Actions window (there may be other actions that cause this, I haven't tested for them), the program crashes. (<-- big problem)
Since both of these issues occur on both of the PCs at my disposal, I switched to a Mac (No debates or snarks on PC versus Mac please, I just want to make this work). Since then everything began behaving very oddly, so I took a slightly older, pre-crash backup of my project and began merging the two into the older file. Theoretically, this and the opening issues on means my file is not corrupted, unless the first crash corrupted all of my Flash files in that folder (the folder is on a share).
Throughout the merging process several problems have been inconsistently appearing- it's so inconsistent, however, that running it without editing the file does not always yield the same results. Issues include buttons that only work when a button with only a trace in it is pressed first, some traces not actually printing to the output window, and glitches in the visibility/invisibility of my hand-made error window.
If anyone has seen these kind of problems before I would be very, very thankful if you'd let me in on why Flash has suddenly decided to wage war against me. I will continue to attempt to debug it on my own. Thank you!
Swapping Movie Clips With Variables And Just Playing A Friggin' Movie..
Ok i am trying to do 2 very simple things..
i just want to jump to frame 2 of this movie called solotab just when the movie first runs..
Then i want the clickable tabs to enlarge - move to the edge and replace each other and for this there are the variables current and currenttab to store the respective instances to be targetted.
I don't know why it doesn't work as the target path is correct and the variable is correct - the trace action shows this..
with your help i could become cleverer..the file is on this thread - http://www.kirupa.com/forum/showthread.php?t=217591
Si
Playing Movie With A Button Inside A Movie Clip
OK LETS START FROM THE VERY BEGINING HERE...
I HAVE A BUTTON THAT IS IN A MOVIE CLIP, WHEN I TELL IT TO GOTO AND PLAY THE FIRST SCENE FRAME 2, IT PLAYS THE ANIMATION IN THE MOVIE CLIP AND NOT THE SCENE. WHAT SCRIPT DO I USE TO TELL THE BUTTON TO PLAY THE MOTION TWEEN IN THE FIRST SCENE ON THE SECOND FRAME.
|