Yeah, I’m still alive. I just haven’t been working with anything new for a while, so haven’t had any reason to ask anything.\r\rAnyway, I’m trying to make a scroller and I’m having trouble with what should (I figured) be the easiest part.\r\rTo make sure that the scroller just goes along the set scrolling area, I put the following code in frame one:\r\rc = Scroller._x;\ru = Scroller._y;\r\rto check the x and y quardanants of the scroller, a movie clip with a button inside named “Scroller”. For some reason, though, it seems to think that the Scroller is somewhere in the top left corner (and slightly offscreen), as I discovered when I restricted the startDrag and tested in the project. It should be noted that the Scroller is in the bottom left corner and very much so on screen.\r\rAnybody know where I’ve gone wrong?\r\rIt’s occured to me that I might be misusing _x. Seeing as this is probably the case, may I politely recommend that it would be helluva convenient if Kirupa were to make a tutorial that explains what each of the useful but relatively unaccessible in Normal Mode commands do?
>I put the following code in frame one:\r>c = Scroller._x;\r>u = Scroller._y;\r\rframe one of what ? And what are c and u ? textboxes or something ?\r\r>to check the x and y quardanants of the scroller, a movie clip with a button inside named “Scroller”.\rSo what’s named “Scroller” : the button or the clip ? (if you’re answer is “the button”, well, it’s wrong).\r\rAnyway, the reason for this should be :\rc = _root.Scroller._x;\ru = _root.Scroller._y;\r\rIf you forget _root., you’ll get the position of the script all right, but it will be relative to the clip itself. Hence 0,0, hence top left.\rIf you put _root., you’ll get the positon relative to the whole scene.\r\rI might be wrong.\r0] pom
>>I put the following code in frame one:\r>>c = Scroller._x;\r>>u = Scroller._y;\r>\r>frame one of what? \r\rThe main movie, of course.\r\r>And what are c and u ? textboxes or \r>something ?\r\rJust random variable names. “c” is next to “x” on the keyboard. “u” is next to “y” on the keyboard, thus the selections. C means x, U means y.\r\r>>to check the x and y quardanants of the scroller, a movie >clip with a button inside named “Scroller”.\r>So what’s named “Scroller” : the button or the clip ? (if >you’re answer is “the button”, well, it’s wrong).\r\rInside the movie clip, of course.\r\r… and adding _root seems not to have done anything… Unless I’m mistaken, I’d only want to do that if the action was inside the movie clip. … Am I mistaken?\r\rDon’t mistake me for ungrateful, though. Thanks for the help.\r\rAny other ideas?
You’re right, though.\r\rIt is setting it to (0, 0)…
Upon further experimentation I’ve discovered the problem is in my constraint to rectangle setting, which I’ll admit I don’t really know anything about. It’s not accepting my variables because I didn’t put _root. in front of them. Silly me.