You are not logged in.

1

Friday, August 27th 2010, 1:37pm

Run swf animation when when open/visible ? ( opening animated swf infowindow by hotspot )

I`m using a hotspot to show a swf file.



However the swf has some intro animation and needs to start when clicking on the hotspot. As I understand default behaviour is thet it only gets visible when clicking the hotspot. How may I start the animation when I click the hotspot ?



Its suggested in another thread to workaround by using add/removeplugin action:



http://krpano.com/docu/actions/#addplugin

Loding movieclip



Does anyone have a working solution for this or advice to give ?

2

Friday, August 27th 2010, 3:33pm

Check out the "video player" plugin, http://www.krpano.com/forum/wbb/index.ph…ad&threadID=812

3

Monday, August 30th 2010, 9:06am

Video player plugin wont do for swf animations.



Anyone ?

4

Monday, August 30th 2010, 11:35am

Something like this:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<hotspot name="vhs_2_1" 
	url="/assets/hotspot-100.png" 
	ath="14.222309797249013" 
	atv="2.251436353941068" 
	scale="0.8" 
	zoom="true" 
	alpha="0.8" 
	width="75" 
	height="75" 
	onover="tween(alpha,1);tween(scale,1);" 
	onout="tween(alpha,0.8);tween(scale,0.8);" 
	onhover="if(plugin[vplg_2_1].ispaused, showtext(Click to play video), showtext(Click to stop video));" 
	onclick="if(plugin[vplg_2_1].ispaused, set(autorotate.enabled, false);set(plugin[vplg_2_1].visible, true);plugin[vplg_2_1].play();, plugin[vplg_2_1].stop();set(plugin[vplg_2_1].visible, false););" />

<plugin name="vplg_2_1" 
	url=/plugins/videoplayer.swf" 
	videourl="/videos/cats-short.flv" 
	x="0" 
	y="0" 
	align="center" 
	edge="center" 
	width="300" 
	height="200" 
	keep="true" 
	visible="false" 
	pausedonstart="true" 
	onhover="showtext(Click to stop);" 
	directionalsound="false" 
	onclick="plugin[vplg_2_1].stop();set(plugin[vplg_2_1].visible, false);" />

5

Monday, August 30th 2010, 1:44pm

Thanks for input, but maybe I should describe in details what I want to achieve:

I`d want to open a "infowindow" when I click a hotspot. The infowindow should be a animated swf, eg a small linear animation, or a a infowindows that "rolls down" from a menu.

I cant use .flv video for this.

The default for krpano is to make the swf visible when I click the hotspot, but by then the animation has already ran, and only the lastframe will show.

I`d like to show the swf animation from frame one to last frame when I click the hotspot.

6

Monday, August 30th 2010, 2:25pm

If it's a swf, can't you just stop(); it on frame 1, then use plugin[name].play() onover and plugin[name].gotoAndStop(1) onout? There's no 'default' action to happen when you click a plugin in krpano (from what I understand, I'm new here), you can do anything you want!

7

Monday, August 30th 2010, 3:47pm

I`d want to open a "infowindow" when I click a hotspot. The infowindow should be a animated swf, eg a small linear animation, or a a infowindows that "rolls down" from a menu.
...
...
I cant use .flv video for this.
....
......
The code i have given you does exactly what you want. An image will be shown as a hotspot; when you click that hotspot, a video will start playing. Click on that video to stop it.
You can use flv or any other video format that krpano can play.

8

Monday, August 30th 2010, 4:25pm

srisa: Thanks for input, but I actually dont want to play a video ;), I want to play a swf animation, not a flv video.

( ..or do you suggest to use always use the video plugin for flash animations ? )

This post has been edited 1 times, last edit by "JohnM" (Aug 30th 2010, 4:36pm)


9

Monday, August 30th 2010, 4:58pm

I missed the "swf file" thing *mellow* ; video player plugin plays only flv or any other H.264 encoded video, http://www.krpano.com/forum/wbb/index.ph…ad&threadID=812 .
To play the swf file, on clicking a hotspot, add another hotspot with the url pointing to the swf file. When the animation is stopped remove the newly added hotspot. I have never tried it though *smile*

10

Monday, August 30th 2010, 7:36pm

Here's the working solution for anyone who cares.
Protected has attached the following file:
  • example.zip (10.82 kB - 121 times downloaded - latest: Oct 14th 2023, 10:51am)

This post has been edited 1 times, last edit by "Protected" (Aug 30th 2010, 8:51pm)


11

Tuesday, August 31st 2010, 12:08pm

@Protected: Thanks, that was helpful.