Okay i will try to give it a go with better illustrations and codes.
First my gallery.
I have made a gallery called
galleri_mongoliet.swf at 420 x 415 pixels containing some clickable thumbnails. It works fine on it own.
Click here to see how it looks
import mx.transitions.Tween;
import mx.transitions.easing.*;
this.createEmptyMovieClip("container",1);
var imagesNumber:Number = 16;
for (i=1; i<=imagesNumber; i++) {
container.attachMovie("thumb"+i,"thumb"+i+"_mc",i);
myThumb_mc = container["thumb"+i+"_mc"];
myThumb_mc._x = (i-1)*myThumb_mc._width;
myThumb_mc._alpha=50;
myThumb_mc.largerImage = i;
myThumb_mc.onRollOver = function(){
this._alpha=100;
}
myThumb_mc.onRollOut = function(){
this._alpha=50;
}
myThumb_mc.onRelease = function(){
_root.attachMovie("image"+this.largerImage,"large_mc",2);
large_mc._y = 100;
new Tween(large_mc,"_alpha",Strong.easeOut,0,100,0.5,true);
large_mc.onRelease = function() {
var myFadeOut = new Tween (large_mc,"_alpha",Strong.easeOut, 100,0,0.5,true);
myFadeOut.onMotionFinished=function(){
large_mc.removeMovieClip();
}
};
};
- import mx.transitions.Tween;
- import mx.transitions.easing.*;
- this.createEmptyMovieClip("container",1);
- var imagesNumber:Number = 16;
- for (i=1; i<=imagesNumber; i++) {
- container.attachMovie("thumb"+i,"thumb"+i+"_mc",i);
- myThumb_mc = container["thumb"+i+"_mc"];
- myThumb_mc._x = (i-1)*myThumb_mc._width;
- myThumb_mc._alpha=50;
- myThumb_mc.largerImage = i;
- myThumb_mc.onRollOver = function(){
- this._alpha=100;
- }
- myThumb_mc.onRollOut = function(){
- this._alpha=50;
- }
- myThumb_mc.onRelease = function(){
- _root.attachMovie("image"+this.largerImage,"large_mc",2);
- large_mc._y = 100;
- new Tween(large_mc,"_alpha",Strong.easeOut,0,100,0.5,true);
- large_mc.onRelease = function() {
- var myFadeOut = new Tween (large_mc,"_alpha",Strong.easeOut, 100,0,0.5,true);
- myFadeOut.onMotionFinished=function(){
- large_mc.removeMovieClip();
- }
- };
- };
Placeholder partI want to use that as an element on my homepage wich is made in Flash as well and is 800x1347.
Therefore i have made a placeholder named
placeholder_mc on my main page which has the same size as my
galleri_mongoliet.swf.
When i click the button that should load my gallery into the placeholder, the gallery
is loaded but looses its dimensions and
does not work properly.
Heres a link where you can see the problem(click "galleri" -> mongoliet (the button most to the right on the world map) )
Here is the code code on the button
on(release){
loadMovie("galleri_mongoliet.swf", "placeholder_mc");
}
- on(release){
- loadMovie("galleri_mongoliet.swf", "placeholder_mc");
- }
It all seems pretty straight forward to me, but it seems my gallery looses its size properties when its loaded into a bigger .swf file.
Is there anyone who recognizes the problem?
Thanks a bunch!