Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Dienstag, 23. Juni 2009, 05:51

How to really close a window (not just hyde) ?

Hi !

I would like to create a link to close a window. I don't want to hyde it but to close it (so the window and the swf file in it stop playing).

I have created :

I've put in a swf file (a video).



The window appears and the video plays.

My problem, when i click on the link "close window" in the window html, the window is just hidden (i can hear the "sound" still playing, even if the window has disapeared). I would like the video stop playing when i click on the link "close window" (event:action(hidewindow,htmltext)

What should i do ? Create an action ? The action should be "close window", not just hyde window... You see what i mean ?

Can you help me ? Thanx

/Vinyl
</plugin>

2

Dienstag, 23. Juni 2009, 09:51

Hi,

the problem here is that the video-swf must stop the sound by itself!
there is no way to force that from external (from krpano),

for videos I would recommend using the new videoplayer plugin,
there the video can be controlled,

best regards,
Klaus

3

Dienstag, 23. Juni 2009, 14:04

Hi Klaus,

Thank you for your quick answer !

I dont really want to control the video because there is in my video a flash control player.

I would like to create a plugin / action which close completly my window, not hyde it

(because the video is still playing even if it is hyden - )

I've seen on that post that we can use "remove plugin", or unload ?

Or maybe, i can create a flash button in my swf file which can close the window and stop the video ?

What do you think about that ?

I'm using krpano 1.07 but i've donwloaded 1.08. I try the video plugin now.

Thank you

/Vinyl

4

Dienstag, 23. Juni 2009, 15:45

If the plugin you use make something like

Quellcode

1
Stage.addChild( ... )


Then the video could not be unload by krpano. You have to unload it by yourself.
VideoStitch, a video stitching engine / blog sur les visites virtuelles ( french ).

5

Dienstag, 23. Juni 2009, 17:56

Hi nelk !

Thank you for your help !

I've seen your blog, very interesting. I'm also french !

Concerning my question :

You can find an example here :

http://www.reflexion-graphic.com/krpano-1-forum/voiture.html

Editor is on, you can watch the code.

You'll see 2 green hotspots.

When you click on them, a window appears with a video. You can play/stop the video. Try to click on the link "close window" while a video is playing. You will heard the sound even if the window is hydden.

I'm using this plugin :


Quellcode

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
30
31
32
33
34
 	        url="%SWFPATH%/plugins/textfield.swf"
	        keep="false"
 	        visible="false" enabled="false" handcursor="true" capture="true" children="true"
 	        zorder="0"
 	        alpha="0.00" blendmode="normal"
 	        smoothing="true"
 	        origin="center" edge=""
 	        x="0" y="0"
 	        width="660" height=""
	        scale="1"
	        onloaded=""
	        onover=""
	        onhover=""
	        onout=""
	        ondown=""
	        onup=""
	        onclick=""
	        autosize="center"
	        background="true"
	        backgroundcolor="0x333333"
	        blur="20"
	        bordercolor="0xFFFFFF"
	        borderwidth="1"
	        css="data:css1"
	        glow="0"
	        glowcolor="16777215"
	        html="data:html1"
	        roundedge="0"
	        selectable="false"
	        shadow="5"
	        textblur="20"
	        textglow="0"
	        textglowcolor="16777215"
	        textshadow="0"


Then, in the htmlfield, i've placed a swf file with a video in it (autoplay : false). There is a control of the video in the swf file (play/stop/...). The video plays, it's perfect !


I use this action to hyde the window (as in the exemple textfield) :

Quellcode

1
2
3
4
5
		set(plugin[%1].enabled,false);
		tween(plugin[%1].alpha,0);
		tween(plugin[%1].blur,20);
		tween(plugin[%1].textblur,20,,,set(plugin[%1].visible,false));
	



The window hyde correctcly but the video is still playing. I can hear the sound !!




How could i make the window close (no need to control the video), but close, make the window unload or someting like this.


Thank you again !

6

Dienstag, 23. Juni 2009, 20:03

Hi,

you could try to remove the textfield plugin it via "removeplugin(name);"
but I'm sure you will still hear the sound,

(try also to switch to fullscreen, the videoplayer will take the control over it )

the video swf needs to stop the video by itself on removing from stage or on an "UNLOAD" event,
e.g.
if you have the video as3 source code you could do something like this:

Quellcode

1
this.addEventListener(Event.REMOVED_FROM_STAGE, stopplugin);

or:

Quellcode

1
this.addEventListener(Event.UNLOAD, stopplugin);   

and in the stopplugin() function, stop the video, close the videostream and so on...

or just try using the videoplayer plugin, that should be the better solution

best regards,
Klaus

7

Dienstag, 23. Juni 2009, 20:14

Hi,

I think the problem is you are closing the plugin htmltext with the action hidewindow that only make disappear the plugin !!!

Quellcode

1
2
3
4
5
6
	<action name="hidewindow">
		set(plugin[%1].enabled,false);
		tween(plugin[%1].alpha,0);
		tween(plugin[%1].blur,20);
		tween(plugin[%1].textblur,20,,,set(plugin[%1].visible,false));
</action>

He do not stop your video included in that plugin !!! In fact, if you return displaying the plugin htmltext, you will see the video at the point it is playing...

I think you must talk to the video itself with some kind of function to stop it !!!

What video player is it?

Salut.

8

Mittwoch, 24. Juni 2009, 00:38

Hi Klaus, Salut Michel ;-)

