I'm not quite new to actionscript, however I haven't used flash in over 3 years and I am quite rusty. I need a little oil, got some
Ok here's my problem. I'm doing a dynamic slideshow that I access from a main title page.
On the title page, there is a menu with 3 links, including one that loads the slideshow. That link works fine and I can access the slideshow. It displays OK.
In the slideshow, I have a main menu button that is supposed to get me back to the main title page.
The problem is when I click the main menu button. I go back to the title page however the last image of the slideshow won't disapear.
// create mc for target
this.createEmptyMovieClip('my_mc', 1);
// start with number 1
var i = 1;
// total number of images/text
var total = 20;
// define the function
function myFunction(i)
{
// load image i:
_root.my_mc._y = 50;
_root.my_mc._x = 350;
my_mc.loadMovie("images/image" + i + ".jpg");
// load text i:
var my_lv = new LoadVars();
my_lv.onLoad = function()
{
my_Txt.html = true;
my_Txt.htmlText = this.myText;
};
my_lv.load("textes/text" + i + ".txt");
}
//
//
//
//
// load first
myFunction(i);
// load next
next_btn.onRelease = function()
{
if (i < total)
{
myFunction(++i);
}
else
{
i = 1;
myFunction(i);
}
};
// load previous
previous_btn.onRelease = function()
{
if (i > 1)
{
myFunction(--i);
}
else
{
i = total;
myFunction(i);
}
};
I forgot to mention that this slideshow was first created in an older version of Flash (MX). I can't quite remember but it seemed to me that it was working fine back then... But it's been too long... I'm not sure anymore...
Last edited by Infinity Unit; 07-03-2009 at 10:40 AM.
If the movieClips are dynamically created instead of placed on the stage, they won't disappear as you'd expect.
You'll either have to put them in a placeholder movieClip that was istelf placed on the stage before exporting (/rendering/whatever you call it) or use ._alpha and ._visible as i mentioned previously.