Scroller.setStyle(“upSkin”, MovieClip) ;
]]>Best Regards,
Kaloayn.
I think your problem is defining the scope – you should define ‘start’ & ‘end’ like this:
var startNum:Number = 0;
var endNum:Number = 10;
var rp:RandomPlus = new RandomPlus(endNum, startNum);
Now you can start getting random numbers between 0 to 10 like this:
rp.getNum();
Hope this solves your problem, good luck with your project!
A.
first of all great script seriusly this will help alot in a learning game i am making. no wories i have already put you on the special thanks list. and the game is free for use when it’s done sort of a litle project. so big big thanks.
second i ran into a smal problem
when i use the code in a function that should pik a number and place stones on the game board.
var rp:RandomPlus = new RandomPlus(end:Number, start:Number = 0);
the debug sas tath this line of code gives the following error.
Scene 1, Layer ‘functions’, Frame 1, Line 120 1084: Syntax error: expecting rightparen before colon.
i made a clas file in the same folder and pasted the whole class RandomPlus in it and saved it as RandomPlus.class.
am i doing somthing wrong ?
will
]]>var myShade = new DropShadowFilter(myShadeDist,85,0×020202,0.5,myShadeBlur,myShadeBlur,5,5);
(I have changed the last 2 parameters from 1,1 to 5,5);
Then write lines 263 to 273 as
//////////////////////////////////////////
private function onButPress(ev:Event):void
{
_typo.textColor = 0xCCCCCC;
// apply New shade / bevel filter:
var myShadeBlur = _rd/8;
var myShadeDist = _rd/12;
var myBevelBlur = _rd / 6;
var myShade = new DropShadowFilter(myShadeDist,85,0×020202,0.5,myShadeBlur,myShadeBlur,0,0);
var myBevel = new BevelFilter(3,325,0×000000,.3,0×000000,.3,myBevelBlur,myBevelBlur,1,2,”outer”,false);
_glossBut.filters = [myShade, myBevel];
///////////////////////////////////
}
private function onButUp(ev:Event):void
{
_typo.textColor = 0×000000;
// apply original shade / bevel filter:
var myShadeBlur = _rd/8;
var myShadeDist = _rd/12;
var myBevelBlur = _rd / 6;
var myShade = new DropShadowFilter(myShadeDist,85,0×020202,0.5,myShadeBlur,myShadeBlur,5,5);
var myBevel = new BevelFilter(3,325,0×000000,.3,0×000000,.3,myBevelBlur,myBevelBlur,1,2,”outer”,false);
_glossBut.filters = [myShade, myBevel];
}
///////////////////////
Then together with the changte in text colour it creates a VERY noticeable change in appearance on the button clearly indicating which button was pressed.
I am sure there are more elegent ways to achieve the same effect but still – not bad for a Newbie !
Paul
p.s. I will leave you in peace now. Go Well!!
]]>private function onButPress(ev:Event):void
{
_typo.textColor = 0xCCCCCC;
}
private function onButUp(ev:Event):void
{
_typo.textColor = 0×000000;
}
The effect is that on clicking the button the button text changes colour while on releasing the button the text returns to its original colour. This creates a blink-like effect in the button and lets the user know it was clicked. Fairly simple – sure there are better ways to do it. Anyway GREAT !
Will try to see if I can rather remove the drop shadow to create the impression of depressing the button.
Paul
]]>I did see what I thought were a few behaviour reacting listeners in the class so will experiment with it.
Must say these buttons are REALLY cool !
Paul
]]>