Object VR - hotspot or accessing image ID

Specific Q&A about the new Flash export
Locked
craigm
Posts: 9
Joined: Mon Nov 27, 2006 11:59 pm

Wed Aug 13, 2008 3:57 pm

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.
User avatar
thomas
Chief Gnome
Posts: 2564
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Mon Aug 18, 2008 3:13 pm

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).
MfG, Thomas
Locked