I’m doing a tutorial and it’s teaching me in Flash 5 and I’m having to convert all the code in to mx. I’ve done fine thus far but am having troubles with the tell target stuff. Would anyone be able to give me a hand by telling me how flash mx reads tell target code?
On (Press, Drag Over)
Begin Tell Target ("scrollUp")
gotoAndPlay(2)
End Tell Target
End On
On (Release, Release Outside)
Begin Tell Target ("scrollUp")
gotoAndStop(1)
End Tell Target
End On
On (Press, Drag Over)
Begin Tell Target ("scrollUp")
gotoAndPlay(2)
End Tell Target
End On
On (Release, Release Outside)
Begin Tell Target ("scrollUp")
gotoAndStop(1)
End Tell Target
End On
thats not even Flash 5 code… it looks like Flash 3/4
Can someone look this over and let me know if I missed something? The swf I’m creating isn’t working properly and I think this is the section.
Set Variable: "currentScroll" = ../:scrolltext.scroll
Set Variable: "max" = ../:scrolltext.maxscroll
If (currentScroll < max)
Set Variable: "../:scrolltext.scroll" = currentScroll + 1
End If
new (mx):
set("currentScroll", scrolltext.scroll);
set("max", scrolltext.maxscroll);
If (currentScroll> 1)
set("scrolltext.scroll", currentScroll -1);
End
Im not quite sure if I did the ‘equal’ statement correctly.
it looks to be the same thing that you are trying to do. Its Flash 5, but its more recent code than what you are using. That looks like Flash 3/4 again. Where ever you are getting that code from, stop going there…
the only thing I noticed is the dragger doesn’t seem to pull down when you click on the down button only once you’ve dragged it…is that the same for everyone or just my screwy computer?
nm…you have really nice code ettiquette. I’m sure I’ll be able to sort through this easily enough. It’s really difficult sometimes when you get a file that you can’t even work through because it seems like things were randomly tossed in…lol
NO… Dont run…lol…please…I know it’s a lotta code but [COLOR=blue]Jubba[/COLOR] if you’re out there I’m experiencing a problem with the dragger popping down about 10 or so pixels once the draggers been used. I’ve tried editing some of it but with no avail… any ideas for me to try out?
dragger.onPress = dragger.onMouseDown = function ()
{
this.startDrag (true, line._x, line._y, line._x, (line._height + line._y)); //drags the bar
//this.startDrag(
this.onEnterFrame = function ()
{
ratio = Math.round ((this._y - line._y) * 100 / line._height); // finds the ratio. % that the bar has moved on line
if (Number (scrollableText.scroll) <= Number (scrollableText.maxscroll) && Number (scrollableText.scroll) > 0)
{
scrollableText.scroll = ratio * scrollableText.maxscroll / line._height; //scrolls the text
}
};
};
dragger.onRelease = dragger.onReleaseOutside = dragger.onMouseDown = function ()
{
this.onEnterFrame = function ()
{
this._y = ((scrollableText.scroll*(line._height*line._height))/(100*scrollableText.maxscroll))+line._y //moves the drag-box with the scroll of the ttextbox
};
stopDrag ();
};
up.onRelease = up.onReleaseOutside = up.onRollOut =down.onRelease = down.onReleaseOutside = down.onRollOut = function ()
{
this.onEnterFrame = null; //turns off the button functions.
};
up.onPress = up.onRollOver = function ()
{
this.onEnterFrame = function ()
{
currentScroll = scrollableText.scroll;
if (Number (currentScroll) > 1)
{
scrollableText.scroll = currentScroll - 1; //scrolls the text up.
dragger._y = dragger._y-1;
}
};
};
down.onPress = down.onRollOver = function (dscroll)
{
this.onEnterFrame = function ()
{
currentScroll = scrollableText.scroll;
if (Number (currentScroll) < Number (scrollableText.maxscroll))
{
scrollableText.scroll = Number (currentScroll) + 1; // scrolls the text down.
dragger._y = dragger._y+1;
}
};
};
/*_root.onMouseDown = function () // this function just traces the values of the max and current scroll of the text box.
{
trace ("max=" + scrollableText.maxscroll);
trace ("cur=" + scrollableText.scroll);
};*/
scrollableText = "This is the test text that will be scrolled.
Jubba is going to murder his roommate in his sleep because he is
an arse! This is the test text that will be scrolled. Jubba is going to murder his roommate in his sleep because he is an arse! This
is the test text that will be scrolled. Jubba is going to murder his roommate in his sleep because he is an arse! This is the test text
that will be scrolled. Jubba is going to murder his roommate in his sleep because he is an arse! This is the test text that will be
scrolled. Jubba is going to murder his roommate in his sleep because he is an arse! This is the test text that will be scrolled.
Jubba is going to murder his roommate in his sleep because he is an arse! This is the test text that will be scrolled. Jubba is going
to murder his roommate in his sleep because he is an arse! "