ShowSceneNamed for generated button


(racheev) #1

Please help me.

This button was created by php script: <input type="button" onload="HYPE.documents[\'test\'].showSceneNamed(\'ChooseTable\')" onclick="HYPE.documents[\'test\'].functions().ChooseTable(0,0,'.$tid.')" value="Go">
This work.

function ChooseTable(hypeDocument, element, event) {			
	/// this work
	alert(event);

	/// this not work
	hypeDocument.showSceneNamed('myscene', kSceneTransitionInstant, 1.1);
	/// how to go "myscene" and save var event?	
}

Thanks


#2

You need to include your document ID if you are running this outside of a Hype document. Please see: http://tumult.com/hype/documentation/3.0/#invoking-api-from-outside-oftumult-hype

If you’re running this in Hype and it is not working, can you share a document?


(racheev) #3

Please test.zip (27.0 KB)


(racheev) #4

Not work

hypeDocument.showSceneNamed('ChooseTable', hypeDocument.kSceneTransitionCrossfade, 1.1);

(racheev) #5

This work

HYPE.documents['name'].showSceneNamed('nameS', HYPE.documents['name'].kSceneTransitionCrossfade, 1.1);

(Mark Hunte) #6

This may also help.

testPHP.zip (26.7 KB)


(racheev) #7

thanks