Page 1 of 1

Object VR - hotspot or accessing image ID

Posted: Wed Aug 13, 2008 3:57 pm
by craigm
Hi,

I create object movies and would like to either be able to click on an image in the movie to launch a specific URL via hotspot, or be able to get access to the image ID (or frame ID) of the flash movie so that I can externally load a high res image in a browser.

I mainly create flash movies.

Is either of these possible?

thanks,

Craig.

Re: Object VR - hotspot or accessing image ID

Posted: Mon Aug 18, 2008 3:13 pm
by thomas
You can register (as with Panos) a onClickQtHotspot so

Code: Select all

var vr:MovieClip = _root.createEmptyMovieClip("vr", 1);
vr._lockroot=true;

var myLoader = new MovieClipLoader();
var myListener = new Object();

myListener.onLoadInit = function () {
// callback after the object is fully loaded
  vr.obj.onClickQtHotspot=function(id:Number,title:String,url:String,target:String)
  {
    // add your code here!
    trace(id + "," + title);
  }
};
myLoader.addListener(myListener);
myLoader.loadClip("myobject.swf", vr);
Should do the trick.
You can get the current image id with vr.obj.getPan() and vr.obj.getTilt() and change it with vr.obj.setPan(id) and vr.obj.setTilt(id).