Hi there,
I’m having an issue with a simulated “banner rotator”…
You can check it on the link bellow
http://server.menosketiago.com/bookhouse/banner_janeiro+sabino+lourenco+cartas+frida.html
Up untill you press a button all goes well, but when you press a button the new mc starts over after some seconds instead of going to the end and when you click another it turns even worse.
Here’s the code
// IMPORT CLASSES
import mx.transitions.Tween;
import mx.transitions.easing.*;
// MCLIP START PROPERTIES
btn1._alpha = 25
btn2._alpha = 25
btn3._alpha = 25
btn4._alpha = 25
btn5._alpha = 25
// TRIGGERS
stop();
startBanners();
// FUNCTIONS
function startBanners() {
btn1._alpha = 100
btn2._alpha = 25
btn3._alpha = 25
btn4._alpha = 25
btn5._alpha = 25
_root.container_mc.attachMovie("banner_janeiro", "janeiro", 1);
setTimeout(banner2, 10000);
}
function banner2() {
btn1._alpha = 25
btn2._alpha = 100
btn3._alpha = 25
btn4._alpha = 25
btn5._alpha = 25
_root.container_mc.attachMovie("banner_sabino", "sabino", 1);
setTimeout(banner3, 23000);
}
function banner3() {
btn1._alpha = 25
btn2._alpha = 25
btn3._alpha = 100
btn4._alpha = 25
btn5._alpha = 25
_root.container_mc.attachMovie("banner_lourenco", "lourenco", 1);
setTimeout(banner4, 15000);
}
function banner4() {
btn1._alpha = 25
btn2._alpha = 25
btn3._alpha = 25
btn4._alpha = 100
btn5._alpha = 25
_root.container_mc.attachMovie("banner_cartas", "cartas", 1);
setTimeout(banner5, 18000);
}
function banner5() {
btn1._alpha = 25
btn2._alpha = 25
btn3._alpha = 25
btn4._alpha = 25
btn5._alpha = 100
_root.container_mc.attachMovie("banner_frida", "frida", 1);
setTimeout(startBanners, 17000);
}
// NAVIGATION BUTTONS
//BTN1
btn1.onRollOver = function(){
btn1._alpha = 100
}
btn1.onRelease = function(){
_root.startBanners();
}
//BTN2
btn2.onRollOver = function(){
btn2._alpha = 100
}
btn2.onRelease = function(){
_root.banner2();
}
//BTN3
btn3.onRollOver = function(){
btn3._alpha = 100
}
btn3.onRelease = function(){
_root.banner3();
}
//BTN4
btn4.onRollOver = function(){
btn4._alpha = 100
}
btn4.onRelease = function(){
_root.banner4();
}
//BTN5
btn5.onRollOver = function(){
btn5._alpha = 100
}
btn5.onRelease = function(){
_root.banner5();
}
I’m guessing it’s a problem with the the previously attached mc actionscript conflicting with the newly attached mc but I’m not sure =X
Could really use some help on this one