[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Hyper Card HELP!

Posted on 2000-02-11
7
Medium Priority
?
233 Views
Last Modified: 2013-12-26
If I have a card that is bigger than my monitor, what would the code be to keep the card centered on a moving button???
0
Comment
Question by:moe10
  • 4
  • 3
7 Comments
 
LVL 1

Author Comment

by:moe10
ID: 2515176
Adjusted points to 300
0
 
LVL 4

Accepted Solution

by:
Alex Curylo earned 600 total points
ID: 2524855
It depends on how the button is moving, but the general idea is to track the button's location and move the window reciprocally.

Before the button moves, get the top and left coordinates relative to the window, something like

get the top of cd btn "Mover"
get the left of cd btn "Mover"

move the button, and get them again. Find the differences and apply their reverses to the loc of window "MovingWindow" or whatever by something like.

set the loc of "MovingWindow" to <new loc>

Thus if the window is at 100,100 and the button moves by 5, you'd move the window to 95,100, leaving the button at the same place visually


0
 
LVL 1

Author Comment

by:moe10
ID: 2529243
I tryed doing this:

on idle
put loc of card button mover into wind
set loc of Window to wind
end idle

"mover" is the moving button and "wind" is a container. But in your answer you did not say what the term is for the Window.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 4

Expert Comment

by:Alex Curylo
ID: 2536091
It's just the keyword "window" followed by the name of the window, I believe. That line I posted was wrong, it should be

set the loc of window "MovingWindow" to <new loc>

assuming that "MovingWindow" is the name of the, well, moving window.

I think. It's been several years since I actually did any HyperTalk programming :)
0
 
LVL 1

Author Comment

by:moe10
ID: 2537104
When I put that code in, it moved the inter window so it would move out of my screen. What I wanted to do is when you have a card that is bigger than your screen you can have a scroll box in the corner of your screen that lets you scoll to the bottom of your card. What I want to do is when the button moves your card will automatically scroll down for you.

      sorry about the confusion.
0
 
LVL 4

Expert Comment

by:Alex Curylo
ID: 2537169
Oh, you mean you want a control that acts like a scrollbar? Well, here's a generic window scrolling outline:

  put the scroll of the card window into cwscroll
  put item 1 of cwscroll into xscroll
  put item 2 of cwscroll into yscroll
  -- Here, change xscroll (horizontal position) and yscroll (vertical position)
  -- in whatever way makes sense for your control
  set the scroll of the card window to xscroll&","&yscroll

I'm not quite sure what you mean by "button moves". If you mean "clicked on", then you'd just add some small constant. If you mean "the position of the button changes in some fashion", then you'd track the changes and add them to xscroll and/or yscroll as appropriate.
0
 
LVL 1

Author Comment

by:moe10
ID: 2548432
booyah
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
Suggested Courses
Course of the Month10 days, 10 hours left to enroll

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question