[self-interest] RE: Animation example source code?
ardeujho at cd.pn
Wed Mar 5 21:50:40 UTC 2014
I don't remember which video but one does show it. It's not difficult
though once you understand the concepts. I create morphs with buttons
to call methods of objects often to do tasks.
The basic steps for making a button are:
1) Drag a button from the factory window on top of the has tank morph.
2) Middle click the button and click 'set target'. This sets the target
to the gas tank.
3) Drag the button off the tank.
4) Open an outliner for the button (right click, open outliner). Click
the 'E' to get an evaluator. Run:
'script: 'target addAnAtom'
Now when you press the button it will call 'addAnAtom' on the target,
that being the gas tank.
I embed in a morph to create a row of buttons:
1) Drag a row morph from the factory window to the desktop.
2) Drag the button onto the row morph. You'll need to right click and
choose 'Grab' on the button to do this.
3) Right click on the button and choose "Embed in Morph below".
Do this with multiple buttons to create a row of them.
On Thu, Mar 6, 2014, at 05:02 AM, spdegabrielle at gmail.com wrote:
> An exercise for you would be to create some buttons that do these
method calls (start, stop, addAnAtom) when clicked. You can them embed
those buttons in a row morph. Then embed that row morph and the gas
tank in a column morph to get a single "Gas Tank" widget with controls.
I'm sure one of the videos on self show this - does anyone know which
one and at what time in the video it is shown?
1. mailto:spdegabrielle at gmail.com
3. mailto:spdegabrielle at gmail.com?subject=RE%3A%20Animation%20example%20source%20code%3F
4. mailto:self-interest at yahoogroups.com?subject=RE%3A%20Animation%20example%20source%20code%3F
11. mailto:self-interest-unsubscribe at yahoogroups.com?subject=Unsubscribe
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Self-interest