Flashery
- Started
- Last post
- 13 Responses
- rasko4
I'm stuck.
if I have a menu that is a swf loaded into a mc, and I want to use that menu to change the content swf inside a blank mc on the stage. these content mc's have a little animation sequence that needs to play before the new selection is loaded in its place.
How would I do this?
I have done it in the past by detecting a variable and using loadMovieNum to load swf's into a level but I cant seem to get this to work..
help much appreciated :)
- thosethat0
jesus i thought that said 'fishery'...
- sauerbraten0
you mean like an 'outro'
yeah, use variables, send vars back to the root (level0)..
var firstrun = true;
don't load the new thing until the 'little animation sequence' plays, at the end of that then change firstrun to false.
something along these lines..
i'm vague right now
- ********0
the different MC's should kick one another out and load seperately.
- rasko40
yeah an outro. I didn't do it like you mention sauerbraten, I have a 'nextMovie' function on the main timeline placed on individual buttons which tells the clip to play the 'outro', then at the end of the outro there is an action to load the 'nextMovie'
jazX, yeah but thats not my problem.
- sauerbraten0
rask, sounds like that would work, what's the problem?
you having problems controlling the MC via the function?
- rasko40
it worked in the past using loadMovieNum but now its not working using loadMovie, but I'm thinking that it may be because I am calling on the buttons from the main timeline but the buttons are actually inside a swf loaded into a mc.. its a little like:
http://www.universaldesignstudio…except that there should be an outro played before the new swf is loaded.
?? I'm no coder y'see so I'm really stuck!
- unfittoprint0
you could have a function that checks if the movie's loaded.
//check function
check=function(targetMovie){
if(targetMovie.getBytesLoaded() == targetMovie.getBytesTotal() && targetMovie.getBytesTotal() >4 ){
clearInterval(checkLoop);
waitingMC._visible=false;
targetMovie._visible=true;
}
}//the loop function
//waitingMC =anim. sequencepreload = function(targetMovie){
waitingMC._visible=true;
targetMovie._visible=false;
clearinterval(checkLoop);
checkLoop = setInterval(this,"check", 30, targetMovie);
}//you just to call it using
//something like:contentMC.loadMovie("myMovie.swf...
preload(contentMC);
- rasko40
I'm not really sure what going on there unfit, looks rather complicated.
Am I ok to be calling buttons from the main timeline like this:
_root.movieclip.buttonone.onRele... = function();{
if (nextMovie ! ="one.swf"){
nextMovie="one.swf";
_root.contentmc.gotoAndPlay("out...
}
};when the 'buttonone' is actually in a seperate swf loaded into 'movieclip'
?
*stuck
- Anarchitect0
what the preload function does isturning the contentMC inisible, and the waiting sequence visible.
Checks if the external movie has finished loading, and then reverse the visible status: contentMC is visible again while the waiting sequence return to "world of shadows".
- rasko40
maybe I misunderstand, but the outro needs to be relevant to what is currently loaded, ie say I have a pic of a man on a beach, the outro would be that pic fading out for instance.. there are basically going to be about 12 buttons that call in the relevant movies.
for some reason I cant even get the movies to load into the clip at the moment..
- versa0
rasko4
admittedly, i don't quite understand your ideal here, but in the past if i am going to use dynamically loaded mcs through attachMovie, or loaded swfs, i will have a 'shell' / empty mc on the stage that i put all of them into when i need them
i will always assign them a name like currentSection through my methods (ie, attachMovie), and have a prebuilt outro or intro function that addresses them, and calls their respective labeled "outro" or "intro" frames
since they are always named the same thing the function is efficient
then in each swf. or attached mc as i said, their will be frames labeled outro or intro or whatever you want, and call that frame from the universal function
jesus i don't think that made any sense
- unfittoprint0
the problem, rasko, is that my approach to this problem is probably somewaht different from yours.
you would also want a fade between the 'unoading' MC and the loaded one?
I think I had posted some fade alpha prototype here that would make that trasition easy.
- rasko40
hi chaps, yes versa that sounds very similar to what I am doing, though I am using a different method, I have since resorted to going back to loading swf's into levels and remaking my swf to the size of the entire stage so they fit, if that makes sense. Surely not the best way but at least I understand it haha!
unfit thanks my friend but the problem is my poor flash skills, I rarely touch flash and thus my knowledge is pretty poor especially AS!
no doubt your method is better than mine but I really didn't understand the code so I felt unsure just tagging it on incase I need to adjust stuff. Basically, I have swf's loaded that have labels "intro" and "outro" with their respective animations and am using the function/variable I mentioned to load and target the 'intro'/'outro' by calling the buttons from the main timeline if that makes sense?!
I have it working now by loading into levels I was unable to load swf's into mc's for some reason so I have to rebuild my swf's to fit the level instead.... must learn harder!
Thanks for your responses tho, one day I'll pick up a decent AS book!
:)