PDA

View Full Version : Flash 8 Actionscript Prob



HecticMedia
January 13th, 2006, 11:18 AM
Hey all,

I'm using a movie clip scoller thing.. it's basically 2 arrows (up and down) that make a movie clip..

My prob is, the actionscript was made to work with flash player 6.. the down arrow makes the movie clip scroll down, but it won't scroll back up with the up arrow.. when I choose it to play with flash player 6 though, it works fine..

Can anyone update the code for me? (p.s. btn1 is the up button)


btn1.onPress = function ()
{
text_mc.onEnterFrame = function ()
{
if (this._y < textScroll.mask._y)
{
this._y = this._y + 3;
} // end if
};
};
btn2.onPress = function ()
{
text_mc.onEnterFrame = function ()
{
if (this._y + this._height > mask._y + mask._height)
{
this._y = this._y - 3;
} // end if
};
};
btn1.onRelease = btn2.onRelease = btn1.onReleaseOutside = btn2.onReleaseOutside = function ()
{
text_mc.onEnterFrame = null;
};


Thanks for your help!

Ben

Mirandir
January 13th, 2006, 11:54 AM
Can't see any other problem than the fact that in btn1 you refer to "textScroll.mask" while in btn2 you refer to only "mask".

/Mirandir

HecticMedia
January 13th, 2006, 11:57 AM
Hmm how come it works with flash player 6 and not 8 then hmm

HecticMedia
January 13th, 2006, 11:58 AM
I take that back.. that fixed it!

Thanks a lot for your help!