[M4IF Technotes] Directly Call Conditional

Nicholas Smit salo rucus.ru.ac.za
Sun Oct 27 01:33:08 EST 2002


Hi experts.
Is there any way to directly call a conditional?
What I would like to do is something like : 
AT 2100 { CALL Media1GoSmall.activate	}
But of course I know one can only REPLACE, INSERT AND DELETE. 
As a work around at the moment I have: 
DEF TS1 TouchSensor { 	enabled false 	} 	
DEF Go ROUTE TS1.enabled_changed to TS1.Media1GoBig.activate
#"call" first event....
AT 1000 { 
	REPLACE TS1.enabled by true 
} 
#insert next event....
AT 2000 { 
	REPLACE Route Go by TS1.enabled_changed to
Media1GoSmall.Activate 
	Replace TS1.enabled by False
} 
#trigger the event....
AT 2100 { 	
	REPLACE TS1.enabled by True 		
}
But I've noticed there seems to be a latency introduced by the event
queue, hence the 2100.  Sometimes the triggering event can be introduced
as little as 10 milliseonds after the new event has been introduced, but
othertimes the player will crash, or ignore it.  100ms seems to work
fine though... But that's not great. 
There must be a better means to directly call a conditional...?
Thanks!
Nik.


More information about the Mp4-tech mailing list