I have a method that returns a number which I know to be of value 1
I have a static number variable in another class (SWF_STATE) which I
also know to be 1.
In an if() statement they evaluate to equal the same, however in the
following switch statement it will not evaluate?

trace("TYPE:"+currItem.getMediaType()+" COMPARED TO:" +
VideoVO.SWF_STATE); // this traces "TYPE:1 COMPARED TO:1"

        if(currItem.getMediaType() == VideoVO.SWF_STATE)
                trace("wtf?!");//this evaluates and traces
        switch(currItem.getMediaType()) // this switch always traces the
error (default branch)
                case VideoVO.FLV_STATE:
                        this.currentPlayer = swfPlayer;
                case VideoVO.SWF_STATE:
                        this.currentPlayer = swfPlayer;
                case VideoVO.MP3_STATE:
                        this.currentPlayer = swfPlayer;
                case sometest==VideoVO.JPG_STATE:
                        this.currentPlayer = swfPlayer;
                        trace("ERROR: NO MEDIA TYPE!!!!!");
        trace(sometest); // traces 1
        trace(VideoVO.SWF_STATE); // traces 1

Any help on this very much appreciated!


This message and any attachments should only be read by those persons to whom 
it is addressed and be used by them for its intended purpose.  It must not 
otherwise be reproduced, modified, distributed, published or actioned. If you 
have received this e-mail in error, please notify us immediately by telephone 
on 01202 237000 and delete it from your computer immediately. This e-mail 
address must not be passed to any third party or be used for any other purpose. 
Every reasonable precaution has been taken to ensure that this e-mail, 
including attachments, does not contain any viruses. However, no liability can 
be accepted for any damage sustained as a result of such viruses, and 
recipients are advised to carry out their own checks. 

Moov2 Ltd cannot accept liability for statements made which are clearly the 
senders own and not made on behalf of the Moov2 Ltd. An e-mail reply to this 
address may be subject to interception or monitoring for operational reasons or 
for lawful business purposes.

Flashcoders mailing list

Reply via email to