How can I determine which image was clicked in 3D carousel?

I have been modifying some 3D carousel code that I found in hopes that I can get it such that when image "resolv2.jpg" (or any of my other images) is clicked on at the front of my carousel, it goes to a specific webpage. By just replacing "moveBack(event.target) from the toggler section of the code with "navigateToURL:(newURLRequest('http://google.com'), the target DOES sucessfully go to google when clicked on. However, I want to modify this code by altering the else statement to say something to the effect of "else if event.target (clicked on object) is 'resolv2.jpg' THEN go to google". So essentially, my question is how can I determine which image was clicked? Here is the entire code with the area I was altering bolded:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" applicationComplete="init();" backgroundGradientColors="[#000033, #000033]" backgroundGradientAlphas="[1.0, 1.0]">
<mx:Script>
          <![CDATA[
//Import Papervision Classes
               import org.papervision3d.scenes.*;
               import org.papervision3d.cameras.*; 
               import org.papervision3d.objects.*;
               import org.papervision3d.objects.primitives.*;
               import org.papervision3d.materials.*;
               import org.papervision3d.materials.shadematerials.*;
               import org.papervision3d.materials.utils.MaterialsList;
               import org.papervision3d.lights.*;
               import org.papervision3d.render.*;
               import org.papervision3d.view.*;
               import org.papervision3d.events.*;
               import org.papervision3d.core.*;
               import org.papervision3d.lights.PointLight3D;
               import flash.filters.DropShadowFilter;
                     import caurina.transitions.*;
                     private var numOfItems:int = 5;
                     private var radius:Number = 600;
                     private var anglePer:Number = (Math.PI*2) / numOfItems;
                     //private var dsf:DropShadowFilter = new DropShadowFilter(10, 45, 0x000000, 0.3, 6, 6, 1, 3);
               public var angleX:Number = anglePer;
         public var dest:Number = 1;
               private var theLight:PointLight3D;
        //Papervision Engine
               private var viewport:Viewport3D; 
               private var scene:Scene3D; 
               private var camera:Camera3D;
               private var renderer:BasicRenderEngine;
         private var planeArray:Array = new Array();
         [Bindable]
         public var object:Object;
         private var arrayPlane:Object;
         private var p:Plane;
         //Initiation function           
         private function init():void 
         viewport = new Viewport3D(pv3dCanvas.width, pv3dCanvas.height, false, true); 
         pv3dCanvas.rawChildren.addChild(viewport); 
         viewport.buttonMode=true;
         renderer = new BasicRenderEngine();
         scene = new Scene3D(); 
         camera = new Camera3D();
         camera.zoom = 2; 
         createObjects(); 
         addEventListeners();
//Create Objects function          
          private function createObjects():void{
          for(var i:uint=1; i<=numOfItems; i++)
                    /* var shadow:DropShadowFilter = new DropShadowFilter();
                    shadow.distance = 10;
        shadow.angle = 25; */
                    var bam:BitmapFileMaterial = new BitmapFileMaterial("images/resolv"+i+".jpg");
                    bam.oneSide = false;
                    bam.smooth = true;
        bam.interactive = true;
                    p = new Plane(bam, 220, 200, 2, 2);
                    p.x = Math.cos(i*anglePer) * radius;
                    p.z = Math.sin(i*anglePer) * radius;
                    p.rotationY = (-i*anglePer) * (180/Math.PI) + 270;
                    scene.addChild(p);
                    //p.filters=[shadow];
                    p.extra={pIdent:"in"};
                    p.addEventListener(InteractiveScene3DEvent.OBJECT_PRESS, toggler);
        planeArray[i] = p;
          // create lighting
        theLight = new PointLight3D();
        scene.addChild(theLight);
        theLight.y = pv3dCanvas.height;
          private function toggler(event:InteractiveScene3DEvent):void
                        // if the cube's position is "in", move it out else move it back
                        if (event.target.extra.pIdent == "in")
                                moveOut(event.target);
                        else
                               moveBack(event.target);
                private function moveOut(object:Object):void
                          trace(object +" my object");
                        // for each cube that was not selected, remove the click event listener
                        for each (var arrayPlane:Object in planeArray)
                                if (arrayPlane != object)
                                        arrayPlane.removeEventListener(InteractiveScene3DEvent.OBJECT_PRESS, toggler);
                        //right.enabled=false;
                        //left.enabled=false;
                        // move the selected cube out 1000 and rotate 90 degrees once it has finished moving out
                        Tweener.addTween(object, {scaleX:1.2, time:0.5, transition:"easeInOutSine", onComplete:rotateCube, onCompleteParams:[object]});
                        Tweener.addTween(object, {scaleY:1.2, time:0.5, transition:"easeInOutSine", onComplete:rotateCube, onCompleteParams:[object]});
                        // set the cube's position to "out"
                        object.extra = {pIdent:"out"};
                        // move the camera out 1000 and move it the to same y coordinate as the selected cube
                        //Tweener.addTween(camera, {x:1000, y:object.y, rotationX:0, time:0.5, transition:"easeInOutSine"});
                private function moveBack(object:Object):void
                        // for each cube that was not selected, add the click event listener back
                        for each (var arrayPlane:Object in planeArray)
                                if (arrayPlane != object)
                                        arrayPlane.addEventListener(InteractiveScene3DEvent.OBJECT_PRESS, toggler);
                        // move the selected cube back to 0 and rotate 90 degrees once it has finished moving back
                        Tweener.addTween(object, {scaleX:1, time:0.5, transition:"easeInOutSine", onComplete:rotateCube, onCompleteParams:[object]});
                        Tweener.addTween(object, {scaleY:1, time:0.5, transition:"easeInOutSine", onComplete:rotateCube, onCompleteParams:[object]});
                        // set the cube's position to "in"
                        object.extra = {pIdent:"in"};
                        // move the camera back to its original position
                        //Tweener.addTween(camera, {x:0, y:1000, rotationX:-30, time:0.5, transition:"easeInOutSine"});
                        //right.enabled=true;
                        //left.enabled=true;
                private function goBack():void
                        // for each cube that was not selected, add the click event listener back
                        for each (var arrayPlane:Object in planeArray)
                                if (arrayPlane != object)
                                        arrayPlane.addEventListener(InteractiveScene3DEvent.OBJECT_PRESS, toggler);
                private function rotateCube(object:Object):void
                        //object.rotationX = 0;
                        //Tweener.addTween(object, {rotationZ:0, time:0.5, transition:"easeOutSine"});
          private function addEventListeners():void{
    this.addEventListener(Event.ENTER_FRAME, render);
//Enter Frame Listener function             
private function render(e:Event):void{ 
                 renderer.renderScene(scene, camera, viewport);
                 camera.x = Math.cos(angleX) * 800;                                                  
                 camera.z = Math.sin(angleX) * 800;
private function moveRight():void
          dest++;
          Tweener.addTween(this, {angleX:dest*anglePer, time:0.5});
          //goBack();
private function moveLeft():void
          dest--;
          Tweener.addTween(this, {angleX:dest*anglePer, time:0.5});
          //goBack();
          ]]>
</mx:Script>
          <mx:Canvas width="1014" height="661">
          <mx:Canvas id="pv3dCanvas" x="503" y="20" width="400" height="204" borderColor="#110101" backgroundColor="#841414" alpha="1.0" backgroundAlpha="0.57"> 
          </mx:Canvas>
          <mx:Button x="804" y="232" label="right" id="right" click="moveRight(),goBack()"/>
          <mx:Button x="582" y="232" label="left"  id="left"  click="moveLeft(),goBack()" />
          </mx:Canvas>
</mx:Application>

Your answer may be correct, but I am very much a beginner to actionscript, and I was wondering moreso if it is possible to determine the root/url (i.e. images/resolv2.jpg)? Or even if InteractiveScene3DEvent calls a variable that holds this url? However, specifically, I'm just wondering if the actionscript itself could determine the url in a line of code such as "if object == BitmapFileMaterial("/images/resolv2.jpg"); "? Also, here's a copy of InteractiveScene3DEvent in more detail if you think that will help:
public class InteractiveScene3DEvent extends Event
                     * Dispatched when a container in the ISM recieves a MouseEvent.CLICK event
                    * @eventType mouseClick
                    public static const OBJECT_CLICK:String = "mouseClick";
                     * Dispatched when a container in the ISM receives an MouseEvent.MOUSE_OVER event
                    * @eventType mouseOver
                    public static const OBJECT_OVER:String = "mouseOver";
                     * Dispatched when a container in the ISM receives an MouseEvent.MOUSE_OUT event
                    * @eventType mouseOut
                    public static const OBJECT_OUT:String = "mouseOut";
                     * Dispatched when a container in the ISM receives a MouseEvent.MOUSE_MOVE event
                    * @eventType mouseMove
                    public static const OBJECT_MOVE:String = "mouseMove";
                     * Dispatched when a container in the ISM receives a MouseEvent.MOUSE_PRESS event
                    * @eventType mousePress
                    public static const OBJECT_PRESS:String = "mousePress";
                     * Dispatched when a container in the ISM receives a MouseEvent.MOUSE_RELEASE event
                    * @eventType mouseRelease
                    public static const OBJECT_RELEASE:String = "mouseRelease";
                     * Dispatched when the main container of the ISM is clicked
                    * @eventType mouseReleaseOutside
                    public static const OBJECT_RELEASE_OUTSIDE:String = "mouseReleaseOutside";
                     * Dispatched when a container is created in the ISM for drawing and mouse interaction purposes
                    * @eventType objectAdded
                    public static const OBJECT_ADDED:String = "objectAdded";
                    public var displayObject3D                                        :DisplayObject3D = null;
                    public var sprite                                                            :Sprite = null;
                    public var face3d                                                            :Triangle3D = null;
                    public var x                                                                      :Number = 0;
                    public var y                                                                      :Number = 0;
                    public var renderHitData:RenderHitData;
                    public function InteractiveScene3DEvent(type:String, container3d:DisplayObject3D=null, sprite:Sprite=null, face3d:Triangle3D=null,x:Number=0, y:Number=0, renderhitData:RenderHitData = null, bubbles:Boolean=false, cancelable:Boolean=false)
                              super(type, bubbles, cancelable);
                              this.displayObject3D = container3d;
                              this.sprite = sprite;
                              this.face3d = face3d;
                              this.x = x;
                              this.y = y;
                              this.renderHitData = renderhitData;
Thank you so much!

Similar Messages

  • I have about 5,000 images in a Folder.  How can I determine which images are NOT in a Collection?

    I have about 5,000 images in a Folder.  How can I determine which images are NOT in a Collection?

    Create a smart collection with criteria "collection" and "does not contain"; and also with criterion Folder contains (or folder contains all)
    That works if you are thinking about a specific named collection.
    If you are interested in finding photos that are not in ANY collection, the usual trick is "collection" "does not contain" "a e i o u y"

  • How can I know which link was clicked in the link list

    Hi everyone
    I'm using list of links in my page to display list of the files in some directory.
    How can I know which link user was clicked. There are some code:
    <%
    String dir = "..//files//";
    File fin = new File(dir);
    File files[]=fin.listFiles();
    for(int i=0;i<files.length;i++)
    File x = files;
    %>
    <%=x.getName()%><br>
    <%
    %>
    Please help

    You need to pass some data on the querystring to the page you are linking to.
    <a href="Main_Work.jsp?file=<%=x.getName()%>"><%=x.getName()%></a><br>
    This will send a parameter called "file" with the value of the file name that the user clicked.
    Now in Main_Work.jsp you can access this data as follows:
    <%
    String s = request.getParameter("file");
    File f = new File("..//files//"+s);
    %>

  • How can I determine which generation ipad I have?

    how can I determine which generation ipad I have. It was a gift last year.

    Click here for information.
    (73309)

  • How can I determine which computer a share is connected to in /Volumes from terminal or a script?

    I run a set of virtual machines via Fusion on an iMac that we run automated tests on for our website.  There is a folder on each VM called /Automation that is shared. 
    I have a python script that runs on the host, that will find an open VM, start it up and then mount the VM's /Automation folder.  So if there is only 1 VM powered on, the folder shows up in /Volumes as /Volumes/Automation.  The  problem is when there are 2 or more VM's powered on, because then the shares start being named /Volumes/Automation-1 and Automation-2 etc.  So my question is, how can I determine which computer each share belongs to from terminal or a script?
    In other words, I'm looking for something like:
    /Volumes/Automation = "FirstVirtualMachineName.local"
    /Volumes/Automation-1 = "SecondVirtualMachineName.local"
    Is there any way to determine which computer a mounted share is connected to?  In the past, I've just unmounted all /Automation folders, and then mounted them in a particular order, but that's unreliable and messy in my opinion.  If anyone knows a better way, please let me know.  Any help is appreciated.
    Thanks,

    Well I think I have a workable solution.  It's not perfect, but I think it will do the trick. I can put a spotlight comment on the folder similar to 'HostName=OSX-Automation-1.local' and can then retrieve that value from our server with the following python snippet:
    import subprocess
    out,err = subprocess.Popen(['osascript','-e','tell application \"Finder\" to get comment of \"Macintosh HD:Volumes:Automation-1\"'],stdout=subprocess.PIPE, stderr=subprocess.PIPE).communciate()
    So I could just loop through each 'Automation*' folder in /Volumes and grab the name from the spotlight attributes on the directories.  I don't think I really need to worry about the comments being overwritten, but I may have one of our launch daemons that run on the VM check that spotlight comment once a minute or something to ensure that the correct value is there.
    If it ends up not working well in practice, I'm going to give your suggestion about a config script a shot.  It would require a little more up front work, but seems as if it would be pretty solid after that. 
    Thanks again for helping me think it through

  • How does DIADEM import TDMS files? How gets every channel his number and groupindex? How can I determine which channel has which groupindex and number?

    I store different channels in a TDMS file.
    I like to have a time channel at the first position with group index 1 and number 1.
    When I read the TDMS file with DIADEM the time channel (Float64) is on a differernt position, and the channels are not sorted alphabetically.
    Here are my questions:
    How does DIADEM import TDMS files?
    How gets every channel his number and groupindex?
    How can I determine which channel has which groupindex and number?
    Best regards
    Joerg

    Hi Jörg,
    i suppose that you´re programme whose create the *.tdms file is writing on false position. Try to create datas with timechannel on first indes in diadem, then save it and then open it again. you see that all is correct. So please tell me what programm in what version do you use and please attache it here.
    Did you use the library for creating *.tdms files like in the link ?
    http://zone.ni.com/devzone/cda/tut/p/id/6471
    Here you find the gtdms_8.x.zip - when you extract it and opened the *.llb you find vi´s for all functions e.g. writing 2d array of strings to *.tdms file
    when you open the subvi´s then you see how created and writing datas/structure to *.tdms files. Because *.tdms is binary you can´t see structure with open it in editor.
    When you don´t have Labview you can use the 30 days test of current version 8.5 under following link
    german version download link
    https://lumen.ni.com/nicif/d/lveval/content.xhtml
    english version download link
    https://lumen.ni.com/nicif/us/lveval/content.xhtml
    Hope it helps
    Best Regards

  • How can I determine which machines have activated Adobe Acrobat Standard 9?

    How can I determine which machines have activated Adobe Acrobat Standard 9?

    Hi jrector3,
    You need to go to the respective machines and launch Acrobat and check if it prompts for serial number.
    You can also go to the help menu and check if 'Deactivate' option is highlighted.
    Regards,
    Rave

  • How can I determine which generation my iPod is?

    How can I determine which generation my IPod touch is? I have a new sound system that is only compatible with 5th gen. When I went out to add this device to the support community's list of my devices, it only gave me ipos 5 to add. Can I rely on this?

    Identifying iPod models
    The 5G is the first iPod to have the taller screen and the small Ligntning dock connector vice the large 30 pin connector

  • How can I determine which profile Firefox 5 is currently using?

    How can I determine which profile Firefox 5 is currently using?

    in address bar type:
    '''''about:cache'''''
    and look at '''''Offline cache device -> Cache Directory'''''

  • How can I determine which generation my Apple TV device is ?

    How can I determine which generation my Apple TV device is?

    Models
    1st generation
    2nd generation
    3rd generation
    3rd generation Rev A
    Release date(s)
    January 9, 2007
    September 1, 2010
    March 7, 2012
    January 28, 2013
    Discontinued
    September 1, 2010
    March 7, 2012
    March 10, 2013[69]
    In production
    Model Number - Model ID - Order Number
    A1218 - AppleTV1,1 - MA711LL/A
    A1378 - AppleTV2,1 - MC572LL/A
    A1427 - AppleTV3,1 - MD199LL/A
    A1469 - AppleTV3,2 - MD199LL/A

  • HT201250 How can I determine which Time Machine backups can be deleted to free space on my backup device?

    Time Machine keeps hourly backups for the past 24 hours, daily backups for the past month, and weekly backups.
    But are they all incremental or full backups?
    How can I determine which can be deleted to free space on my backup device?
    Thanks.

    Thanks.
    So, if TimeMachine only makes one full backup the first time a backup is taken, and then automatically removes backups as space is needed, is there a danger that there can come a point where no single restore point exists?
    I find Apple's lack of detail around this topic disappointing. It's such an important thing.
    I guess TimeMachine doesn't work quite how I want it too. Seems to be true of so many Apple products!

  • How can I determine which Layout Designer documents go with a business part

    How can I determine which Layout Designer documents go with a business parter?  I need to be able to query the database and make sure the right business partners are assigned to the right Layout Designer documents without going into the Layout Designer.
    TJA

    Hi,
    You may check this thread:
    Print Layouts related to Business Partners
    Thanks,
    Gordon

  • How  can i determin which tab has been clicked??

    hi there
    how do i determine which one of the tabs in a tabbedPane has been clicked? do i add ActionListener to the tabbedPane or its sub JPanel?

    I import them all, it finallly compiled, but I am not sure if they are ok. here is the codes
    import javax.swing.event.ChangeEvent;
    import javax.swing.event.ChangeListener;
    TabbedPane = new JTabbedPane();
    TabbedPane.addTab("Easy", easyTab);
    TabbedPane.addChangeListener(new ChangeListener()
    public void stateChanged( ChangeEvent ce )
    Object source = ce.getSource();
    if (source == "Easy")
    currentTab = "easy";
    does it look all right to you?

  • How can I determine which browser is used(Microsoft IE or Netscape)

    As you probely know: Netscape doesn't support the same functionality as IE.
    To gain the maxium functionality from IE without solving problems in Netscape, the customer has decided to work with two different stylesheets(one for IE and one for Netscape).
    Now my question is, how can I determine in Portal in which browser(IE or Netscape) it is running.
    Thanks
    arny
    Therefor we are using two differen

    The browser ID string is a HTTP request parameter. How you get to it depends entirely on what you're programming in. You want to get the value of the User-Agent parameter (for example, in CGI, this is HTTP_USER_AGENT).
    However, I'd advise against doing things this way unless you really understand how HTTP works on many levels. One common problem people run into on sending different content based on the browser is that proxy servers will happily cache everything and send content intended for one browser to another.
    I have not seen any IE functionality that Netscape does not also have that is worth this hassle, but that's just my very stubborn opinion. :-)

  • How can I determine which jobs are running on NT?

    Hello,
    How do I determine which processes are in execution on an NT box from a JAVA
    application? I figure it must involve runtime exec'ing some run32dll
    program, but which one?
    TIA

    Search microsoft.com, or MSDN. That isn't anything to do with Java Programming.

Maybe you are looking for

  • IMessage works on MacBook Pro and iPhone but not iMac

    I am able to send messages via SMS and iMessage on my MacBook Pro and iPhone 5S but not on my iMac.  On the iMac I get "Not Delivered" and "Try Again". I verified that the same iCloud account is being used on all.  I can tell that the iMac and the ph

  • Xorg problems.

    I have some problems with my xorg file, and X will not start.  I am running an Ati x1400 using the new catalyst drivers, here is a copy of the xorg log and my xorg.conf.  Any help would be greatly appreciated. Xorg log: X.Org X Server 1.4.2 Release D

  • Change Print Job Name

    I have a VB.NET Windows program that load a Report file with rpt.Load(ReporFile) and after send to printer with rpt.PrintToPrinter(NumberofCopy, False, 0, 0).  I want to change the print job title. I see another  post: How to set  the CR print job na

  • Help - PDF Fillable Form stopped working

    I have a couple of PDF fillable forms (from the IRS and the Commonwealth of Massachusetts) that I have added information to and saved before, but now they won't let me save any changes I make. For the Mass form, I've tried downloading a new one and u

  • DSL Connection Very slow ONLY when using wireless router

    My DSL connection was running super slow (approx 136 Kbs) - I disconnected the Linksys wireless router and plugged by DSL modem directly into the computer.  Then my internet speed increased to 1.4 Mbs (a 10 fold increase). Any suggestions on how / wh