-
Revisting the loading external swfs and button problems...
Here's the loading code:
function myTest (arg1:String)
{
var argumentArray:Array = new Array ();
argumentArray = arg1.split (",");
var myLevel:Number = argumentArray[3];
_root.createEmptyMovieClip ("a", myLevel);
a._x = argumentArray[1];
a._y = argumentArray[2];
var mc:MovieClip = _root.a.createEmptyMovieClip ("mc", 1);
mc._lockroot = true;
mc._alpha = 0;
mc.loadMovie (argumentArray[0]);
//
_root.onEnterFrame = function ()
{
var speed:Number = 8;
if (mc._alpha < 100)
{
mc._alpha += speed;
}
else
{
delete this.onEnterFrame;
}
};
}
This works...but here's my problem...I have created a swf with buttons on it to load pictures...the buttons are operating very strange...first the code on the button swf:
PicBut1.onRelease = function ()
{
_level0.myTest ("pic1.jpg", 40, 60, 1);
};
PicBut2.onRelease = function ()
{
_level0.myTest ("pic2.jpg", 40, 60, 1);
};
PicBut3.onRelease = function ()
{
_level0.myTest ("pic3.jpg", 40, 60, 1);
};
PicBut4.onRelease = function ()
{
_level0.myTest ("pic4.jpg", 40, 60, 1);
};
PicBut5.onRelease = function ()
{
_level0.myTest ("pic5.jpg", 40, 60, 1);
};
PicBut6.onRelease = function ()
{
_level0.myTest ("pic6.jpg", 40, 60, 1);
};
PicBut7.onRelease = function ()
{
_level0.myTest ("pic7.jpg", 40, 60, 1);
};
PicBut8.onRelease = function ()
{
_level0.myTest ("pic8.jpg", 40, 60, 1);
};
PicBut9.onRelease = function ()
{
_level0.myTest ("pic9.jpg", 40, 60, 1);
};
PicBut10.onRelease = function ()
{
_level0.myTest ("pic10.jpg", 40, 60, 1);
};
Now, some buttons work flawlessly...others not...buttons 7, 4 and 8 do not even see themselves as buttons (no finger, just pointer)...9 will click sometimes...and 3 jumps back and forth between finger and pointer...!!!
I have tried _root instead of _level0 with the same results...I can open the buttons swf on it's own and button 3 is still dancing.....
HELP!
-
Corruption!
Anyone got a beer?...it seems that the original fla got corrupted, some how...
-
Senior Member
Your function myTest has only 1 argument but you put 4 in. That is definitely not ok.
- The right of the People to create Flash movies shall not be infringed. -
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|