Skip to main content
Participant
April 2, 2008
Answered

Movieclip disappears after 5 minutes

  • April 2, 2008
  • 9 replies
  • 935 views
Hi,

I have a movieclip (instance name: main) which fades in onto the stage/browser. Everything goes well, except after about 5 minutes the movieclip disappears.

What am I doing wrong??

I have attached my code.

Here's the link where you can find the .swf:
www.culpa-events.be/news.swf

Thanks for the efforts made to help me out.

A starting AS'er,
JacK
This topic has been closed for replies.
Correct answer silkyjack
Here's the solution:


The code I was using before wasn't correct. I put in a trace there to see what tha alpha was doing and it just kept going way further than 100.

Thanks for your link to the depth article!!

JacK.

9 replies

kglad
Community Expert
Community Expert
April 11, 2008
you're welcome.
April 11, 2008
thanks!
kglad
Community Expert
Community Expert
April 10, 2008
that loop consumes user computer resources. one unneeded loop is not the end of the world, it's just poor coding. if you routinely allow loops to run, you will cause noticeable problems if you have enough loops.
April 10, 2008
Oh no, haha. Does it slow it down or something? What exactly is the problem? I have very inefficient coding skills.
kglad
Community Expert
Community Expert
April 10, 2008
that's not good coding. you should delete your interval when it's no longer needed and restart it, if and, when it's needed.
kglad
Community Expert
Community Expert
April 3, 2008
you're welcome.
kglad
Community Expert
Community Expert
April 3, 2008
you're welcome.
silkyjackAuthorCorrect answer
Participant
April 3, 2008
Here's the solution:


The code I was using before wasn't correct. I put in a trace there to see what tha alpha was doing and it just kept going way further than 100.

Thanks for your link to the depth article!!

JacK.
April 10, 2008
I had that issue too, and the way I got around it was by adding a condition to forces it to stop at 100, like so:

yourMCinstancename.onEnterFrame = function() {
_alpha += 5;
if (_alpha >= 100) {
_alpha = 100;
}
}

and it will never disappear until you want it to!
kglad
Community Expert
Community Expert
April 2, 2008
in all my projects in use one variable to control all depths. because there are so many depths available for dynamic placement of flash objects, there's no reason to increment depths sparingly and this prevents depth collisions.

http://www.kirupa.com/developer/actionscript/depths.htm
silkyjackAuthor
Participant
April 2, 2008
Thanks,
I'll get into it and post my solution here..if I find it
kglad
Community Expert
Community Expert
April 2, 2008
that code's not causing the problem. if main suddenly disappears (without fading), you're probably overwriting it's depth, though you could be changing one of its properties, too.
silkyjackAuthor
Participant
April 2, 2008
Hi kglad,

thanks for the fast reply. How do I prevent that it's depth is overwritten? Or do you have a link to a tutorial where I can find out more about my issue?

Regards,
JacK.