Flashvue
asked on
Flash using Swishmax
I've created a website using SwishMax, which is an easy to use Flash .swf creator.
I have a static picture on one of the pages that I would like to change every few seconds. I woul'd like it to work very much like the changing logos on the experts-exchange home under "Who's Using EE?".
Any suggestions?
I have a static picture on one of the pages that I would like to change every few seconds. I woul'd like it to work very much like the changing logos on the experts-exchange home under "Who's Using EE?".
Any suggestions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
one correction (the index must increase after the image change, not at every frame enter) :
onEnterFrame() {
_root.timer1++;
if (_root.timer1 > 120)
{
_root.timer1 = 0;
LoadImage(_root.index);
_root.index ++;
if (_root.index>5)
_root.index = 0;
}
}
onEnterFrame() {
_root.timer1++;
if (_root.timer1 > 120)
{
_root.timer1 = 0;
LoadImage(_root.index);
_root.index ++;
if (_root.index>5)
_root.index = 0;
}
}
oh, seems like it doesnt work without using onFrame(1) statement. So final script for Scene_2 (tested and retested and reretested) :
function LoadImage(index) {
tellTarget (("/Background")) {
loadMovie("image"add(index )add(".jpg "));
}
}
onFrame (1) {
stop();
}
onEnterFrame() {
if (_root.timer1 == 0)
LoadImage(_root.index);
_root.timer1++;
if (_root.timer1 > 120)
{
_root.timer1 = 0;
_root.index ++;
if (_root.index>5)
{
_root.index = 0;
}
}
}
function LoadImage(index) {
tellTarget (("/Background")) {
loadMovie("image"add(index
}
}
onFrame (1) {
stop();
}
onEnterFrame() {
if (_root.timer1 == 0)
LoadImage(_root.index);
_root.timer1++;
if (_root.timer1 > 120)
{
_root.timer1 = 0;
_root.index ++;
if (_root.index>5)
{
_root.index = 0;
}
}
}
https://www.experts-exchange.com/Web/WebDevSoftware/Flash/