This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > May 2005 > SOS! don't work together...!





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author SOS! don't work together...!
kamyarabhari

2005-03-31, 4:27 am

I design some elastic buttons that work properly in their movie (*.swf) ; but
when I call this movie into another one by using the loadMovie(...,target..)
code, the elastic buttons cannot do their job! Is anybody here can help me?! :(

Jeckyl

2005-03-31, 4:27 am

It really depends on how the buttons are authored. You actually need to put
in a bit of thought and effort to make a movie so it works ok when loaded
into another movie. There is no guarantee that any old SWF file will play
ok when loaded into a clip .. indeed, if there's script involved, then
chances are it won't work unless the author used the correct techniques.

Without seeing you button SWF file (or its source to safe me decompiling it)
I cannot say how to fix it (if that is possible if you don't have the FLA
source).
--
Jeckyl


kamyarabhari

2005-03-31, 4:27 am

These are codes for layer contains movieclips (elastic buttons):

var grow = 1.5;
var speed = .50;
var elastic = .6;
movieclip.prototype.initScale = function() {
this.myScale = this._xscale;
};
Movieclip.prototype.elasticScale = function() {
if (this.over == true) {
this.theScale =
this.theScale*speed+((this.myScale*_root.grow)-this._xscale)*elastic;
this._xscale = this._yscale += this.theScale;
} else {
this.theScale =
this.theScale*speed+(this.myScale-this._xscale)*elastic;
this._xscale = this._yscale += this.theScale;
}
};
movieclip.prototype.onEnterFrameKiller = function() {
if (this.x>70) {
delete this.onEnterFrame;
this.x = 0;
}
++this.x;
};
movieclip.prototype.moveTheButts = function() {
this.x = 0;
this.onEnterFrame = function() {
this.elasticScale();
this.onEnterFrameKiller();
};
};
---------------------------
for buttons:


on (rollOver) {
this.over = true;
moveTheButts();
}
on (rollOut) {
this.over = false;
moveTheButts();
}

---------------------------
for movie clip contain button:

onClipEvent (load) {
initScale();
}
-----------------------
cheers

Jeckyl

2005-04-04, 11:56 am

It really depends on how the buttons are authored. You actually need to put
in a bit of thought and effort to make a movie so it works ok when loaded
into another movie. There is no guarantee that any old SWF file will play
ok when loaded into a clip .. indeed, if there's script involved, then
chances are it won't work unless the author used the correct techniques.

Without seeing you button SWF file (or its source to safe me decompiling it)
I cannot say how to fix it (if that is possible if you don't have the FLA
source).
--
Jeckyl


slimjim

2005-05-08, 10:17 am

hey this lad isnt being much help, there isnt much to it really you just have to remember that you have to link back to the original movie ( ie the movie that you are loading the second movie clip into) any references in the AS will have to refer to these.


eg:
for
movieclip.prototype.initScale = function()

themovieclipyouarelaodinginto.movieclip.prototype.initScale = function()

if you have any difficulties send me on the fla Ill have a look at it for you.

People like Jeckyl here are absolutely ruining the concept of forums and shared info. Who does he think he is some genius or something,


quote:
Originally posted by Jeckyl
It really depends on how the buttons are authored. You actually need to put
in a bit of thought and effort to make a movie so it works ok when loaded
into another movie. There is no guarantee that any old SWF file will play
ok when loaded into a clip .. indeed, if there's script involved, then
chances are it won't work unless the author used the correct techniques.

Without seeing you button SWF file (or its source to safe me decompiling it)
I cannot say how to fix it (if that is possible if you don't have the FLA
source).
--
Jeckyl

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews