Reversing a .swf during unload movie?
Posted on March 12th, 2010 by jane
Thank you!!
this.onEnterFrame = function (){
if (rewind == true){
myMC.prevFrame()
}
Then I declare rewind to be true whenever I want it to reverse.
I just want the "contents" to change when I click on the buttons. Each button is already animated. I just want the "contents" to reverse itself upon exit and go to the next swf (when the user clicks the appropriate button)...
This is done alot on many sites...just dont have a sample with me so I can show it to you.
function trans(clip) {
contents._currentframe>1 ? contents.prevFrame() : (clearInterval(my_int), contents.loadMovie(clip));
}
//eg for the work button
work_btn.onRelease = function() {
my_int = setInterval(trans, 30, "work.swf");
};
scotty(-:
_root.contents.loadMovie("main.swf");
How would I reverse the main.swf content and then make the "contents" container load the next swf (based on the button pressed)? Sorry I'm not the greatest in ActionScript.
thanks! :)
Thank you very much for yer time! :beer: :beer:
Also one thing I noticed is that if I press a button many many times (You never know if the user wants to have fun :D ) the whole "contents" container just stops working all together. Is there a fix for this?
I can't post the whole FLA here because it's still work in progress...but I'll try to put a small sample.
I will explain what line does what:
//Put this in your main master swf...change the MYcontents to your desired container. i.e. a transparent movie clip with an instance name.
function trans(clip) {
MYcontents._currentframe>1 ? contents.prevFrame() : (clearInterval(my_int), MYcontents.loadMovie(clip));
}
//This one is obvious...change work_btn to the button that you want to be clicked on and change the mymovie.swf to your external swf...interval is the frames per second. I set mine to 25 and it works.. All of my swf's are in 40fps anyway.
work_btn.onRelease = function() {
my_int = setInterval(trans, 30, "mymovie.swf");
};
Hope this helps...thanks to scotty...I'm getting really close to what I wanted!
One Q...reversal works...BUT not all items are reversed in the .swf...As in I had incoming text that faded and then slided over with ease in...only some items were reversed.
I've try it the code, but not succeed.
Thanks in advance.
Its still not working
May be some problems.I'm not getting it.
I've replaced the names with MC , but still not working
Waiting for you source so that it'll be easy for me to understand.
Thanks & regards
The buttons (All MC's) have their own Action scripts, one of them is:
on (release) {
_root.contents.loadMovie("main.swf");
}
I will try the above code, thank you!
scotty(-:
The way it comes in is fine. Does the external swf have to not have any MC's inside of it?
It doesnt look fine when I scrub it, but during playback it looks ok (This is for the main.swf)
I'm still waiting for ur source file.
I'll be very thankful to you if you post here !
#If you have any other info about this subject , Please add it free.# |