I developed a rather nice interaction using the Behavior Event and Action functions on a particular object. This interaction used metamorph to toggle both the object’s visibility and action direction. The interaction worked great during preview testing, but when I published it, most of the functionality failed. The problem is that to create this interaction I had to make Behavioral Events and Actions that are not initially assigned to any object. These particular events and actions are dynamically assigned using the metamorph process. Because they are not assigned to an object at publishing time they are deleted due to the option “Auto Clean Project File”, which also removes them from the project .IMS file. I could always uncheck the publishing option just mentioned but I would rather not because it can find valid items that should be deleted. I am sure that programmatically, we must limit the assignment to one event/action per object so the process knows which one to execute (I tried to make more than one assignment but could not find away). Not sure what the answer is, but to get past the problem, I have created objects that have no other purpose but to receive the initial assignment of the previously unassigned events/actions. During the execution of the interaction the events/actions are metamorphed from that holding objects and assigned to the desired object.
My solution seems sort of stop gap. Anyone have a better idea, or maybe a program upgrade suggestion that might resolve this problem?
I think your solution is the best for now. There is even an example of this in the tutorials. In ShowHide, obj3842 exists solely as a keeper for the "Show" metamporph behavior.
I'm hopeful that VM will fix this when the more important stuff is done.
Posts: 9216 | Location: Wellington, New Zealand | Registered: December 11, 2003
Please post a link to your page when you can. The forum is rather devoid of examples/sites actually using actions and behaviors. I'm sure any site using these would be of great interest.
Sorry the URL above is not an example of working interaction but rather a failure to make metamorph work when replacing a geo object. I posted this in error!
Larry, you mentioned that the forum is devoid of examples using actions and behaviours. The visibility example I used in an other post has an example of using the behaviour feature, all be it to trigger some javascript, but it is an example at least.
Posts: 1146 | Location: Australia | Registered: April 17, 2007
I will look into this as soon as I finish with something that I am in the middle of right now (hopefully tommorrow?) but I recall that metamorphs were not working well for things other than images. That may only have been for geometry metamorhphosis, though. If you could post a link to the ims file for your example, that would help too.
I have not placed a link here to the example of the “nice” interaction I talked about when I first posted this discussion because I have been trying to resolve a problem. The problem is not with the interaction I used for testing but with the actual application I intended it for. Rather than wait until I resolve the problem, I am posting a link to the interaction I used for testing. This interaction uses a lot of combinations on Metamorph and a few formulas.
Sorry for the delay. Ok, on the 'action lost' problem, you are correct, if the action is not attached to an object it will be removed during cleaning. As you have found, the only way to keep that from happening is to attach it to a dummy object.
Perhaps in the future we should add a 'don't clean' option to actions (and also geometries, behaviors etc.)
I'll talk about your metamorph problem on that posting but it looks like what I said (that is, they are only working for images).