Image tansition doesn't work once loaded into movie clip

  • apriigem
  • Born
  • Born
  • apriigem
  • Posts: 3

Post 3+ Months Ago

I have an image transition movie made with Flash 8 that works perfectly if played on its on. I also have a main movie that I would like to load this into. Currently I am loading into a movie clip. The image transition is fine if it is played on its own, but once it gets loaded into the movie clip, the transition no longer works. I have tried several things to fix it, but nothing has worked so far. It seems like the problem is with the mask but I can't be sure. Also I have tried loading it into a level but the same problem comes up. Please help.

This is link for what the tansition should look like:
http://creativewedsites.com/image_effect.swf

When I load it into the movie clip, the masking effect is gone. Here is the effect code, if it helps.

_root.attachMovie("picMc", "picMask", 1000);
picMask._x = 215;
picMask._y = 129;

//Create the picBg which role as the background image.so called "preference object"
_root.attachMovie("picMc", "picBg", 500);
picBg._x = 215;
picBg._y = 129;

//Create the Mask
_root.attachMovie("maskMC", "myMask", 2000);
myMask._x = 215;
myMask._y = 129;
_root.attachMovie("bgMask", "bgMask", 700);
bgMask._x = 215;
bgMask._y = 129;

//Do the Mask job of setting picMask to Mask.
picMask.setMask("myMask");
picBg.setMask("bgMask");

//Create the animation pic loction array
picLocArr = [-2500, -1600, -2500, -690];

//animation MC of pic.
onEnterFrame = function () {
with (mode) {
mode = myMask._currentFrame;
if (myMask._currentFrame == 5) {
myMask.gotoAndStop(1);
}
}
if (picPlay != false) {
// trace(Math.abs(picLocArr[selectPicNum-1]-picMask._x));
picMask._x += (picLocArr[selectPicNum-1]-picMask._x)/6;
picBg._x += (picLocArr[selectPicNum-1]-picBg._x)/4.2;
if (Math.abs(picLocArr[selectPicNum-1]-picMask._x)<0.2) {
picMask._x = picLocArr[selectPicNum-1];
picPlay = false;
}
// end if
// trace(Math.abs(picLocArr[selectPicNum-1]-picMask._x));
}
// end if
};
//change pattern of mask.
mode.onPress = function() {
mode._x++;
mode._y++;
myMask.nextFrame();
};
mode.onRelease = function() {
mode._x--;
mode._y--;
};
//init;
var selectPicNum = 1;
var selectedPicNum = 1;
var picPlay = false;
contour.swapDepths(5000); :cry: :cry:
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

Chances are you have a "_root confliction".

What that means, is that _root has been used in the movie that is being loaded, after it's been loaded _root refers to the container movies _root & not the loaded movies _root.

On the MovieClip you're using to load the new movie, use this.
Code: [ Select ]
loading_container._lockroot = true

Alternatively, you can alter the _lockroot property inside the movie that is being loaded by placing this in the _root timeline.
Code: [ Select ]
this._lockroot = true;


"_lockroot" forces the MovieClip it's applied on to keep _root from leaking into the container.
  • apriigem
  • Born
  • Born
  • apriigem
  • Posts: 3

Post 3+ Months Ago

I actually tried to use this._lockroot. = true; on the 1st frame of the loaded movie and it still didn't work. That was when I decided I was going to go crazy if I didnt figure this thing out. Do you think it might be something else?
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

just try to remove the "_root. " reference and use "this." instead of it.
See if it works by it's own after that, and if so, then load it in another movie.
  • apriigem
  • Born
  • Born
  • apriigem
  • Posts: 3

Post 3+ Months Ago

K, did that. Doesnt work. I also tried to load it into another movie and that doesnt work either.
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

hmm ...
any chance you can place your flash file somewhere so one can take a look at it?

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 12 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.