Hello and thanks in advance.
I can’t seem to figure this problem out.
I have a few movie clips in the library. each is created at runtime, placed in an existing movie clip, and given some text (each movie clip has a dynamic text box inside). The header text loads, and then body, and then the enter button. My problem is that the tween for body don’t work, yet the tweens for the header and the enter text work. The only difference between the header and the body movie clips, is that the textbox inside, in the body clip is set to multiline.
here is code… what am i missing? is it a problem with how the code is written?
// Declare Variables
var contentVariable:Number;
var picFile:String;
contentVariable = 0;
// Import Tween Classes
import mx.transitions.Tween;
import mx.transitions.easing.*;
// Ensure Flash doesn’t scale it’s content
Stage.scaleMode = "noScale";
// Ensure Flash always puts the stage in top left corner
Stage.align = "CC";
//--------------------
//** FUNCTIONS **//
//--------------------
// Picture Loading Function
function loadMainPicture(contentVariable) {
if (contentVariable == 0) {
contentWindowDark_mc.attachMovie("imageHolder_mc", "imageHolder_mc1", contentWindowDark_mc.getNextHighestDepth(), {_x:80, _y:35});
loadMovie("http://localhost/images/slugcatcher.jpg", contentWindowDark_mc.imageHolder_mc1);
LoadMainPictureTween = new Tween(contentWindowDark_mc.imageHolder_mc1, "_alpha", Regular.easeInOut, 0, 100, 1, true);
LoadMainPictureTween.onMotionFinished = function() {
// Call Header Loading Function
LoadHeaderClip(contentVariable);
}
}
}
// Load Header Function
function LoadHeaderClip(contentVariable) {
if (contentVariable == 0 ) {
contentWindow_mc.attachMovie("headerHolder_mc", "headerHolder_mc1", contentWindow_mc.getNextHighestDepth(), {_x:40, _y:20, headerText_var:" Welcome to VVI"});
LoadHeaderClipTween = new Tween(contentWindow_mc.headerHolder_mc1, "_alpha", Regular.easeInOut, 0, 100, 1, true);
LoadHeaderClipTween.onMotionFinished = function() {
// Call Body Loading Function
LoadBodyClip(contentVariable);
}
}
}
// Load Body Function
function LoadBodyClip(contentVariable) {
if (contentVariable == 0) {
contentWindow_mc.attachMovie("bodyHolder_mc", "bodyHolder_mc1", contentWindow_mc.getNextHighestDepth(), {_x:50, _y:60, bodyText_var:"Welcome and Enter Text Here"});
LoadBodyClipTween = new Tween(contentWindow_mc.bodyHolder_mc1, "_alpha", Regular.easeInOut, 0, 100, 1, true);
LoadBodyClipTween.onMotionFinished = function() {
//Call Button Loading Function
LoadButtonsClip(contentVariable);
}
}
}
// Load Buttons Clip
function LoadButtonsClip(contentVariable) {
if (contentVariable == 0) {
contentWindow_mc.attachMovie("enterSite_bt", "enterSite_bt1", contentWindow_mc.getNextHighestDepth());
contentWindow_mc.enterSite_bt1._x = 50;
contentWindow_mc.enterSite_bt1._y = 170;
LoadButtonTween = new Tween(contentWindow_mc.enterSite_bt1, "_alpha", Regular.easeInOut, 0, 100, 1, true);
}
}
//--------------------
//** Playback **//
//--------------------
// Stop playback
stop();
// Start of movie
// show first logo
logo1ShowTween = new Tween(logo_mc, "_alpha", Regular.easeInOut, 0, 100, 1, true);
logo1ShowTween.onMotionFinished = function() {
showContentWindowTween = new Tween(contentWindow_mc, "_alpha", Regular.easeInOut, 0, 100, 1, true);
new Tween(contentWindowDark_mc, "_alpha", Regular.easeInOut, 0, 100, 1, true);
showContentWindowTween.onMotionFinished = function() {
// Call Picture Loading Function
loadMainPicture(contentVariable);
}
}