Link to home
Start Free TrialLog in
Avatar of Flashvue
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?
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Post your question to the Flash forum:
https://www.experts-exchange.com/Web/WebDevSoftware/Flash/
ASKER CERTIFIED SOLUTION
Avatar of jcrumble
jcrumble

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of IceColdas
IceColdas

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;      
      }  
}
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;
         }
    }
}