PDA

View Full Version : Urg, loading jpg to an MC under a button....


dr.swank
09-06-2002, 02:47 PM
this is really annoying because there is not standard behavior showing....

the situation is as follows:

I have a swf called menu1.swf
it loads small1.jpg, small2.jpg and small3.jpg into an with the following function that is called in frame 10

function thumbLoader() {
_root.menuGroup1.m1picture1.loadMovie("small1.jpg");
_root.menuGroup1.m1picture2.loadMovie("small2.jpg");
_root.menuGroup1.m1picture3.loadMovie("small3.jpg");
//_root.resizeM1();
}


above the m1picture1-3 are buttons called BTm1picture1 which are size matched to the jpgs via this function:resizeM1() (it is at the bottom)

function resize1() {
var newH = getProperty(_root.menuGroup1.m1picture1, _height);
var newW = getProperty(_root.menuGroup1.m1picture1, _width);
trace(newH);
trace(newW);
setProperty(_root.menuGroup1.BTm1picture1, _height, newH);
setProperty(_root.menuGroup1.BTm1picture1, _width, newW);
}
function resize2() {
var newH = getProperty(_root.menuGroup1.m1picture2, _height);
var newW = getProperty(_root.menuGroup1.m1picture2, _width);
trace(newH);
trace(newW);
setProperty(_root.menuGroup1.BTm1picture2, _height, newH);
setProperty(_root.menuGroup1.BTm1picture2, _width, newW);
}
function resize3() {
var newH = getProperty(_root.menuGroup1.m1picture3, _height);
var newW = getProperty(_root.menuGroup1.m1picture3, _width);
trace(newH);
trace(newW);
setProperty(_root.menuGroup1.BTm1picture3, _height, newH);
setProperty(_root.menuGroup1.BTm1picture3, _width, newW);
}
//funtion to run button resizing for menu on button 1
function resizeM1() {
for (i=1; i<=3; i++) {
trace("resizeM1");
_root["resize"+i]();
}
}


so what ends up happening, but not always is that when I load the site online, sometimes the button is erased, sometimes it is not. if i use i.e. it never works, if i use nn it sometimes works.

any idea's???

http://www.juliansanderobjekte.com/lucyjones
is the link check for the menu item at the top named "text 10 holder"

any help is much appritiated.

the doctor (without the cure :( )

dr.swank
09-07-2002, 05:18 PM
hi all,

well, after a LOT of coffee I found the problem...

my resize function was somehow causing the button to disapear instead of resize. go figure...

If I resolve the problem I will post it here for anyone to see.

the doctor