HELP PLZ!! Array Button Menu that fades in/out content with Tweener or Tween Class...!!!

OK.
So I've been trying the last couple of days to make 2 different codes i had into one...
The first on is using the Tweener class and everytime that I press a button it fades out the loaded content of the previous selection, waits for it to finish and then loads the content of the button pressed. Everything works fine with this part.
The second code is the on that is using an Array to dynamicaly rollover, rollout and keep selected the buttons.
It was also changing the content of the mc that everything is loaded on but without this fancy fade in - fade out...!!
So i think its time for some code now...:
Here are 2 different approaches:
This is the code that uses the onMotionFinished of the Tween Class:
var groupinfo:Array = [ {mc:about, toload:"mcHome"},
     {mc:service, toload:"mcService"},
     {mc:contact, toload:"mcContact"}];
var activebtn:MovieClip;
var holder1:MovieClip = _root.attachMovie("mcHome", "mcMain", 10);
holder1._x = 0;
holder1._y = 110;
function doClick() {
//          \/THE PROBLEM IS FROM HERE\/
     if (this != activebtn){
          var mcTween:Tween = new Tween(mcMain, "_alpha", Strong.easeOut, 100, 0, 1, true);
          mcTween.onMotionFinished = function() {
               _root.holder1.attachMovie(this.p, "mcMain", 1);
               var mcTween2:Tween = new Tween(mcMain, "_alpha", Strong.easeOut, 0, 100, 10, true);
//          /\UNTIL HERE/\
     var prevbtn:MovieClip = activebtn;
     activebtn = this;
     this.gotoAndStop(FADEINSTOP);
     prevbtn.onRollOut();
function init() {
   for (var element in groupinfo) { 
      // btn is a pointer to one of the nav buttons
      var btn:MovieClip = groupinfo[element].mc;      
      // have each button remember which library/mc it is supposed to load
      btn.p = groupinfo[element].toload;      
      // assign functions to each event
      btn.onRollOver = doRollOver;
      btn.onRollOut = doRollOut;
      btn.onRelease = doClick;
init();
And the Example:
The onMotionTween code works ok with the tweening but doesn't change the movieclip.
This is the code that uses the caurina Tweener Class with no onMotionFinished:
var groupinfo:Array = [{mc:about, toload:"mcHome"},
                            {mc:service, toload:"mcService"},
                            {mc:contact, toload:"mcContact"}];
var activebtn:MovieClip;
var holder1:MovieClip = _root.attachMovie("mcHome", "mcMain", 10);
holder1._x = 0;
holder1._y = 110;
function doClick() {
//          \/PROBLEM FROM HERE\/
     if (this != activebtn) {
          Tweener.addTween(mcMain,{_alpha:0, time:1, transition:"easeOutQuart"});
          var holder2:MovieClip = _root.attachMovie(this.p, "mcMain2", 11);
          holder2._alpha = 0;
          holder2._x = 0;
          holder2._y = 110;
          Tweener.addTween(mcMain2,{_alpha:100, time:1, delay:1, transition:"easeOutQuart"});         
          mcMain = mcMain2;
//           /\TO HERE!!!/\
     var prevbtn:MovieClip = activebtn;
     activebtn = this;
     this.gotoAndStop(FADEINSTOP);
     prevbtn.onRollOut();
function init() {
     for (var element in groupinfo) {
          // btn is a pointer to one of the nav buttons
          var btn:MovieClip = groupinfo[element].mc;
          // have each button remember which library/mc it is supposed to load
          btn.p = groupinfo[element].toload;
          // assign functions to each event
          btn.onRollOver = doRollOver;
          btn.onRollOut = doRollOut;
          btn.onRelease = doClick;
init();
Other Example:
The Tweener code works perfectly this first time but the second time removes the conent and does just the fade in.
The code for the buton group i got it from                     here...
Please could someone help me with this thing!!
I think its a great piece of dynamic code if we can eventualy make it  work properly!!
Thanksss!!!
Shorten the code...  Left only the part that needs mod!!

clbeech, Thank you but doesnt do anything either....!!It is a  bit usefull but... !!
The problem is that the code cant give the "this.p" to the movieclip...
Here is the mess i've made with few changes from your part... and alot of treces to wich detected that the this.p is can't get in the onMotionFinished function...
its only the doClick function:
function doClick() {
     trace ("---------vars after click----------")
     trace ("activebtnStart  "+  activebtn);
     trace ("this.p  OutPre:  " + this.p);
     if (this != activebtn){
          trace ("mcMainAlphaBefore:  " + mcMain._alpha);
          trace ("mcMainBefore:  " + mcMain);
          var mcTween:Tween = new Tween(mcMain, "_alpha", Strong.easeOut, 100, 0, 1, true);
          mcTween.onMotionFinished = function() {
               holder["mcMain"].removeMovieClip();
//               trace ("mcMainStart:  " + mcMain);
//               trace ("mcMain2Start:  " + mcMain2);
//               trace ("mcMainAlphaStart:  " + mcMain._alpha);
//               trace ("mcMain2AlphaStart:  " + mcMain2._alpha);
               trace ("this:  " + this);
               trace ("this.p  Pre:  " + this.p);
               holder.attachMovie(btn.p, "mcMain", 1);
               holder.alpha = 0;
               trace ("this.p  After:  " + this.p);
//               mcMain = mcMain2;
               new Tween(mcMain, "_alpha", Strong.easeOut, 0, 100, 10, true);
//               mcMain._alpha = 100;
//               trace ("mcMainEnd:  " + mcMain);
//               trace ("mcMain2End:  " + mcMain2);
//               trace ("mcMainAlphaEnd:  " + mcMain._alpha);
//               trace ("mcMain2AlphaStart:  " + mcMain2._alpha);
     trace ("this.p  OutAfter:  " + this.p);
     var prevbtn:MovieClip = activebtn;
     activebtn = this;
     this.gotoAndStop(FADEINSTOP);
     prevbtn.onRollOut();
     trace ("this.p  "+  this.p);
     trace ("this  "+  this);
     trace ("prevbtn  "+  prevbtn);
     trace ("activebtn  "+  activebtn);    
Pfff.....
I think its best to Attach the .fla!!
Please have a look on it if you have anytime..!!
Thanks for your interest..

Similar Messages

  • Maximum number of tables that can be outer joined with one table in a query

    Hi All,
    Iam new to sql, so can you please let me know What is the maximum number of tables that can be outer joined with one table in a query?
    Thanks,
    Srini

    srinu2 wrote:
    Iam new to sql, so can you please let me know What is the maximum number of tables that can be outer joined with one table in a query?
    There is no limit to the number of tables you can outer join as long as you join them correctly.
    SQL> with a as
      2      (
      3      select 1 id, 2 b_key, 3 c_key from dual union all
      4      select 2 id, 1 b_key, 4 c_key from dual union all
      5      select 3 id, 3 b_key, 1 c_key from dual union all
      6      select 4 id, 4 b_key, 2 c_key from dual
      7      ),
      8      b as
      9      (
    10      select 1 id, 1 c_key2 from dual union all
    11      select 2 id, 5 c_key2 from dual union all
    12      select 3 id, 3 c_key2 from dual union all
    13      select 4 id, 2 c_key2 from dual
    14      ),
    15      c as
    16      (
    17      select 1 key1, 1 key2, '1-1' dta from dual union all
    18      select 1 key1, 2 key2, '1-2' dta from dual union all
    19      select 1 key1, 3 key2, '1-3' dta from dual union all
    20      select 1 key1, 4 key2, '1-4' dta from dual union all
    21      select 2 key1, 1 key2, '2-1' dta from dual union all
    22      select 2 key1, 2 key2, '2-2' dta from dual union all
    23      select 2 key1, 3 key2, '2-3' dta from dual union all
    24      select 2 key1, 4 key2, '2-4' dta from dual union all
    25      select 3 key1, 1 key2, '3-1' dta from dual union all
    26      select 3 key1, 2 key2, '3-2' dta from dual union all
    27      select 3 key1, 3 key2, '3-3' dta from dual union all
    28      select 3 key1, 4 key2, '3-4' dta from dual union all
    29      select 4 key1, 1 key2, '4-1' dta from dual union all
    30      select 4 key1, 2 key2, '4-2' dta from dual union all
    31      select 4 key1, 3 key2, '4-3' dta from dual union all
    32      select 4 key1, 4 key2, '4-4' dta from dual
    33      )
    34  select d.a_id, d.b_id, c.key1 as c_key1, c.key2 as c_key3, c.dta
    35  from
    36      c,
    37      (
    38      select
    39          a.id as a_id, b.id as b_id, a.c_key, b.c_key2
    40      from a, b
    41      where a.b_key = b.id
    42      ) d
    43  where d.c_key = c.key1 (+)
    44  and   d.c_key2 = c.key2 (+);
          A_ID       B_ID     C_KEY1     C_KEY3 DTA
             3          3          1          3 1-3
             4          4          2          2 2-2
             2          1          4          1 4-1
             1          2
    SQL>

  • How can I make a menu with button's that fade-in?

    I've built a motion menu in AE, and had added text layers/buttons that fade-in through layer>Encore>Create Button. Once I import this into Encore through dynamic link I cannot link the buttons to the motion menu.  I've added a sample.
    Basically all I want is the play feature, Scene selection ,and credits to be selectable after they finish fading in @ the :20 mark. I don't want the menu to loop either.
    I've tried to make a static menu(from last frame in AE) play after this, but, there is a one second gap or so before that static menu plays which just looks tacky. I have tried this in preview, and rendered it to a dvd with the same result.
    All the tutorials i've come across really don't answer this question either.  
    Any help would be appreciated.
    Thanks

    I believe that Jon Geddes has a TUTORIAL, that might also be useful to you.
    Sounds like you and Stanley have it worked out, but you might pick up an additional idea, or two.
    Good luck,
    Hunt

  • Actionscript 1&2: Buttons that fade music out or in.

    This is a real general question but I'll explain what I'm trying to ask for.
    I'm trying to make a button that when you press it, you continue on to the next "scene." I know how to do that now.
    I also want music to play when clicking the button but the issue remains, how will the music keep up if the user is pressing it too soon? I don't want it to end abruptly so I need a code that fades the music out (or in).
    So what code am I looking for?

    you need to create a loop (like onEnterFrame) that decreases the volume of your sound with each loop iteration.  terminate the sound when not needed.

  • How to create a flash menu that links to specific slides with in a Captivate swf

    Hi,
    I was wondering if someone could step by step explain how to
    create a menu in flash that links to specific slides with in a
    captivate swf. I understand that there is a rdcmndGotoSlide
    command. I can't seem to get it to work.
    Thanks,

    pdp_1 wrote:
    Hi!
    I would like to create a DVD menu that offers two languages. So the first page gives two options: Language 1 and Language 2. Then depending on which language you choose, you go to a menu that proposes different videos and a photo slideshow.
    Regardless on which language button you click on initially, you get the same content but in different languages.
    I've been looking at Premiere's templates, which I can certainly customize, but I really don't see how to create the double menu. Does anybody have an idea?
    Put the video with the first language on the timeline followed by the video with the second language.  Use chapter markers so you can have each video as a chapter in the menu.
    I use Premiere Pro, so I can't give more specific directions. Perhaps somebody like ATR will chime in.
    Also, I have another question: can I put videos from different projects in the same DVD with Premiere or must all of the videos that go into the DVD be in the same project?
    Thank you very much!!!
    pdp1
    They must be in the same project.

  • Help plz-internalFrames--buttons-video..any jgurus around??

    Hi to all
    My name is Dimitrios and i am developing a program which is consisted by a client program and a server program. The purpose of the application is to stream video (TV channels) to the client.The server program is used to authenticate the client (at the moment) where the client after the authentication is providing a GUI in order to choose the Chanel and watch the video.In more detail:
    Client site:
    2 classes ( frames)
    The 1st frame (login.java) prompts for username and password. The server (prog) authenticates the pass and if correct the client "moves" to the next frame (by set visible false to the 1st frame).
    The 2nd frame (client.java) is the actual GUI of the program. It is consisted by two buttons (assume we have two T.V channel options) and an internal frame which is where the video is displayed.
    In order to develop this program i have split up the tasks and try to solve each task at a time. What i mean is:
    1)Create an authentication procedure (DONE)
    2)Create the GUI of the client (DONE)
    3)Create the operation where button is pressed and video is played IN THE INTERNAL FRAME (in progress)
    4)Stream video (in progress)
    Since i don't know yet how am i going to produce the streaming what iv done is to embed a simple quicktime player in the client and open a movie file to produce video. I need to produce the video in the internal frame first.
    My question is:
    1) How am i going to produce the video in the internal frame after the button is pressed. Note that the button is not in the internal frame (obvious i think).
    2)i decided to use quicktime player API cause during my research i fpund out that is the best option.I did trie JMF but i wasnt that satisfied. Do you propose any other solution. I did try to find out if i could embed Windows Media player in my frame but i didn't find any info regarding WMP and java frames.
    I do have some knowledge about java but i wouldnt consider my self an advance programmer. THIS IS NOT A JOB CASE but a presentation from my UNI.
    Thanks in advance for reading all this.
    ps1 i am using netbeans
    ps2 in the code below i havent icluded the initcompomens() method cause my code is too big for the post
    My Code:
    CLIENT-second Frame
    import java.awt.*;*
    *import java.awt.event.*;
    import javax.swing.*;*
    *import java.io.File;*
    *import quicktime.*;
    import quicktime.app.*;*
    *import quicktime.app.players.*;
    import quicktime.app.display.*;*
    *import quicktime.io.*;
    import quicktime.std.*;*
    *import quicktime.std.movies.*;
    import quicktime.*;*
    *import javax.swing.*;
    public class client extends javax.swing.JFrame {
       static Movie movie;
        /** Creates new form client */
        public client()
           initComponents();
           setVisible(true);
          // login.setVisible(false);
       // @SuppressWarnings("unchecked")
    {METHOD INITCOMPOMENTS
    Too big to fit one the post  }                   
        private void buttonClickAnt(java.awt.event.MouseEvent evt) {                               
        try {
          QTSession.open();
          FileDialog fd = new FileDialog (this,"Select source movie",FileDialog.LOAD);
          fd.show();
          if (fd.getFile() == null)
              return;
          // get movie from file
          File f = new File (fd.getDirectory(), fd.getFile());
          OpenMovieFile omFile =
            OpenMovieFile.asRead (new QTFile (f));
          movie = Movie.fromFile (omFile);
          // get a Drawable for Movie, put in QTCanvas
          MoviePlayer player = new MoviePlayer (movie);
          QTCanvas canvas    = new QTCanvas();
          canvas.setClient (player, true);
          add (canvas);
          // windows-like close-to-quit
          addWindowListener (new WindowAdapter() {
            public void windowClosing (WindowEvent e) {
              QTSession.close();
              System.exit(0);
        } catch (Exception e) {
          e.printStackTrace();
            try {
          movie.start();
        } catch (Exception e) {
          e.printStackTrace();
        private void trip(javax.swing.event.InternalFrameEvent evt) {                     
        // Variables declaration - do not modify                    
        private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
        private javax.swing.JInternalFrame jInternalFrame1;
        private javax.swing.JMenu jMenu1;
        private javax.swing.JMenu jMenu2;
        private javax.swing.JMenuBar jMenuBar1;
        // End of variables declaration                  
    }Edited by: tripis on Feb 11, 2009 10:41 AM

    If you feel more adventurious and have Afer Effects, you might be interested in this series of screen captures
    http://vimeo.com/album/214460.
    John Rich

  • Need help Creating a translation pattern that adds dial out digits to incoming calls

    I came across an article yesterday and it showed the steps how to fix Missed Call/Received Call numbers so that you can dial them from the menu correctly (auto-add a 9, etc.)?
    I tried it this morning and came up with this translation pattern:
    voice translation-rule 6
    rule 1 /^201\(.*\)/ /8\1/
    rule 2 /\(..........\)/ /81\1/
    voice translation-profile filter_Incoming
    translate calling 6
    This translation pattern rule 1 adds the dial out character 8 and strips 201 for local calls. Rule 2 adds dial out character 8 and adds 1 for long distance.  The purpose of this translation rule is when the ephone receives the phone call the characters 8 and 1 are added so when you quickly need to redial you do not have to edit the number and add 8 for each call.
    I tested the translation-rule:
    ROUTER-2911#test voice translation-rule 6 9082121231
    Matched with rule 2
    Original number: 9082121231     Translated number: 819082121231
    Original number type: none      Translated number type: none
    Original number plan: none      Translated number plan: none
    ROUTER-2911#test voice translation-rule 6 2019121231  
    Matched with rule 1
    Original number: 2019121231     Translated number: 89121231
    Original number type: none      Translated number type: none
    Original number plan: none      Translated number plan: none
    ROUTER-2911#
    Issue is I am not sure with my inbound call leg if it can even work. We dial out through the SIP Trunk and the incoming is translated to the AutoAttendant on Cisco Unity Express.
    voice translation-rule 1
    rule 1 /2015552100/ /2003/
    voice translation-profile CUE_Voicemail/AutoAttendant
     translate called 1
    dial-peer voice 9 voip
     description **Incoming Call from SIP Trunk**
     translation-profile incoming CUE_Voicemail/AutoAttendant
     call-block translation-profile incoming BLOCKED-INCOMING
     call-block disconnect-cause incoming call-reject
     session protocol sipv2
     session target dns:nd01-04.fs.SIPPROVIDER.net
     incoming called-number .%
     voice-class codec 1  
     voice-class sip dtmf-relay force rtp-nte
     dtmf-relay rtp-nte
     no vad
    Can what I am trying to do be done with my current setup?

    Hi patldmart012,
    The dial-peer 9 that you have attached will not be affected by following config
    voice translation-rule 6
    rule 1 /^201\(.*\)/ /8\1/
    rule 2 /\(..........\)/ /81\1/
    voice translation-profile filter_Incoming
    translate calling 6
    Because you have not applied the translation profile "filter_incoming" on the dial-peer.
    Could you please provide the exact call flow?
    Along with that, If you are facing issue with calls on SIP Trunk, please collect following debugs in a logging buffer and attach the file. I will analyse it and will get back to you.
    debug voip ccapi inout
    debug ccsip message
    debug voice translation
    Debug h225 asn1 (If H323 involved)
    Debug h245 asn1 (If H323 involved)
    Debug MGCP Packets (If MGCP involved)
    Also provide the running config of the GW.
    These are verbose debugs, so please collect them in the following manner:
    Router(config)# service sequence
    Router(config)# service timestamps debug datetime msec
    Router(config)# logging buffered 30000000 7
    Router(config)# no logging con
    Router(config)# no logging mon
    Router# Clear log
    Router# term no mon
    <Enable debugs, then wait for issue to occur.>
    Router# term len 0
    <Enable session capture to txt file in terminal program.>
    Router# Undebug all
    Router# sh log
    Once i have the logs, i will analyse it and will get back to you.
    Regards,
    Mudit Mathur

  • Need help writing a MySQL query that will return only records with matching counter-parts

    Since I don't know how to explain this easily, I'm using the
    table below as an example.
    I want to create a MySQL query that will return only records
    that have matching counter-parts where 'col1' = 'ABC'.
    Notice the 'ABC / GHI' record does not have a
    counter-matching 'GHI / ABC' record. This record should not be
    returned because there is no matching counter-part. With this
    table, the 'ABC / GHI' record should be the only one returned in
    the query.
    How can I create a query that will do this?
    id | col1 | col2
    1 | ABC | DEF
    2 | DEF | ABC
    3 | ABC | GHI
    4 | DEF | GHI
    5 | GHI | DEF
    *Please let me know if you have no idea what I'm trying to
    explain.

    AngryCloud wrote:
    > Since I don't know how to explain this easily, I'm using
    the table below as an
    > example.
    >
    > I want to create a MySQL query that will return only
    records that have
    > matching counter-parts where 'col1' = 'ABC'.
    >
    > Notice the 'ABC / GHI' record does not have a
    counter-matching 'GHI / ABC'
    > record. This record should not be returned because there
    is no matching
    > counter-part. With this table, the 'ABC / GHI' record
    should be the only one
    > returned in the query.
    >
    > How can I create a query that will do this?
    >
    >
    > id | col1 | col2
    > --------------------
    > 1 | ABC | DEF
    > 2 | DEF | ABC
    > 3 | ABC | GHI
    > 4 | DEF | GHI
    > 5 | GHI | DEF
    >
    >
    > *Please let me know if you have no idea what I'm trying
    to explain.
    >
    Please be more clear. You say that 'ABC / GHI' should not be
    returned,
    and then you say that 'ABC / GHI' should be the only one
    returned. Can't
    have both...

  • Is there a button combination that will wipe out all phone data

    I'll be turning in my iPhone 4  to Verizon to obtain the $200 credit against an iPhone 6. What is the recommended way to wipe out all my personal data that is currently on the phone?
    Mark

    Go to settings>general> reset > erase all content and settings.
    there is also an article from apple:
    What to do before selling or giving away your iPhone, iPad, or iPod touch

  • HELP! "array required, but object found" :S

    Halo I'm new to Java and on one of my exercises I'm getting the following compile error and don't know why :S
    "array required but Deck found"
    Here is the code:
    //Card.java this defines the Card class and object
    public class Card {
    private final int rank;
    private final int suit;
    // Kinds of suits
    public final static int DIAMONDS = 1;
    public final static int CLUBS = 2;
    public final static int HEARTS = 3;
    public final static int SPADES = 4;
    // Kinds of ranks
    public final static int ACE = 1;
    public final static int DEUCE = 2;
    public final static int THREE = 3;
    public final static int FOUR = 4;
    public final static int FIVE = 5;
    public final static int SIX = 6;
    public final static int SEVEN = 7;
    public final static int EIGHT = 8;
    public final static int NINE = 9;
    public final static int TEN = 10;
    public final static int JACK = 11;
    public final static int QUEEN = 12;
    public final static int KING = 13;
    public Card(int rank, int suit) {
    assert isValidRank(rank);
    assert isValidSuit(suit);
    this.rank = rank;
    this.suit = suit;
    public int getSuit() {
    return suit;
    public int getRank() {
    return rank;
    public static boolean isValidRank(int rank) {
    return ACE <= rank && rank <= KING;
    public static boolean isValidSuit(int suit) {
    return DIAMONDS <= suit && suit <= SPADES;
    public static String rankToString(int rank) {
    switch (rank) {
    case ACE:
    return "Ace";
    case DEUCE:
    return "Deuce";
    case THREE:
    return "Three";
    case FOUR:
    return "Four";
    case FIVE:
    return "Five";
    case SIX:
    return "Six";
    case SEVEN:
    return "Seven";
    case EIGHT:
    return "Eight";
    case NINE:
    return "Nine";
    case TEN:
    return "Ten";
    case JACK:
    return "Jack";
    case QUEEN:
    return "Queen";
    case KING:
    return "King";
    default:
    return null;
    public static String suitToString(int suit) {
    switch (suit) {
    case DIAMONDS:
    return "Diamonds";
    case CLUBS:
    return "Clubs";
    case HEARTS:
    return "Hearts";
    case SPADES:
    return "Spades";
    default:
    return null;
    // Deck.java creates a deck of cards:P
    import java.util.*;
    public class Deck {
    public static int numSuits = 4;
    public static int numRanks = 13;
    public static int numCards = numSuits * numRanks;
    public Card[][] cards;
    public Deck() {
    cards = new Card[numSuits][numRanks];
    for (int suit = Card.DIAMONDS; suit <= Card.SPADES; suit++) {
    for (int rank = Card.ACE; rank <= Card.KING; rank++) {
    cards[suit-1][rank-1] = new Card(rank, suit);
    public Card getCard(int suit, int rank) {
    return cards[suit-1][rank-1];
    //AND finally, DisplayDeck.java that creates a deck of cards and display the cards of a deck:P
    import java.util.*;
    public class DisplayDeck {
    public static void main(String[] args) {
    Deck bobbysDeck = new Deck();
    for (int suit = Card.DIAMONDS; suit <= Card.SPADES; suit++) {
    for (int rank = Card.ACE; rank <= Card.KING; rank++) {
    System.out.format("%s of %s%n",
    Card.rankToString(bobbysDeck[suit-1][rank-1].getrank()), //<---here is where I get the error
    Card.suitToString(bobbysDeck[suit-1][rank-1].getsuit())); // <----and here too
    bobbysDeck is an array, so why is it giving me this compile error? Thank you very much for your help.

    For the benefit of others, here is Deck displayed with code tags:
    public class Deck
      public static int numSuits = 4;
      public static int numRanks = 13;
      public static int numCards = numSuits * numRanks;
      public Card[][] cards;
      public Deck()
        cards = new Card[numSuits][numRanks];
        for (int suit = Card.DIAMONDS; suit <= Card.SPADES; suit++)
          for (int rank = Card.ACE; rank <= Card.KING; rank++)
            cards[suit - 1][rank - 1] = new Card(rank, suit);
      public Card getCard(int suit, int rank)
        return cards[suit - 1][rank - 1];
    }You'll see that Deck holds an array of Card objects in its cards field. You could if you desired directly access that field and use that as an array like so:
      public static void main(String[] args)
        Deck bobbysDeck = new Deck();
        for (int suit = Card.DIAMONDS; suit <= Card.SPADES; suit++)
          for (int rank = Card.ACE; rank <= Card.KING; rank++)
            Card card = bobbysDeck.cards[suit - 1][rank - 1];
            System.out.format("%s of %s%n",
                Card.rankToString(card.getRank()),
                Card.suitToString(card.getSuit()));
      }but this allows outside classes to mess around with the innards of the Deck class in ways that we cannot control and can cause nasty bugs to appear that are very hard to identify and remove. Some class could for instance delete all the Card objects in cards. Much better and much safer is to make Deck's card variable a private variable and to only get the information through public methods, methods that allow the Deck class to control access. Notice that with this method, we can only get the card information; we can't delte or change it. So better is this:
      public static void main(String[] args)
        Deck bobbysDeck = new Deck();
        for (int suit = Card.DIAMONDS; suit <= Card.SPADES; suit++)
          for (int rank = Card.ACE; rank <= Card.KING; rank++)
            Card card = bobbysDeck.getCard(suit, rank);
            System.out.format("%s of %s%n",
                Card.rankToString(card.getRank()),
                Card.suitToString(card.getSuit()));
      }

  • Menu pop in, pop out

    Hi there.
    I'm trying to make a menu that pop's out when a button is
    pressed.
    I have 3 buttons, home, services, and portfolio.
    I want an extra menu to pop out only when the services button
    is pressed, then to pop in when the home or portfolio button is
    pressed.
    Can anyone advise on how this would be done.
    Here's my code:
    stop();
    //-----------Initialization---------\\
    var currentPage;
    _root.currMovie = "home";
    container.loadMovie(_root.currMovie+".swf");
    _root.menubar.btn_home.onRelease = function () {
    if (_root.currMovie == undefined) {
    _root.currMovie = "home";
    container.loadMovie("home.swf");
    } else if (_root.currMovie != "home") {
    if (container._currentframe >= container.midframe) {
    _root.currMovie = "home";
    container.play();
    servicestab.play("out");*******************************************************
    _root.menubar.btn_services.onRelease = function () {
    if (_root.currMovie == undefined) {
    _root.currMovie = "subwebsite";
    container.loadMovie("subwebsite.swf");
    } else if (_root.currMovie != "subwebsite") {
    if (container._currentframe >= container.midframe) {
    _root.currMovie = "subwebsite";
    container.play();
    servicestab.play("in");*******************************************************
    _root.menubar.btn_contact.onRelease = function () {
    if (_root.currMovie == undefined) {
    _root.currMovie = "contact";
    container.loadMovie("contact.swf");
    } else if (_root.currMovie != "contact") {
    if (container._currentframe >= container.midframe) {
    _root.currMovie = "contact";
    container.play();
    servicestab.play("out");
    I've marked my poor attemped with ********** :)
    Many thanks in advance :)
    Stuart.

    OAButtonBean submit = (OAButtonBean)webBean.findChildRecursive("Submit");
    Hi,
    String popupRegion = "/oracle/apps/test/webui/TestReadonlyRN";
    StringBuffer staticURL = new StringBuffer(100);
    staticURL.append(APPS_HTML_DIRECTORY).append("cabo/jsps/frameRedirect.jsp?redirect=")
    .append(APPS_HTML_DIRECTORY).append(pageContext.getApplicationJSP())
    .append("&akRegionCode=").append(popupRegion).append("&akRegionApplicationId=0")
    .append("&baseAppMod=").append(pageContext.getRootApplicationModule().getDefFullName())
    .append("&amUsageMode=AM_USAGE_MODE_LONGTIP").append("&baseRegionCode=").append( pageContext.getRootRegionCode())
    .append("&baseRegionApplId=")
    .append(pageContext.getRootRegionApplicationId());
    OAUrl staticURLStr = new OAUrl(staticURL.toString(), ADD_BREAD_CRUMB_SAVE);
    String popupUrl = staticURLStr.createURL(pageContext);
    popupUrl = "openWindow(self, '" + popupUrl + "' , 'MyPopup', "
    + "{width:550, height:350, resizable:'yes'}, true); ";
    submit.setOnClick(null);
    submit.setOnClick(popupUrl);
    Try this.

  • Make images fade in & out?

    Hi, we're redeveloping our application in swing (java 1.4.2).
    When the application is not in use it displays several images on the screen. We want these to smoothly fade in and out (not necessarily synchronised with each other) so as to be more visually appealing.
    Any recommendations on a good technique?
    We don't want to use animated gifs due to the 256-colour limit - is there a way to do this that isn't CPU-intensive? Something we can use with PNGs, for example?
    TIA
    Phil

    well perhaps you can override the paint method, which will change the opacity of the image...and maybe use some type of thread or timer to animate that fade in/out affect. Set change the opacity used by the Graphics2D object in a paint method do the following:
         * Set alpha composite.  For example, pass in 1.0f to have 100% opacity
         *  pass in 0.25f to have 25% opacity.
        private AlphaComposite makeComposite(float alpha) {
            int type = AlphaComposite.SRC_OVER;
            return (AlphaComposite.getInstance(type, alpha));
         public void paint(Graphics g) {
                  Graphics2D g2d = (Graphics2D) g;
                  g2d.setComposite(makeComposite(.25f));
                  // do some painting...
          }that should give you some idea.
    good luck!

  • How do i unfreeze my ipod when ive already tried the menu and select button and that didnt help?

    how do i unfreeze my ipod when ive already tried the menu and select button and that didnt help?

    How long did you press and hold both the Select (Center) and Menu buttons together?  Have you tried doing this procedure more than once?  Is the hold switch in the Off position?
    If nothing else, let the iPod's battery fully drain. Then charge it back up again.
    B-rock

  • In the upper part of Firefox there is normally a box to type in URL's. I have lost that box/area. Along with that I have no back of forward buttons to view the last/next internet pages. Can you help?

    I have lost the box on the top part of the Firefox page where one types in a URL. Along with that, I have no back or forward buttons. Help please
    == This happened ==
    Just once or twice
    == tonight

    Those items are on the Navigation Toolbar; see below
    <u>'''Can't see the Menu Bar'''</u> (File, Edit, View, History, Bookmarks, Tools, Help)?
    Turning the Menu Bar on and off is a new feature in version 3.6.
    ''(Linux & OSX see: [[Menu bar is missing]] )''
    <u>''Windows'' Method 1.</u> '''''Hold down''''' the key and press the following letters in this exact order: V T M
    <u>''Windows'' Method 2.</u> Press and release the key. The Menu Bar will be displayed; then choose ~~red:V~~iew > ~~red:T~~oolbars and click on ~~red:M~~enu Bar.
    The Menu Bar should now be displayed permanently, unless you turn it off again using View > Toolbars. Check mark = displayed, NO check mark = not displayed.
    See: http://support.mozilla.com/en-US/kb/Menu+bar+is+missing
    <u>'''Navigation Toolbar, Bookmarks Toolbar and other Toolbars'''</u> under View > Toolbars. Clicking on one of them will place a check mark (display) or remove the check mark (not displayed).
    <u>'''To display the Status Bar'''</u>, View, then click Status bar to place a check mark (display) or remove the check mark (not displayed).
    <u>'''Full Screen mode'''</u>
    http://kb.mozillazine.org/Netbooks#Full_screen
    Also see:
    ''' [[Back and forward or other toolbar buttons are missing]]'''
    '''[[Navigation Toolbar items]]'''
    <u>'''''Other Issues'''''</u>: ~~red:You have installed plug-ins with known security issues. You should update them immediately.~~
    <u>'''Update Java'''</u>: your ver. 1.6.0.18; current ver. 1.6.0.20 (<u>important security update 04-15-2010</u>)
    (Firefox 3.6 and above requires Java 1.6.0.10 or higher; see: http://support.mozilla.com/en-US/kb/Java-related+issues#Java_does_not_work_in_Firefox_3_6 )
    ''(Windows users: Do the manual update; very easy.)''
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    See: '''[http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates Updating Java]'''
    Do the update with Firefox closed.
    <u>'''Install/Update Adobe Reader for Firefox (aka Adobe PDF Plug-In For Firefox)'''</u>: your ver. 9.3.2; current ver. 9.3.3 (important security update release 06-29-2010; see: http://www.adobe.com/support/security/bulletins/apsb10-15.html)
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    See: http://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox#Installing_and_updating_Adobe_Reader
    ''<u>You may be able to update from the Adobe Reader installed on your system</u>'' instead of going to the Adobe site and downloading. Start > Program Files, find and click Adobe Reader to open, click Help, click Check for Updates.
    ''<u>If you go to the Adobe site to download the current Adobe Reader:</u>''
    -'''<u>use Firefox to download</u>''' and <u>'''SAVE to your hard drive'''</u> (save to Desktop for easy access)
    ~~red:-See the images at the bottom left of this post to see the steps to take on the Adobe site~~
    -exit Firefox (File > Exit)
    -check to see that Firefox is completely closed (''Ctrl+Alt+Del, choose Task Manager, click Processes tab, if "firefox.exe" is on the list, right-click "firefox.exe" and choose End process, close the Task Manager window'')
    -double-click on the Adobe Reader installer you just downloaded to install/update Adobe Reader
    *<u>'''NOTE: On Vista and Windows 7'''</u> you may need to run the plugin installer as Administrator by starting the installer via the right-click context menu if you do not get an UAC prompt to ask for permission to continue (i.e nothing seems to happen). See this: http://vistasupport.mvps.org/run_as_administrator.htm
    *'''<u>NOTE for IE:</u>''' Firefox and most other browsers use a Plugin. IE uses an ActiveX version. To install/update the IE ActiveX version, same instructions as above, except use IE to download the ActiveX installer.
    *Also see: http://kb.mozillazine.org/Adobe_Reader ~~red:'''''AND'''''~~ [[How do I edit options to add Adobe to the list of allowed sites]]

  • DON'T HAVE A HELP TAB IN MY MENU BUTTON. CANT EVEN COPY A URL IN MY ADDRESS BAR OR REFRESH IT ?

    how on earth can you help people when all you do is direct them to another page to click on something that doesn't help. this new version is awful . i cannot even put a url address in my address bar, nor can i refresh the address bar as it won't highlight at all. i keep going to all sorts of help pages and they are no help at all. i have used firefox for years and never had so much trouble with anything. the worse thing is your support and not being able to talk to any about anything. as it is i have to go all over just to find maybe an answer to this.i am using a background theme that i used before the new updated version and had no problems with it. if your themes are not compatible then why have them ??? the address bar problem is not present if i get rid of the theme and use the plain boring theme that you have . all i want to know is why this issue is happening with the theme i am using. and if possible it would be nice to get an answer in my email so i don't have to click on a dozen help pages trying to find it . thank you ..
    <sub>edit by a moderator: if you want to be able to discuss the issue with someone, don't do it in a shouting format (all uppercase), as this is considered rude on the internet - therefore i have converted your text into normal characters. in addition i have removed your address from public display since you will be notified per mail once somebody replies to the thread anyway. (philipp)</sub>

    '''What is your support question?''' This? <br />CANT EVEN COPY A URL IN MY ADDRESS BAR OR REFRESH IT ?
    A number of other users have mentioned a similar problem. <br />
    Chances are that you have an add-on installed that isn't completely compatible with Firefox 29. '''You''' need to figure out the culprit and disable it until an update for that add-on is available.
    If so, '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings, disables most add-ons (extensions and themes).
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
    *In Firefox 29.0 and above, click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    *In previous Firefox versions, click on the Firefox button at the top left of the Firefox window and click on ''Help'' (or click on ''Help'' in the Menu bar, if you don't have a Firefox button) then click on ''Restart with Add-ons Disabled''.
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".<br>
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''

Maybe you are looking for

  • 2011 MacBook Pro with Parallels 6/Windows 7/Office 2010 Best Bets

    I will be purchasing the new 13" 2011 MacBook Pro and plan to install Parallels 6, Windows 7 and Office 2010. My research so far suggests: - I should up to 8GB of memory and the 128GB solid state hard drive - Windows 7 Home Premium is the correct opt

  • Maintain Sequence During Bulk Import

    I'm doing 'Mass Import' in transaction SOLMAN_WORKCENTER->START_IMPORT for a CTS project. But, I noticed that it triggers all the transports at once and import depends on the size of objects in the transport and not sequence. For example, if I've the

  • Upgrading from 10.3.9 to Tiger 10.4.6

    I would like to find out if there are any major issues in upgrading to the Tiger OS? What I'm concerned about is how the new OS will effect the functionality of my pre-intel software, as well as my pre-intel G5.

  • PSE 8 Elements - Not ACR 5.7

    I just installed Lightroom 2.7 and it says it is up to ACR 5.7. I also just bought and installed PSE 8 and it says that ACR is 5.5. Why isn't PSE 8 shipped with 5.7 and do I have to personally download it?

  • ACTUAL_FINISH_DATE NETWORK ACTIVITY UPDATING

    Hello, Is there a solution to modify the "Actual_finish_date" for a network activity through a bapi function ? This component seems to be called only in "read" bapis like BAPI_NETWORK_GETINFO. Thank you for your help Bests regards