Home General Papervision Event Listener Idea

Papervision Event Listener Idea

Published on December 3, 2009 by in General

The problem:
While working on a Papervision3D Flash Project I had a problem where a back button that sits above the 3d canvas and acts as a main navigational item was required to change Events according to where the site was in 3d space at the time.

The solution:
Everytime I’m about to add a new EventListener to the back button movieclip I call the function “delBB()” and then add my event listener using addBB(with the event here).

It seems to work correctly and is a faster way of working.

var currentBackListener = null;
function addBB(whatever) {
currentBackListener = whatever;
function delBB() {
if (currentBackListener!=null) back_mc.removeEventListener(MouseEvent.CLICK,currentBackListener);
currentBackListener = null;


 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
© Copyright © 2012 · Web Development London UK · All rights reserved · Site hosted on the network
By using the site and/or making use of any of our services you agree to our Terms and Conditions