It worked..


Guys you have no idea how much I appreciate your assistance!

Does that mean that brushing up on the basics of as3 should be in order?
geez..
add public IS important!
Thanks Everyone!!




> From: [EMAIL PROTECTED]
> Subject: Re: [Flashcoders] Error 1120?
> Date: Wed, 9 Jan 2008 23:21:55 -0500
> To: [email protected]
> 
> Try :
> 
> public class MathUtil {
> 
> - James
> 
> On Jan 9, 2008, at 10:00 PM, Dwayne Neckles wrote:
> 
> > thanks so much for help me out
> > but its not working still here is the updated code..
> >
> > ** inside fla ************
> > import com.bigspaceship.util.math.MathUtil;
> >
> > var num:Number = MathUtil.getRandom(4,100);
> > trace(num)
> > ***** Class file below
> >
> > package com.bigspaceship.util.math{
> >     class MathUtil {
> >
> >         static var min_num:Number;
> >         static var max_num:Number;
> >         static var num1:Number;
> >         static var num2:Number;
> >         public static function getRandom(min_num, max_num) {
> >             //return min_num + Math.floor(Math.random() * (max_num  
> > + 1 - min_num));
> >         }
> >
> >         public static function getRandomFloat(min_num, max_num) {
> >             //return (min_num + Math.random() * (max_num - min_num));
> >
> >         }
> >         public static function getCenterPoint(num1,num2) {
> >             //return (num1 - num2 )/ 2;
> >         }
> >     }
> > }
> >
> >
> >
> >> Date: Wed, 9 Jan 2008 18:35:18 -0800
> >> From: [EMAIL PROTECTED]
> >> To: [email protected]
> >> Subject: Re: [Flashcoders] Error 1120?
> >>
> >> You're attempting to access instance vars in a static method.  Make
> >> min_num and max_num static.
> >>
> >> Also, you don't need to put a constructor in a static class.
> >>
> >> Also, you should follow common practice and put public before static
> >> when declaring functions and variables.
> >>
> >>
> >> _______________________________________________
> >> Flashcoders mailing list
> >> [email protected]
> >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > _________________________________________________________________
> > Watch “Cause Effect,” a show about real people making a real  
> > difference.
> > http://im.live.com/Messenger/IM/MTV/? 
> > source=text_watchcause_______________________________________________
> > Flashcoders mailing list
> > [email protected]
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 
> James Booth
> [EMAIL PROTECTED]
> 
> 
> 
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_________________________________________________________________
Put your friends on the big screen with Windows Vista® + Windows Live™.
http://www.microsoft.com/windows/shop/specialoffers.mspx?ocid=TXT_TAGLM_CPC_MediaCtr_bigscreen_012008_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to