--- "Ken Norris (dialup)" <[EMAIL PROTECTED]> wrote: > *********** > > Date: Fri, 7 Feb 2003 22:54:31 -0800 (PST) > > From: Jan Schenkel <[EMAIL PROTECTED]> > > Subject: Re: More about images > > > Hi Ken, > > > > Let's see if I got this right: > > - there's one large image with all the keys in > their > > "DOWN" position > > - and you only want to show a small portion of > this > > image, at a specific place on the card > ---------- > That's right. > ---------- > > If that's correct, the solution I described ought > to > > work properly: > > - when you resize a group, this doesn't resize its > > contents but rather, it acts as a window, only > showing > > the part of its contents you want to display. > ---------- > I never would have guessed that. If I understood how > and why it works that > would help. > ---------- > > - you'll have to set its lockLocation to true, or > it > > will resize the first chance it gets ; and you'll > have > > to set the rect of the group to the size of what > you > > want to display. > > - then you can control which part of all that's in > the > > group is displayed, by controlling the hScroll and > > vScroll properties of the group. > > - if you need to display it at different positions > on > > the card, set the topLeft property of the group ; > this > > has no effect on the displayed part of the group. > ---------- > LockLoc of the group? I guess I'm confused. I > thought I had to resize it in > the handler to fit each "key" (button) anyway. The > handlers look like this: > > on theKey -- in the stack script > > -- the image is designed so the "keys" match the > button rects > -- so we can match it up if the original group > image is properly set > > set the rect of group id 1017 to the rect of the > target > > -- Now set the position it displays > > set the hScroll of group id 1017 to the left of > the target > set the vScroll of group id 1017 to the top of the > target > end theKey > > ...the button script looks like this: > > on mouseDown > theKey > show group id 1017 > end mouseDown > > on mouseUp > hide group id 1017 > end mouseUp > > ...I just tried it with one button, and I can see it > work OK, but it didn't > quite align like it should have. I tried to show the > group from the message > box, but it just showed the little piece. I tried to > resize it to the screen > so I could realign the whole image to make it > properly match the buttons, > but it went totally HAYWIRE! > > The group ended up with only about 1/3 of the BOTTOM > RIGHT of original image > in the UPPER LEFT of the screen. The handles were > all in the right position, > though, but the bottom right of the screen was > transparent, i.e., I could > see the UP group there. When I dragged it down and > to the right I could see > that the rest of the UPPER LEFT of the image was > missing. The upper left > handle was at the corner, but the rest of the group > was cut off. > > So I tried to hide the image and see if I could get > the button to work, but > I got a squawk box saying it couldn't find the > group. I tried to show it > with the msg box but it squawked again, this time > saying the group didn't > exist. > > So, somehow the group seems to have disappeared from > the stack. I don't have > a clue what happened to it. > > Any help appreciated. > > TIA. > Ken N. >
Hi Ken, First of all, try to see if the group is still there by using the Application Overview. It may just have run offscreen. If it's till there, try the following: set the rect of group "Foobar" to "100,100,200,200" set the hscroll of group "Foobar" to 0 set the vscroll of group "Foobar" to 0 And slowly rebuild from there. Also, to fix the little offsets you see: set the margins of group "Foobar" to 0 At any rate, your script looks just fine to me, and ought to do the trick. Hopefully we can fix the last quirks for you :) Jan Schenkel. PS: I've had some strange effects when using groups as well, though I've never been able to pinpoint them : a group with a script that conrained the line 'start editing me' and would halt right there, claiming there was no such group. ===== "As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld) __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
