start video from image hotspot

  • Hi, I can not figure the right syntax for playin or toggle video from my image hotspot.

    I made distorted video . I can click on the video to play or pause.

    I have also the small camera icon and want to play video also by clicking this hotspot.

    I use onclick="set(hotspot[videospot].togglepause());"
    or
    onclick="set(hotspot[videospot].onstartpause,false);" but what is the right syntax? I feel that it is not correct , 'set' is used for changing variables.

    I want to call intern action of a videoplugin and do not know the correct syntax. *confused*

  • Hi,

    Was wondering what the solution/correct code was to start a distorted video from an image hotspot.

    Here's the code I'm using within a scene.

    Code
    <plugin name="vid" align="righttop" x="98" y="4" scale="0.6" alpha="0.8" url="%SWFPATH%/skin/vidcamera.png" keep="false" onover="tween(alpha,1.0);"  onhover="showtext(View Video,buttontipstyle);" onout="tween(alpha,0.8);" onclick="lookto(0.45,5.37,43,smooth(150,50,200)); set(hotspot[videospot1].play(cats-short.m4v));"/>
    <hotspot name="videospot1" 			 url="%SWFPATH%/plugins/videoplayer.swf" 			 alturl="%SWFPATH%/plugins/videoplayer.js" 			 videourl="%SWFPATH%/video/cats-short.m4v"			 posterurl="%SWFPATH%/video/poster.jpg"			 keep="false"			 distorted="true"			 ath="1.556482" atv="3.181657"			 edge="center"			 scale="0.344911"			 rx="-62.5" ry="-20.5" rz="-19.425328"			 loop="true"			 pausedonstart="true"			 directionalsound="true"			 onhover="if(ispaused, showtext(Click to Play,buttontipstyle), showtext(Click to Pause,buttontipstyle));"			 range="200"			 volume="0.7"			 onclick="togglepause();"			 />


    Have tried using the following also with no joy.
    set(hotspot[videospot1].play());
    set(hotspot[videospot1].togglepause(cats-short.m4v));
    set(hotspot[videospot1].togglepause());


    Any help appreciated

  • Code
    if(device.html5,
    	hotspot[videoplayer_a].playvideo(get(hotspot[videoplayer_a].videourl_html5));
    	,
    	hotspot[videoplayer_a].playvideo(get(hotspot[videoplayer_a].videourl_flash));
    );
    delayedcall(0.5,hotspot[videoplayer_a].play());tween(hotspot[videoplayer_a].alpha,1);looktohotspot(videoplayer_a, 16, smooth(200,-50,200));set(hlookat_moveforce,-0.03);delayedcall(0.1,set(hlookat_moveforce,0));

    I have the different video files set to different attributes here. For some reason I then play it, and then wiggle the panorama some also and stop. This is to workaround some bug I think.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!