Elemental 3 Posted March 27, 2015 Report Share Posted March 27, 2015 I'll skip the intro and get right to the point. I have the following code on Buttons top Button / text to scroll up on (press, keyPress "<Down>") { compText.onEnterFrame = function() { if (this._y<30.1) { this._y += 25; } };}on (release, releaseOutside, rollOut) { compText.onEnterFrame = "0";} bottom Button / text to scroll down on (press, keyPress "<Up>") { compText.onEnterFrame = function() { if (this._y>-365) { this._y -= 25; } };}on (release, releaseOutside, rollOut) { compText.onEnterFrame = "0";} these work fine scrolling the text field within the compText mc, no problem. the problem is resetting the compText mc to it's original _y point with a single button click within the mc I have another button (the single button click) that would take visitors to my contact page, and reset the _y position to its oroginal state 30.1 I've tried using a modified version of the bottom Button's code: on (release) { if (_root.compInfo.compText._y != 30.1) { _root.compInfo.compText._y = 30.1;} _root.gotoAndPlay("contact");} but this is not working; the gotoAndPlay works fine but the compText mc does not reset to _y = 30.1 or anything else for that matter obviously I'm doing something wrong, Any help would be appreciated Peace, NOTE: I'm still in the stone ages, using Flash MX 6.0 - hope it doesn't create a problem. Quote Link to post Share on other sites
Elemental 3 Posted March 28, 2015 Author Report Share Posted March 28, 2015 Got it, My error was the way I was targetting the compText movie clip. Instead of: _root.compInfo.compText._y = 30.1; I should have been using: _parent.compText._y = 30.1; where _parent is the main timeline of the movie clip compInfo, the mc where compText resides (is nestted) If you're reading this and find that I'm wrong, please correct me. Peace, Elemental Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.