OK here what I'm envisioning and keep in mind ive only just started playing with flash so I really am a total novice at this point:
I want to have two buttons which load different jpegs which are pretty large (about 5000 width x 600 height) to animate as the page background. so in my BG layer for the main timeline i added a container movie clip (5000x600 also) and in the container movie clip's timeline i have it classic tweening across the stage back and forth. then on the main timeline i have my two buttons which are supposed to load the backgrounds. the thing that seems to be messing it all up is the fact that i call "stop();" in my action script to stop on my 3rd frame of the main timeline after the preloader etc. in my testing i added yet another movie clip that animates and it keeps animating when i cal stop(); but the background image is not animating any more.
sorry for my lack of understand and THANK YOU for your patience ;)
anyways here is the main action script code:
import fl.transitions.*;
import fl.transitions.easing.*;
// tween the main menu into place upon opening
//var moveTween:Tween = new Tween(mainmenu_mc, "y", Elastic.easeOut, mainmenu_mc.y, 70, 2, true);
// claim MCs from library to use on stage when needed using addChild
var bg1:blueBG = new blueBG();
var bg2:greenBG = new greenBG();
var bg3:testBG = new testBG();
//var p4:page4 = new page4;
containerBG_mc.addChild(bg3);
var pageMoveTween:Tween = new Tween(containerBG_mc, "alpha", Strong.easeOut, 1, 0, 1, true);
blueBtn_btn.addEventListener(MouseEvent.CLICK, btn1Click);
crazyBtn_btn.addEventListener(MouseEvent.CLICK, btn2Click);
function btn1Click (event:MouseEvent):void {
var btn1Outro:Tween = new Tween(containerBG_mc, "alpha", Strong.easeOut, 1, 0, 1, true);
btn1Outro.addEventListener(TweenEvent.MOTION_FINISH, runBtn1Transition);
function runBtn1Transition (event:TweenEvent):void {
containerBG_mc.removeChildAt(1);
containerBG_mc.addChild(bg1);
var btn1Intro:Tween = new Tween(containerBG_mc, "alpha", Strong.easeOut, 0, 1, 1, true);
}
}
function btn2Click (event:MouseEvent):void {
var btn2Outro:Tween = new Tween(containerBG_mc, "alpha", Strong.easeOut, 1, 0, 1, true);
btn2Outro.addEventListener(TweenEvent.MOTION_FINISH, runBtn2Transition);
function runBtn2Transition (event:TweenEvent):void {
containerBG_mc.removeChildAt(1);
containerBG_mc.addChild(bg2);
var btn2Intro:Tween = new Tween(containerBG_mc, "alpha", Strong.easeOut, 0, 1, 1, true);
}
}
and of course there is a stop(); action on the 3rd frame of the main timeline in a different action script layer
SUMMARY:
3 layers: AS3 layer button layer BG layer
duties: AS3 layer just has a stop action on frame 3 button layer contains two buttons to dynamically change the background jpeg image. the action script for this layer is what i posted above BG layer has the containerBG_mc movie clip instance which on its own timeline animates left and right
if you need further clarification let me know
You're tweening something with the timeline in the container movieclip, so you're not tweening the container itself. Than you're adding movieclips to the container, so they are not affected by the tween.
What you want to do is add the backgrounds to the movieclip you're tweening in the container like this:
containerBG_mc.tweened_mc.addChild( bg3 );
You can set the name to tweened_mc in the properties-panel when selecting that tweened object.