Snow plugin enable
-
-
Hi bg360,
I think you misunderstood the meaning of the enabled attribute:
- visible
true or false, default=true - enabled
is plugin enabled to receive mouse events (true or false, default=true)
NEW in Version 1.0.7:
when false then mouse events are routed to underlying objects
Enabled to receive mouse events... does not mean enabling the plugin himself...
So, your first approach is the correct way to do:SAlut.
- visible
-
Thanx Michel ! I didn't know that.
Anyway, is there any way to switch the plugin (not only visibility), because it uses much CPU ? I want people to switch snowing only if they want. And I don't want the plugin to use their CPU if they don't want.
-
Hi,
Anyway, is there any way to switch the plugin (not only visibility), because it uses much CPU ? I want people to switch snowing only if they want. And I don't want the plugin to use their CPU if they don't want.
you could either remove the plugin by calling removeplugin(snow);
or set the number of "flakes" to "0" and visible to "false", then almost no CPU will be used by the plugin,e.g.
best regards,
Klaus -
Thanx, Klaus!! It worx.
Here is the code:Code
Display More<plugin name="snow" visible="false" zorder="-5" url="%SWFPATH%/plugins/snow.swf" blendmode="normal" type="snow" imageurl="" imagescale="1.0" flakes="0" color="0xFFFFFF" floor="0.3" speed="1.0" spreading="4.0" shake="4.0" speedvariance="2.0" rainwidth="0.5" rainalpha="0.5" /> <plugin name="switch_snow" align="righttop" x="32" y="15" url="snow-button.png" onclick="switch(plugin[snow].visible);switch(plugin[snow].flakes,0,4000)" /> </krpano>
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!