WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-08-2013, 10:05 AM
Ducky Ducky is offline
Member
 
Join Date: Jul 2012
Location: Birmingham, AL
Posts: 7
Simple toggle function

I am using the pit example.

Goal is to attach 4 quads to the pit screen, thus dividing it into quarters. Then create a sequence that on a key down will give the effect of the quads flashing. I also have a sound clip that goes in sequence with the flashing.

I am trying to create a function that allows for this. I have been able to create the 4 quads (scale, position, etc.), make them fade in and out (flash), and insert the sound clip, which is sequenced to the flash the first time I hit key down. If I hit the key down again the flash sequence will start over but the sound clip does not. The sound clip needs to also loop while the quads are flashing. I have attached my lines of code.

Help would be greatly appreciated. Thanks
Attached Thumbnails
Click image for larger version

Name:	ToggleFunction.JPG
Views:	749
Size:	149.4 KB
ID:	581  
Reply With Quote
  #2  
Old 02-12-2013, 02:00 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
I noticed two things from the code sample:

1) You are using vizact.call incorrectly. You should be passing it the play function, not calling the play function and passing it the result. It should be changed to:
Code:
vizact.call(quadBoardAlert.play,viz.LOOP)
2) The code you provided will not stop the looping sound or action, so I'm not sure how the sound stops playing at all. You may need to provide more code.

Also, please copy/paste the code in future posts, instead of attaching a screenshot of the code.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Applying mask using Stencil Function goro Vizard 1 06-01-2012 10:21 PM
Question about using function hankiwan Vizard 1 02-15-2010 10:50 AM
return variable from keypress function starbug Vizard 2 01-07-2010 11:14 AM
window.pick function over sub-window omidbrb Vizard 4 10-02-2009 04:23 AM
Do you know how to send a value for 'pool' to the onActionEnd function? ghazanfar Vizard 1 03-22-2007 10:25 AM


All times are GMT -7. The time now is 04:16 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC