Hi,

I pasted into a Flash file (AS2) and checked the syntax - did not publish as I don't have the MovieClips, etc..
   Glen

Karl DeSaulniers wrote:
Really!?
Hmm thats weird. I wonder why its throwing an error on my end.
I take it you pub with AS2? or did you pub with AS3 as the script lang?

Karl


On May 21, 2009, at 4:26 AM, Paul Steven wrote:

Your code works fine for me this end.

Paul

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Karl
DeSaulniers
Sent: 21 May 2009 06:15
To: Flash Coders List
Subject: [Flashcoders] Operator Help!!

EEEk.. anyone!!!

What am I doing wrong?? This is AS2.

var sunrise:Array = new Array("6", "7", "8", "9", "10", "11", "12",
"13", "14", "15", "16", "17");
var sunset:Array = new Array("18", "19", "20", "21", "22", "23", "0",
"1", "2", "3", "4", "5");

var time:Date = new Date();
var hour:Number = time.getHours();
var hours:String = hour.toString();
var snRSE:String = sunrise[hours];
var snSET:String = sunset[hours];

this.onEnterFrame = function() {
         if (hours == snRSE) {
        BKGND.BKGND_Grad._alpha -= BKGND.BKGND_Grad._alpha +
8.33333333333;
         } else if (hours == snSET) {
        BKGND.BKGND_Grad._alpha += BKGND.BKGND_Grad._alpha +
8.33333333333;
    }
};

I feel this is probably so easy, but it is eluding me for some reason.
flash says for this line:

if (hours == snRSE) {

  - "operator "=" must be followed by an Operand" ???


Karl DeSaulniers
Design Drumm
http://designdrumm.com

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Karl DeSaulniers
Design Drumm
http://designdrumm.com

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to