Assigning different images for textures

Hi everyone.
I was wondering if it's possible to assign different textures at the start of my program and use a random number generator to select which image gets loaded onto the object i'm creating.
I'm using the TextureLoader facility to load the textures and call it by saying
Texture tex1 = new TextureLoader( "image.jpg", applet ).getTexture();
Is it possible to do this.
I need help please.
Thanks a lot.
Sharon

String[] selImage, images = {"Image1.jpg", "Image2.jpg", "Image3.jpg"};
selImage = images[ (Math.random * 3) - 1 ];
Texture tex1 = new TextureLoader( selImage, applet ).getTexture();Does this help?

Similar Messages

  • How to assign different tones for different email ...

    Hi.
    I have a question, please.
    Because I receive too many emails for work, I'm trying to "differentiate" them, assigning different tones or alerts for different email senders.
    So I can understand when I have to read immediately an email, or it can be delayed.
    I have never found any solutions in the native application (I think there is not); has anyone any idea or third-part software solutions?
    thank you in advance.
    G

    I supposed too. THat's why I'm thinking to change for Blackberry, after many Nokia equipments. I'm not so happy to change, but I do not understand why Nokia remained so late from competitors.
    Ok for OS, but they have not focused on business terminals after E71 (my phone), and so on.
    I'm so sorry.
    G

  • How to get ACS3.2 to assign different attributes for multiples NAS's

    We are running ACS3.2 and have 3 different types of NAS for each group of users (two managed dial solutions and 1 home grown VPN concentrator solution).
    The problem is that the two dialup NAS's require different RADIUS attributes for the IP address assignment: one NAS uses a named pool, the other NAS assigns the pool based on an IP entry in attribute 8 (framed IP address). Users mapped to one ACS group must be able to use both dial services.
    Is it possible to configure ACS so that one type of attribute is used for one NAS and another type of attribute for the other for users belonging to the same group?
    Thanks,
    Matt

    Hmm, I thought you might say that:(
    I've done a bit of jiggery pokery and will be doing some testing tomorrow.
    I'll post back to this forum to let you know how it goes.
    Matt

  • HGrid : Set the different images for each row.

    Hi,
    Please provide me the solution.
    My page is having an HGrid where one column is should display the image .
    but for this there few conditions
    I would be getting the name of the image from the database and also the description.
    i need to set the image dynamically and display the approriate description as tootip
    regards
    lakshmi

    Lakshmi,
    This can be easily acieved, you can use item of style "image".As you say that your VO contains the image name and location, so you can add item of style "image", to your hgrid VO and set its url property dynamically.Read "Images in Your Pages" topic in dev guide!
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Different image for cursor while clicking

    Hi all,
    I created a new cursor using the Toolkit. I'd like the cursor to be able to change shape when clicked -- much like the "hand" icon used for dragging turns to a closed hand on many OS's.
    Is there a simple, built-in way to do this? I could add a mouse listener to my component, and then change the cursor, but it seems like this might be a pretty common functionality.

    TimQuinn wrote:
    Hi all,
    much like the "hand" icon used for dragging turns to a closed hand on many OS's.Yeah, I'd actually be surprised if this type of functionality (different cursors per component, depending on whether the mouse was clicked or not) was built into any OS. On the other hand, I have no reason to think this way, except that it's not really seen in common "native" apps on Windows or OS X (that I can think of).
    The only place I can think of off the top of my head where I see this is in Adobe Reader - is this the behavior you're thinking of? If so then I'd imagine Adobe wrote code to handle the cursor change, and it's not an OS thing. Again, feel free to correct me on this if I'm wrong.
    Note that Java does handle cursor changes for drag-and-drop (i.e. showing the "strike-through circle" when trying to drop something onto a Component that doesn't accept data in any of the available DataFlavors).

  • How to assign different passwords for different resource accounts

    Hi everyone,
    We have a situation where we have users with two resource accounts. They have different passwords with different lengths.We are using Flat file active Sync adapter to create users in both resources and there we are setting passwor.password field. But we need to set different passwords to every resource account and it is obviosly it can not be done with password.password field. We tried e password view before provisioning where we chekout the user and set the follwing parameters:
    <set name='userview.resourceAccounts.selectAll'>
    <s>false</s>
    </set>
    <set name='userview.resourceAccounts.currentResourceAccounts[RES1].selected'>
    <s>true</s>
    </set>
    <set name='userview.resourceAccounts.password'>
    <ref>accountId</ref>
    </set>
    <set name='userview.resourceAccounts.confirmPassword'>
    <ref>accountId</ref>
    </set>
    But it did not worked. So is there a way to set different passwords to different accounts in SUN IDM?
    Oh and forgot to mention we are using Sun Idm 8.1 patch 9.
    Best regards.

    I actually managed to change the required password but i copied this in Provision externeal Resources.
    <Action id='1' name='Check out password view' application='com.waveset.session.WorkflowServices'>
    <Argument name='op' value='checkoutView'/>
    <Argument name='type' value='Password'/>
    <Argument name='id' value='$(accountId)'/>
    <Argument name='authorized' value='true'/>
    <Argument name='subject' value='Configurator'/>
    <Argument name='TargetResources'>
    <List>
    <String>RES1</String>
    </List>
    </Argument>
    <Return from='view' to='userview'/>
    </Action>
    <Action id='2' name='reset password'>
    <expression>
    <block name='reset password' trace='true'>
    <set name='userview.resourceAccounts.selectAll'>
    <s>false</s>
    </set>
    <set name='userview.resourceAccounts.currentResourceAccounts[RES1].selected'>
    <s>true</s>
    </set>
    <set name='userview.resourceAccounts.password'>
    <ref>accountId</ref>
    </set>
    <set name='userview.resourceAccounts.confirmPassword'>
    <ref>accountId</ref>
    </set>
    </block>
    </expression>
    </Action>
    <Action id='3' name='check in password view' application='com.waveset.session.WorkflowServices'>
    <Argument name='op' value='checkinView'/>
    <Argument name='view' value='$(userview)'/>
    <Argument name='authorized' value='true'/>
    <Argument name='subject' value='Configurator'/>
    </Action>

  • Different images for spry menu button jpg or gif?

    Hi I have just been reading James Branstons "questions and answers", just what I was looking for many thanks to gramps.
    I am new to dreamweaver and spry and what I am wanting to achieve is a spry menu bar horizontal, I would like to have my own font "Cheri" for the about etc.  To do this would I need to save text as a gif or a jpg?  The jpg looks crisp where as the gif is not so sharp, the jpg has a black background white text, gif white text transparent background, the gif works well with hover, the jpg has the boxed background, if using a jpg do I need to create another file for hover? If so where do I place this in code?
    I did what gramps descibed in James Branstons question works well, but the sub menu boxes have disappeared.
    Hope this all makes sense, hard to explain what you want when you don't know exactly what you're doing. Many many thanks in advance.

    Hi back on the website today just tried out the mouseover and mouseout, I must be doing something wrong as it looks like goulash at the moment, sorry to be a pain and thankyou in advance, as coding is something quite new and frightening for me help is really appreciated.
    Currently code is:
        </script>
        <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a href="#">about</a></li>
          <li><a href="#">recipes</a></li>
          <li><a href="#">shopping</a></li>
          <li><a href="#">contact</a></li>
        </ul>
      </div>
      <div id="mainNavspace"></div>
    When I added the code below to the about region thats when I made goulash.........
    <li><a class="MenuBarItemSubmenu" href="#"><img name="about" src="jpgs/about.jpg" onMouseOver="about.src='jpgs/about_over.jpg'" onMouseOut="about.src='jpgs/about.jpg'" /></a>
    Thank you for patience in advance, if you could show me how the code should look I would be very grateful, kind regards.

  • How do I place an image and insert a different photo for the "mouse down" state?

    I have placed an image within an accordian widget and when I select the "mouse down" area in the states dialog box, i click "fill" in the toolbar and insert the photo i want to display when the image is clicked but this image is "covered up" by the originally placed image and is not seen in my states dialog box.
    I have done this before when i made rectangles and placed images in rectangles. But i soon realized that you cannot add alternative text to images in rectangles for some frustrating reason.
    How do I place and image and have a different image for the mouse down state?

    Hello,
    This effect can only be achieved when you use the images as a Rectangle Fill. And as you mentioned it above, you cannot add alternative text to images because it is added as a fill and not as a image.
    I would suggest you to post this as a feature request on our "Ideas for features in Adobe Muse" section of the forums : http://forums.adobe.com/community/muse/ideas
    Regards,
    Sachin

  • Simple question: How to set a different image to each side of a 3D cube?

    Hi all,
    I'm very new in the use of Java 3D and I would like to know how to set, in a 3D cube, for each side a different image.
    Currently I've the code to set an image as texture of the cube, but it applies the same image to all the sides. However, I would like to use different images for each side.
    This is my code: http://pastebin.com/sexBx57K
    Any clue?
    Thanks!

    I think I worked it out.
    I just have to set the JAXP parser
    Q. How do I use a different JAXP compatible implementation?
    The JAXP 1.1 API allows applications to plug in different JAXP compatible implementations of parsers or XSLT processors. For example, when an application wants to create a new JAXP DocumentBuilderFactory instance, it calls the staic method DocumentBuilderFactory.newInstance(). This causes a search for the name of a concrete subclass of DocumentBuilderFactory using the following order:
    1. The value of a system property like javax.xml.parsers.DocumentBuilderFactory if it exists and is accessible.
    2. The contents of the file $JAVA_HOME/jre/lib/jaxp.properties if it exists.
    3. The Jar Service Provider discovery mechanism specified in the Jar File Specification. A jar file can have a resource (i.e. an embedded file) such as META-INF/services/javax.xml.parsers.DocumentBuilderFactory containing the name of the concrete class to instantiate.
    4. The fallback platform default implementation.

  • Using custom images for radiobuttons

    Hi
    I'm looking for help with creating a radio buttons with external images (fetched from XML/Javascript file) cause, I don't want to use standard looking radio buttons from components. I wish to use different images for each state of the button.
    Any one can help me with some ideas how to change look of then radio buttons?

    To manage homegrown radiobuttons as a group, you would incorporate an event listener function that manages the group.  That function would know which radio button was selected via the event target and would act to reset all of the other radios while setting the one selected.  I don't have a specific AS3 example, but below is a rough draft of the function/scenario.  In this, I am using 3 radio buttons that have numerically differentiated instance names (rb1, rb2, rb3)...
    var selectedRadio:MovieClip;
    function manageRadios(evt:MouseEvent){
         // first reset all radios
         for(var i:uint = 1; i<4; i++){
              this["rb"+String(i)].gotoAndStop(1);  // frame displaying deselected state
         selectedRadio = MovieClip(evt.currentTarget);
         selectedRadio.gotoAndStop(2);           // frame displaying selected state
         trace(selectedRadio.name);
    rb1.addEventListener(MouseEvent.CLICK, manageRadios);
    rb2.addEventListener(MouseEvent.CLICK, manageRadios);
    rb3.addEventListener(MouseEvent.CLICK, manageRadios);
    In this case, each radio button is simply a two framed movieclip, with stops for each frame... frame 1 displays the unselected state, and frame 2 displays the selected state.
    For the code shown, I include an external variable (selectedRadio) that can be used to target information related to the selected Radio button.  So if you assigned each radio with a variable (let's say you name it varName) that would hold data to be used in the processing elsewhere, you can get it using: selectedRadio.varName

  • How to use different images in the Table of Contents?

    Hello everyone, I am creating an iBook about Architecture and I would like to have different images for each Chapter in the Table of Contents... But when I add an image it automatically appears on all the other chapters, too. What am i doing wrong?

    You drag the image to the screen and it replaces the placeholder image.
    When you hover over the current image, don't you get the message "this is a placeholder . . ." under your mouse pointer?
    I think the documentation states that the new image must be jpg or png, but a Photoshop image seems to work too.
    In portrait mode, only one image shows at the top of the list of chapters, and that can be changed too.
    But in landscape mode, all of the separate chapter images can be accessed by clicking the littel dots at the bottom of the screen when at the TOC page.

  • Different currencies for multiple line items in a AP invoice?

    Hi, Expert,
    Is it possible to assign different currencies for multiple line items in a AP invoice?
    Eg:
    One vendor is supplying raw materials from different regions, and we have to raise one invoice with different currency rate  to each items 
    regards,
    Sanju

    Hi Sanju,
    It is not possible to assign different currencies for multiple line items in a AP invoice.
    Try to book the different documents(different correncies for a single vendor in a A/P Invoice).
    Regards,
    Madhan.

  • Pre Staging + WDS + different images with unattended installation.

    Hi,
    I´ve been reading posts for 2 hours but still could not find the right solution...
    1 WDS Server and 3 different unattended images and Computer Name pre staging. That is what i need.
    I`ll be a bit more explicit. So, we have 1 WDS where have to deploy different images for different countries. That means that at least we would like to have 3 different computer names and if possible with number increasing (sorry for my "Shakespearean"
    English :) ) ... for example: USA01, USA02, GE01, GE02 and IT01, IT02, etc...
    If i configure the name on the WDS the name works fine, but obviously i would have to change that every time. If i change it in the xml file, i don´t know which variables to use to increase the computer name every time we install a new computer and finally,
    to make it funnier, i would love to have them pre staged. Is that possible ?
    So at the end i would like to have each new computer in a folder in the domain with the right increased computer name and different computer for each country where we an office have.
    Should the same variables work for WSIM as they work in WDS ?  the tipical example %03# does not work.
    Thanks in advance!
    Carles.

    Dimitri, you ROCK. I forgot about this set of directions, which work perfectly and simply for doing upgrading from Oracle XE database.
    Thanks for the help, I added you as a link on my APEX blog.
    Cheers
    Jason
    http://apexwonder.blogspot.com/

  • Using Images for each button

    I am trying to create a spry menu that has 5 buttons and each button will have 3 different images for each state (something like this http://jjcstudios.com/woof_wallet/ ) I was going to use the insert > navigation bar but I read that this method creates a lot of extra javascript and they recommended using Spry instead. Can anyone point me in a direction to create a clean method of doing java rollovers or modifying the spry menu so it will work as a rollover. thanks john

    John,
    To place the javascript in an external file, grab the code that is producedon the page
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_nbGroup(event, grpName) { //v6.0
      var i,img,nbArr,args=MM_nbGroup.arguments;
      if (event == "init" && args.length > 2) {
        if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
          img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
          if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
          nbArr[nbArr.length] = img;
          for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
            if (!img.MM_up) img.MM_up = img.src;
            img.src = img.MM_dn = args[i+1];
            nbArr[nbArr.length] = img;
      } else if (event == "over") {
        document.MM_nbOver = nbArr = new Array();
        for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
          if (!img.MM_up) img.MM_up = img.src;
          img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
          nbArr[nbArr.length] = img;
      } else if (event == "out" ) {
        for (i=0; i < document.MM_nbOver.length; i++) {
          img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
      } else if (event == "down") {
        nbArr = document[grpName];
        if (nbArr)
          for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
        document[grpName] = nbArr = new Array();
        for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
          if (!img.MM_up) img.MM_up = img.src;
          img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
          nbArr[nbArr.length] = img;
    and place it in a file called menu.js or similar.
    In your page place the following in between the <head></head> tags
    <script src="menu.js" type="text/javascript"></script>
    to link the Javascript.
    If you want to put menu.js in a different folder, make sure you adjust the link accordingly, like "js/menu.js"
    Ben

  • Multipe images for album art?

    So, you can add multiple images to iTunes for each track. Like, the album cover and an image of the liner notes, or the back cover, or, something like that.
    I don't seem to be able to see those secondary images while using my 5G iPod that I synced after adding the images.
    Is it possible to see multiple images for album art? Is my iPod even getting those secondary images?
    Thanks!

    Actually in a way you can do this, although you won't see the multiple images all at the same time. For an album you can actually have a different image for each track on that album. So for example you could have the cover for the first track, the back cover for the second track and so on. All you need do is browse info for each track and drop each image into each track separately.

Maybe you are looking for

  • Missing Connection Types in Report Data Source Properties

    I am running three installations of SharePoint 2013 with SQL 2012 for Business Intelligence, with Kerberos working. I have been having intermittent issues with SQL Reporting Services in a multi-server configuration, but finally had it working in all

  • Iweb image hyperlinks not working across pages

    I KNOW there are many other threads on this topic, but I can't figure it out! I am using images as my website navigation and they have stopped working on some pages when I updated it (and won't work no matter how many times I replace them or send the

  • Pt880 Fsr Bios 1.8

    I just purchased a PT880 FSR mobo and decided to download the lastest BIOS before installing Windows XP.  Much to my disappointment, I couldn't find the CPU voltage adjustment (all the other settings were there).  I reflashed the BIOS with 1.7 and yu

  • Creating attachments in background

    Hi, I have a PDF document stored on my C: drive. I want to attach it to a RFQ in background. RFQ is getting created by a RFC which is called from a third party(Non SAP) system.After the RFQ is created, the file in C: drive should automatically get at

  • Possible bug in Crystal 2008?

    Hi guys, I posted this in the SAP Business One forums, but I didn't get much of a response. I refer to the post: In reference to this screenshot: http://yfrog.com/j3crystal2008bugj I am having this problem at the following place in Crystal 2008 (SP2