I am finnishing off my template and am running into a problem with a couple of containers that i want to hide when the template is loaded. I have tried several solutions but it always comes up.
I tried an Onload script globally and in the Container interface with show (Container2,0); but it still shows up. I also tried to set the button that will hide the container when pressed to 1 but that didn't work either. In the manual therei is some info on certain circumstances where the onlad doesn't work. Any easy fix for that?
Make Container not show onLoad
Re: Make Container not show onLoad
I had some similar problems with one of my templates...no matter what I did, it kept showing up....
It turned though to be a case of a forgotten script somewhere that between the ifs and the results, it was causing to container to show. Are you sure thats not the case with your template?
It turned though to be a case of a forgotten script somewhere that between the ifs and the results, it was causing to container to show. Are you sure thats not the case with your template?
-
- Regular
- Posts: 294
- Joined: 24 Jan 2012 18:22
Re: Make Container not show onLoad
I am 1 object away from 100% Lemur Memory -so no i am not sure But it is a pretty isolated part of the whole thing.
Re: Make Container not show onLoad
I tried replacing a large number of onLoad scripts with a single large onLoad script, but at first it did not work. I think the problem was due to the way the objects are instantiated as the template was loading. If the onLoad script was not inside the object it was manipulating, often the script did not work. My workaround was to use an expression and an onFrame script, to trigger execution of some startup code after a brief pause after the template loads:
Create expression:
startuptimer = 10
Create a new script, set execution to onFrame:
startuptimer = clamp(startuptimer - 1, 0, 10);
if(startuptimer != 1) return;
// put your onload code below
// it will execute once and only once after the template loads
Create expression:
startuptimer = 10
Create a new script, set execution to onFrame:
startuptimer = clamp(startuptimer - 1, 0, 10);
if(startuptimer != 1) return;
// put your onload code below
// it will execute once and only once after the template loads
-
- Regular
- Posts: 294
- Joined: 24 Jan 2012 18:22
Re: Make Container not show onLoad
Thx for the info.