How to dispatch event-cuePoint in panoramic video?

Using Pano2VR/Object2VR SWF files with your own Flash projects
Post Reply
Sascha Selent
Posts: 28
Joined: Sat Jan 24, 2009 9:36 pm

Mon Apr 04, 2011 3:32 pm


The title says it: I´m trying to execute a function controlled by a cuePoint from a panoramic video.

I managed to load a panoramic video with a button.
I can play / pause the video with a button.

Now I´m trying to call a function with a cuePoint in the video, but I don´t know where to add the eventListener.

In the tracer I see that video-infos are traced (e.g. MetaData AND cuePoints), but I can´t see what is shooting the cuePoint-event.

I tried to dispatch the cuePoint in the video adressing the "", but it does not work.

Using Pano2VR 2.3.4 with Flash CS3.

Here is the code:

Code: Select all

import flash.display.*;
var loader:Loader;
loader = new Loader();
var url:String = "flur_zu_kueche_p2vr2.swf";
var urlReq:URLRequest = new URLRequest(url);
var vr:MovieClip;// panorama movieclip

// This is done after the swf is loaded.
function finished_loading(e:Event) {

function initHandler(event:Event):void {
	trace("initHandler: " + event);
	vr = MovieClip(loader.content);// cast 'DisplayObject' to 'MovieClip'
	vr.isFlash10=false;// Disable Flash 10 rendering if the container is Flash 9

function initPanorama(e:Event) {
	// check if the panorama object is available and initialize it
	if ((vr!=null) && (vr.pano!=null)) {
		removeEventListener( Event.ENTER_FRAME , initPanorama);
		vr.pano.setWindowSize(900,500);// resize the window
		vr.pano.setWindowPos(0,0);// reposition
// call initPanorama every frame
addEventListener( Event.ENTER_FRAME , initPanorama);

// Tell the loader to call 'finished_loading' after the swf is loaded.
loader.contentLoaderInfo.addEventListener(, finished_loading);
// Tell the loader to call 'initHandler' after the swf is initialized.
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
addChild(loader);// add your swf directly to the stage


function loadVideo(event:MouseEvent):void {
	vr.attachVideo('<video url="flur_zu_kueche_2046_800_kf1_cp.flv"/>');
	trace("ÖÖÖÖÖÖÖÖÖÖÖÖÖ + ";"onCuePoint", testHandler);
videoButton.addEventListener(MouseEvent.CLICK, loadVideo);

function testHandler(event:Event) {

function pauseVideo(event:MouseEvent):void {;
pauseButton.addEventListener(MouseEvent.CLICK, pauseVideo);
I attached all files including video if someone wants to test. I added a pano done with Pano2VR 3 if someone wants to test with cs4 or later.

If someone could help it would be great.


(3.19 MiB) Downloaded 2670 times
Post Reply