on (release)
{
if (oneup == “no”)
{
_global.whld3 = 183.200000;
_global.hhld3 = 307.500000;
_global.whld2 = 103.200000;
_global.whld4 = 103.200000;
_root.nav3.gotoAndPlay(16);
** _root.blank3.loadMovie(“mc.swf”);**
_root.blank3._alpha = 100;
_global.oneup = “yes3”;
} // end if
}
[/AS]
But when you click, nothing happens. The external mc doesn’t appear or seem to load. Whats wrong? Do I need to specify more specifically like a url? (eg. http://www.sgroove.com/mc.swf)
right after:
[AS]
_root.blank3.loadMovie(“mc.swf”);
[/AS]
put
[AS]
trace(“success”)
[/AS]
then test your movie in flash (control+enter) when the code gets to that line, if it gets there, an output window will open saying:
success
trace is your friend, if code is not working the way it should drop a few traces in there to see whats working and whats not
the success just means that it got that far down in the script. How are you making the blank3 object? Where are you placing it? You may have placed it off screen somewhere without knowing that you did.
the blank 3 object is a simple mc which is a rectangle.
With the actionscript above attached to the rectangle, I wanted an external swf to load inside the area of the rectangle. (when you click on the rectangle, it increases in length and width)
the mc is right in the middle and not anywhere i cannot see it.
So basically your creating the movie holding rectangle on the fly and placing it at 50,50, then loading a movie into it. If this works, then your problem lies with the blank3 object.
to what you have said previously.
Please view what i have done: http://www.angelfire.com/ut2/sgroove/mainpage.htm
There is still a problem because when you click on the mc, the external swf file does not load into the "dark grey" area (which is the "blank3 mc)
**i want the external mc loaded into the grey area. Please help me out.**
The following as has been attached to the "blank3" mc:
[AS]
onClipEvent (enterFrame)
{
var speed = 4;
var viscosity = 1.300000;
difference = whld3 - this._width;
xvelocity = (xvelocity + difference / speed) / viscosity;
this._width = this._width + xvelocity;
difference = hhld3 - this._height;
yvelocity = (yvelocity + difference / speed) / viscosity;
this._height = this._height + yvelocity;
}
on (rollOver)
{
if (oneup == "no")
{
_global.whld1 = 143.200000;
_global.hhld1 = 87.500000;
_root.b1._x = xhld1;
_global.whld2 = 143.200000;
_global.hhld2 = 87.500000;
_root.b2._x = xhld2;
_global.whld3 = 143.200000;
_global.hhld3 = 87.500000;
_root.b3._x = xhld3;
_global.whld4 = 143.200000;
_global.hhld4 = 87.500000;
_root.b4._x = xhld4;
_global.whld5 = 143.200000;
_global.hhld5 = 87.500000;
_root.b5._x = xhld5;
_global.xhld = xhldog;
if (last == "b1")
{
_root.nav1.gotoAndPlay(16);
}
else if (last == "b2")
{
_root.nav2.gotoAndPlay(16);
}
else if (last == "b4")
{
_root.nav4.gotoAndPlay(16);
}
else if (last == "b5")
{
_root.nav5.gotoAndPlay(16);
} // end if
_global.last = "blank3";
_root.nav3.gotoAndPlay(2);
_global.whld3 = 163.200000;
_global.hhld3 = 107.500000;
_global.whld2 = 123.200000;
_root.b2._x = 239.600000;
_global.whld4 = 123.200000;
_root.b4._x = 528.100000;
} // end if
}
on (release)
{
if (oneup == "no")
{
_global.whld3 = 183.200000;
_global.hhld3 = 307.500000;
_global.whld2 = 103.200000;
_global.whld4 = 103.200000;
_root.nav3.gotoAndPlay(16);
_root.createEmptyMovieClip("blank3test", 1);
_root.blank3test._x = _root.blank3test._y = 100;
_root.blank3test.loadMovie("http://www.angelfire.com/ut2/sgroove/sgbox.swf");
_root.blank3._alpha = 100;
_global.oneup = "yes3";
} // end if
}
[/AS]
wait…all of that code is on the blank3 object and not the main timeline? Put it back like you had it before and change the:
[AS]
_root.blank3.loadMovie(“mc.swf”);
[/AS]
to
[AS]
this.loadMovie(“mc.swf”);
[/AS]
if that doesnt fix it, post your .fla(s) and I’ll see what I can do…but I’m no guru so I make no promises