My videoplayer is a video imported in a flash as3 file.

Klaus, i'll try your solution and i'll tell you. I think of an other possibility :

Can a button created in flash as3 make a window close (like the action : action : hidewindow) ?

What do you think of my exemple ? It would be great to have the possibility to open windows with videos. It would be a great option !

Bye !

9

Mittwoch, 24. Juni 2009, 22:46

Can a button created in flash as3 make a window close (like the action : action : hidewindow)
Hi,

yes, from Flash any krpano actions can be called,
use the "krpano_as3_interface" for that,
see here:
http://krpano.com/docu/plugins/

this as3 codes would be needed in the plugin:

first import the interface (at the top of the code):

Quellcode

1
import krpano_as3_interface;


then get the an instance of the interface:

Quellcode

1
2
var krpano:krpano_as3_interface;
krpano = krpano_as3_interface.getInstance();


now you can call krpano actions with the call function:

Quellcode

1
krpano.call("action(hidewindow);");


best regards,
Klaus

10

Donnerstag, 25. Juni 2009, 00:33

Zitat

from Flash any krpano actions can be called
Hi, your answer makes me happy !


I guess it is possible to create a button which would close my window and stop the video playing in the same time.

This button would be placed in the swf file (the swf file with the link to the video.flv)

I'll work on that now.

Thank you for all your advices Klaus (and for your quick answer !).

11

Freitag, 26. Juni 2009, 15:28

Hi Klaus,

I used krpano_as3_interface and it works !
Krpano is full of possibilities !!

In xml file, i put :

Quellcode

1
 <krpano>  <plugin name="test" url="test.swf" /></krpano> 


Here is an example : I created a very simple flash plugin named test.swf.

http://www.reflexion-graphic.com/krpano-1-forum/voiture.html


Button 2 (right) : action get url krpano.com
Button 1 (left) : It doesn't work yet, i want to call a krpano action

The code in as3 for button 2:

Quellcode

1
homeButton.addEventListener(MouseEvent.CLICK, gotoAuthorPage);


I need some help because i'm new to AS3.

Can you explain how to use in as3 :

Quellcode

1
krpano.call("action(hidewindow);");


If possible, it would be nice to have an example of code for a button in as3 which call an action in krpano.


thanx

12

Montag, 29. Juni 2009, 13:16

If possible, it would be nice to have an example of code for a button in as3 which call an action in krpano.
yes, have a look at this example:
http://krpano.com/examples/cs3plugin/
(the .fla of it is included there for downloading)

best regards,
Klaus

13

Donnerstag, 2. Juli 2009, 05:40

first plugin

Hi Klaus,

Thanks a lot.
This exemple is perfect.

I spent all the night on it and I understand now how to create a plugin and how to call an action from flash.

It’s possible to build more complex interface now and have at the end one swf file.

It’s a nice way to share interfaces, pictures gallery, and video… But actually without sound unless i find a solution to this question :
How to stop FLV audio playback on navigation.

As i said, i’m new to AS3 (but spent a lot of time on as2 ;-)

I know how to create simple flash navigation in as3 like in this exemple :

http://www.reflexion-graphic.com/krpano-1-forum/voiture.html

There are 2 hotspots.

One loads a flash menu, not finished yet

One loads a plugin : very simple « home made » flash navigation created in as3.

You can switch from one page to another

It works perfect with picture, text, but not video :

The problem is, when switching away from a state to a different state, even though the child is removed, the current video apparently keeps playing as I can hear the audio continuing on.

This problem happens in flash (it’s not specific to krpano).
There are a lot of topics about that on the net.

But i still don’t know how to create a simple as3 button which would do these actions in the same time :

---> krpano.call("set(plugin[plugin01].visible,false);");

---> "Stop / Unload / remove plugin" in as3

It seems that the Unload is the good solution.

But i have still syntax problem.

Thanx to krano : I spend my night on as3 now ;-)

Thanx again Klaus, your example helps a lot !

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Vinyl« (2. Juli 2009, 06:01)


14

Donnerstag, 2. Juli 2009, 10:18

The problem is, when switching away from a state to a different state, even though the child is removed, the current video apparently keeps playing as I can hear the audio continuing on.
Hi,

a video must be stopped manually in flash by closing it's "stream",
see here:
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/net/NetStream.html#close()

best regards,
Klaus

15

Freitag, 17. Juli 2009, 04:53

Thanx Klaux ! Finaly, with your help, it works ! Ill post soon an example ;-)

16

Donnerstag, 26. Juni 2014, 17:43

Hi Vinyl,

Could you please post your code here to close a video.

Lots of people like me are looking for this ... *rolleyes*

Thanks for your feedback.