PLEASE HELP!

to script or not to script

I am a newbie and haven't gotten into scripts yet. I am working on an object/widget (my second) and have ended up going in circles trying to figure out the 'Action" settings.

I have gotten my object to do what I want, but not the way I want it to. I can set the following actions with no problem...mouseaway, mouseover, mouse down and up...and default. Even manged to figure out the Command exe.

My object consists of animation files and sound files. All my images are good, same size and all.

Here's my problem.

If I try to set the 'Show' action..it will not execute and keeps the 'default' action from executing. I want one specific thing to take place when it loads/shows...and not again.
When I set the 'HIde' action, that action does not execute when I hide or close the object. Again, I just want it to do one specific thing when it hides/closes.

I have goen through the tutorials all day. I have tried setting it as a layer and a widget. I have juggled and renamed all the animations to make sure they aLL WORKED. The Hide and Show actions WILL execute if I have NO other actions set, but they run when I load the widget and thats all.

Am I trying to do something that can't be done or am I just missing something? For these 2 actions, do I have to write a script??? (shudder, groan)

Any help would be apreciated.

Thank you,

Noah99
1,377 views 3 replies
Reply #1 Top
not sure what the show is but quite a few widgets have a hide - weather widgets and such hide to tray - you might take a look at some of those and see how they are done.
Reply #2 Top
I can't be sure, but there are a couple things I wonder about. First, these are really "States" not "Action Settings". So, we have the different states, and with each we can define an image, and some animation setting, etc., and a sound (if you want).

Next, I am unclear what you mean by "Default". Typically the default state will be the Mouse Away. An object really won't know what "default" means other than Mouse Away. This is reflected by the Default Appearance: "Mouse Away" section of the General Properties tab. If you also have a state named "default" defined, that is no more than a name to the object, and I don't think you can get the object to enter that custom-named state without a script (may be wrong there).

Also, the states Show and Hide aren't the states an object goes through when it is opened or closed as a whole widget, but when it is told to Show or Hide by some other means. If you have an object with some different animations (say transparency fades) for the show and hide states defined, a good way to test it is to toggle it with another object. This is easily done, and doesn't require a script.

First give the object to be shown/hid an object ID on the summary tab. Then, on the Relation tab, set Popup to "Toggle". Click OK
Now create a new object. On its General Properties tab, click "change" to select a new Object Type. Choose Object Controller, Click the Open/Close radio, and set as a a target the other object you just named. Click OK, click OK.

Clicking on the controller object will Show and Hide the first object, and any appropriate animations and sound effects should execute.

Here is a sample dxpack http://www.feebdack.com/storage/StatesAndToggle.dxpack
Note that the Show state remains current until the object knows to change states, so the Mouse Away (default) state doesn't appear until you hover and exit.

hope that helps,
rr
Reply #3 Top
Thanks! I checked out some others and tried what you layed out for me, rabidrobot, and it was exactly what I was trying for.