anyone looked at civ world yet im sure there is room for a bit of playing around like the research mazes etc.
Quote:
package
{
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class HarvestButton extends MovieClip
{
public var st_Button:MovieClip;
public var st_CivBuck:MovieClip;
public var st_ButtonText:MovieClip;
private var wordFormat:TextFormat;
private var numberFormat:TextFormat;
private var textX:int;
private var textY:int;
private var prev_numHarvests:int;
public function HarvestButton()
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//d0
_as3_getlocal <0>
//5d 0d
_as3_findpropstrict flash.text::TextFormat
//4a 0d 00
_as3_constructprop flash.text::TextFormat(param count:0)
//68 0c
_as3_initproperty wordFormat
//d0
_as3_getlocal <0>
//5d 0d
_as3_findpropstrict flash.text::TextFormat
//4a 0d 00
_as3_constructprop flash.text::TextFormat(param count:0)
//68 0e
_as3_initproperty numberFormat
//d0
_as3_getlocal <0>
//49 00
_as3_constructsuper (param count:0)
//5d 1d
_as3_findpropstrict addFrameScript
//24 00
_as3_pushbyte 0
//d0
_as3_getlocal <0>
//66 1c
_as3_getproperty frame1
//4f 1d 02
_as3_callpropvoid addFrameScript(param count:2)
//d0
_as3_getlocal <0>
//24 ff
_as3_pushbyte -1
//68 11
_as3_initproperty prev_numHarvests
//d0
_as3_getlocal <0>
//66 09
_as3_getproperty st_Button
//26
_as3_pushtrue
//61 1e
_as3_setproperty buttonMode
//d0
_as3_getlocal <0>
//66 09
_as3_getproperty st_Button
//60 07
_as3_getlex flash.events::MouseEvent
//66 1f
_as3_getproperty ROLL_OVER
//d0
_as3_getlocal <0>
//66 18
_as3_getproperty OnMouseOver
//4f 20 02
_as3_callpropvoid addEventListener(param count:2)
//d0
_as3_getlocal <0>
//66 09
_as3_getproperty st_Button
//60 07
_as3_getlex flash.events::MouseEvent
//66 21
_as3_getproperty MOUSE_OUT
//d0
_as3_getlocal <0>
//66 19
_as3_getproperty OnMouseOut
//4f 20 02
_as3_callpropvoid addEventListener(param count:2)
//d0
_as3_getlocal <0>
//66 09
_as3_getproperty st_Button
//60 07
_as3_getlex flash.events::MouseEvent
//66 22
_as3_getproperty MOUSE_DOWN
//d0
_as3_getlocal <0>
//66 1a
_as3_getproperty OnMouseDown
//4f 20 02
_as3_callpropvoid addEventListener(param count:2)
//d0
_as3_getlocal <0>
//66 09
_as3_getproperty st_Button
//60 07
_as3_getlex flash.events::MouseEvent
//66 23
_as3_getproperty MOUSE_UP
//d0
_as3_getlocal <0>
//66 1b
_as3_getproperty OnMouseUp
//4f 20 02
_as3_callpropvoid addEventListener(param count:2)
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//27
_as3_pushfalse
//61 24
_as3_setproperty mouseEnabled
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//27
_as3_pushfalse
//61 25
_as3_setproperty mouseChildren
//d0
_as3_getlocal <0>
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 26
_as3_getproperty x
//68 0f
_as3_initproperty textX
//d0
_as3_getlocal <0>
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 27
_as3_getproperty y
//68 10
_as3_initproperty textY
//d0
_as3_getlocal <0>
//66 0c
_as3_getproperty wordFormat
//2c 2c
_as3_pushstring "_Adrianna"
//61 28
_as3_setproperty font
//d0
_as3_getlocal <0>
//66 0c
_as3_getproperty wordFormat
//24 13
_as3_pushbyte 19
//61 29
_as3_setproperty size
//d0
_as3_getlocal <0>
//66 0c
_as3_getproperty wordFormat
//24 fc
_as3_pushbyte -4
//61 2a
_as3_setproperty leading
//d0
_as3_getlocal <0>
//66 0e
_as3_getproperty numberFormat
//2c 30
_as3_pushstring "_Mingler"
//61 28
_as3_setproperty font
//d0
_as3_getlocal <0>
//66 0e
_as3_getproperty numberFormat
//24 1b
_as3_pushbyte 27
//61 29
_as3_setproperty size
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2b
_as3_getproperty st_HarvestsNum
//27
_as3_pushfalse
//61 2c
_as3_setproperty visible
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2d
_as3_getproperty st_UseHarvestText
//27
_as3_pushfalse
//61 2c
_as3_setproperty visible
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2e
_as3_getproperty st_BuyHarvestText
//27
_as3_pushfalse
//61 2c
_as3_setproperty visible
//d0
_as3_getlocal <0>
//66 0a
_as3_getproperty st_CivBuck
//27
_as3_pushfalse
//61 2f
_as3_setproperty visible
//47
_as3_returnvoid
}// end function
private function OnEveryFrame(event:Event) : void
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//d0
_as3_getlocal <0>
//25 ea 01
_as3_pushshort 234
//4f 13 01
_as3_callpropvoid SetNumHarvests(param count:1)
//d0
_as3_getlocal <0>
//2c 3d
_as3_pushstring "Harvests"
//4f 14 01
_as3_callpropvoid SetUseHarvestText(param count:1)
//d0
_as3_getlocal <0>
//2c 3e
_as3_pushstring "Buy ??
Harvests"
//4f 15 01
_as3_callpropvoid SetBuyHarvestText(param count:1)
//d0
_as3_getlocal <0>
//27
_as3_pushfalse
//4f 16 01
_as3_callpropvoid DisableButton(param count:1)
//47
_as3_returnvoid
}// end function
public function SetNumHarvests(param1:int) : void
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//d0
_as3_getlocal <0>
//66 11
_as3_getproperty prev_numHarvests
//d1
_as3_getlocal <1>
//14 01 00 00
_as3_ifne offset: 1
//47
_as3_returnvoid
//d0
_as3_getlocal <0>
//d1
_as3_getlocal <1>
//68 11
_as3_initproperty prev_numHarvests
//d1
_as3_getlocal <1>
//24 00
_as3_pushbyte 0
//0e 42 00 00
_as3_ifngt offset: 66
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2b
_as3_getproperty st_HarvestsNum
//26
_as3_pushtrue
//61 2c
_as3_setproperty visible
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2d
_as3_getproperty st_UseHarvestText
//26
_as3_pushtrue
//61 2c
_as3_setproperty visible
//d0
_as3_getlocal <0>
//66 0a
_as3_getproperty st_CivBuck
//27
_as3_pushfalse
//61 2f
_as3_setproperty visible
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2e
_as3_getproperty st_BuyHarvestText
//27
_as3_pushfalse
//61 2c
_as3_setproperty visible
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2b
_as3_getproperty st_HarvestsNum
//5d 04
_as3_findpropstrict String
//d1
_as3_getlocal <1>
//46 04 01
_as3_callproperty String(param count:1)
//61 30
_as3_setproperty text
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2b
_as3_getproperty st_HarvestsNum
//26
_as3_pushtrue
//61 31
_as3_setproperty embedFonts
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2b
_as3_getproperty st_HarvestsNum
//d0
_as3_getlocal <0>
//66 0e
_as3_getproperty numberFormat
//4f 32 01
_as3_callpropvoid setTextFormat(param count:1)
//10 1e 00 00
_as3_jump offset: 30
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2b
_as3_getproperty st_HarvestsNum
//27
_as3_pushfalse
//61 2c
_as3_setproperty visible
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2d
_as3_getproperty st_UseHarvestText
//27
_as3_pushfalse
//61 2c
_as3_setproperty visible
//d0
_as3_getlocal <0>
//66 0a
_as3_getproperty st_CivBuck
//26
_as3_pushtrue
//61 2f
_as3_setproperty visible
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2e
_as3_getproperty st_BuyHarvestText
//26
_as3_pushtrue
//61 2c
_as3_setproperty visible
//47
_as3_returnvoid
}// end function
public function SetUseHarvestText(param1:String) : void
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2d
_as3_getproperty st_UseHarvestText
//d1
_as3_getlocal <1>
//61 30
_as3_setproperty text
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2d
_as3_getproperty st_UseHarvestText
//26
_as3_pushtrue
//61 31
_as3_setproperty embedFonts
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2d
_as3_getproperty st_UseHarvestText
//d0
_as3_getlocal <0>
//66 0c
_as3_getproperty wordFormat
//4f 32 01
_as3_callpropvoid setTextFormat(param count:1)
//47
_as3_returnvoid
}// end function
public function SetBuyHarvestText(param1:String) : void
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2e
_as3_getproperty st_BuyHarvestText
//d1
_as3_getlocal <1>
//61 30
_as3_setproperty text
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2e
_as3_getproperty st_BuyHarvestText
//26
_as3_pushtrue
//61 31
_as3_setproperty embedFonts
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//66 2e
_as3_getproperty st_BuyHarvestText
//d0
_as3_getlocal <0>
//66 0c
_as3_getproperty wordFormat
//4f 32 01
_as3_callpropvoid setTextFormat(param count:1)
//47
_as3_returnvoid
}// end function
public function DisableButton(param1:Boolean) : void
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//d1
_as3_getlocal <1>
//12 17 00 00
_as3_iffalse offset: 23
//d0
_as3_getlocal <0>
//66 09
_as3_getproperty st_Button
//27
_as3_pushfalse
//61 1e
_as3_setproperty buttonMode
//d0
_as3_getlocal <0>
//66 09
_as3_getproperty st_Button
//27
_as3_pushfalse
//61 24
_as3_setproperty mouseEnabled
//d0
_as3_getlocal <0>
//d0
_as3_getlocal <0>
//66 0a
_as3_getproperty st_CivBuck
//4f 17 01
_as3_callpropvoid ConvertToGreyscale(param count:1)
//10 13 00 00
_as3_jump offset: 19
//d0
_as3_getlocal <0>
//66 09
_as3_getproperty st_Button
//26
_as3_pushtrue
//61 1e
_as3_setproperty buttonMode
//d0
_as3_getlocal <0>
//66 09
_as3_getproperty st_Button
//26
_as3_pushtrue
//61 24
_as3_setproperty mouseEnabled
//d0
_as3_getlocal <0>
//66 0a
_as3_getproperty st_CivBuck
//56 00
_as3_newarray [array size:0]
//61 33
_as3_setproperty filters
//47
_as3_returnvoid
}// end function
public function ConvertToGreyscale(param1:MovieClip) : void
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//2f 01
_as3_pushdouble 0.2
//75
_as3_convert_d
//d6
_as3_setlocal <2>
//56 00
_as3_newarray [array size:0]
//80 34
_as3_coerce Array
//d7
_as3_setlocal <3>
//d3
_as3_getlocal <3>
//d2
_as3_getlocal <2>
//d2
_as3_getlocal <2>
//d2
_as3_getlocal <2>
//24 00
_as3_pushbyte 0
//2a
_as3_dup
//56 05
_as3_newarray [array size:5]
//46 35 01
_as3_callproperty [Only registered and activated users can see links. Click Here To Register...] count:1)
//80 34
_as3_coerce Array
//d7
_as3_setlocal <3>
//d3
_as3_getlocal <3>
//d2
_as3_getlocal <2>
//d2
_as3_getlocal <2>
//d2
_as3_getlocal <2>
//24 00
_as3_pushbyte 0
//2a
_as3_dup
//56 05
_as3_newarray [array size:5]
//46 35 01
_as3_callproperty [Only registered and activated users can see links. Click Here To Register...] count:1)
//80 34
_as3_coerce Array
//d7
_as3_setlocal <3>
//d3
_as3_getlocal <3>
//d2
_as3_getlocal <2>
//d2
_as3_getlocal <2>
//d2
_as3_getlocal <2>
//24 00
_as3_pushbyte 0
//2a
_as3_dup
//56 05
_as3_newarray [array size:5]
//46 35 01
_as3_callproperty [Only registered and activated users can see links. Click Here To Register...] count:1)
//80 34
_as3_coerce Array
//d7
_as3_setlocal <3>
//d3
_as3_getlocal <3>
//24 00
_as3_pushbyte 0
//2a
_as3_dup
//2a
_as3_dup
//24 01
_as3_pushbyte 1
//24 00
_as3_pushbyte 0
//56 05
_as3_newarray [array size:5]
//46 35 01
_as3_callproperty [Only registered and activated users can see links. Click Here To Register...] count:1)
//80 34
_as3_coerce Array
//d7
_as3_setlocal <3>
//5d 36
_as3_findpropstrict flash.filters::ColorMatrixFilter
//d3
_as3_getlocal <3>
//4a 36 01
_as3_constructprop flash.filters::ColorMatrixFilter(param count:1)
//80 36
_as3_coerce flash.filters::ColorMatrixFilter
//63 04
_as3_setlocal <4>
//d1
_as3_getlocal <1>
//62 04
_as3_getlocal <4>
//56 01
_as3_newarray [array size:1]
//61 33
_as3_setproperty filters
//47
_as3_returnvoid
}// end function
private function OnMouseOver(event:MouseEvent) : void
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//5d 37
_as3_findpropstrict gotoAndStop
//2c 48
_as3_pushstring "_over"
//4f 37 01
_as3_callpropvoid gotoAndStop(param count:1)
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//d0
_as3_getlocal <0>
//66 0f
_as3_getproperty textX
//61 26
_as3_setproperty x
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//d0
_as3_getlocal <0>
//66 10
_as3_getproperty textY
//61 27
_as3_setproperty y
//d0
_as3_getlocal <0>
//66 0a
_as3_getproperty st_CivBuck
//d0
_as3_getlocal <0>
//66 0f
_as3_getproperty textX
//61 26
_as3_setproperty x
//d0
_as3_getlocal <0>
//66 0a
_as3_getproperty st_CivBuck
//d0
_as3_getlocal <0>
//66 10
_as3_getproperty textY
//24 03
_as3_pushbyte 3
//a0
_as3_add
//61 27
_as3_setproperty y
//47
_as3_returnvoid
}// end function
private function OnMouseOut(event:MouseEvent) : void
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//5d 37
_as3_findpropstrict gotoAndStop
//2c 49
_as3_pushstring "_normal"
//4f 37 01
_as3_callpropvoid gotoAndStop(param count:1)
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//d0
_as3_getlocal <0>
//66 0f
_as3_getproperty textX
//61 26
_as3_setproperty x
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//d0
_as3_getlocal <0>
//66 10
_as3_getproperty textY
//61 27
_as3_setproperty y
//d0
_as3_getlocal <0>
//66 0a
_as3_getproperty st_CivBuck
//d0
_as3_getlocal <0>
//66 0f
_as3_getproperty textX
//61 26
_as3_setproperty x
//d0
_as3_getlocal <0>
//66 0a
_as3_getproperty st_CivBuck
//d0
_as3_getlocal <0>
//66 10
_as3_getproperty textY
//24 03
_as3_pushbyte 3
//a0
_as3_add
//61 27
_as3_setproperty y
//47
_as3_returnvoid
}// end function
private function OnMouseDown(event:MouseEvent) : void
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//5d 37
_as3_findpropstrict gotoAndStop
//2c 4a
_as3_pushstring "_down"
//4f 37 01
_as3_callpropvoid gotoAndStop(param count:1)
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//d0
_as3_getlocal <0>
//66 0f
_as3_getproperty textX
//93
_as3_decrement
//61 26
_as3_setproperty x
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//d0
_as3_getlocal <0>
//66 10
_as3_getproperty textY
//24 02
_as3_pushbyte 2
//a0
_as3_add
//61 27
_as3_setproperty y
//d0
_as3_getlocal <0>
//66 0a
_as3_getproperty st_CivBuck
//d0
_as3_getlocal <0>
//66 0f
_as3_getproperty textX
//93
_as3_decrement
//61 26
_as3_setproperty x
//d0
_as3_getlocal <0>
//66 0a
_as3_getproperty st_CivBuck
//d0
_as3_getlocal <0>
//66 10
_as3_getproperty textY
//24 05
_as3_pushbyte 5
//a0
_as3_add
//61 27
_as3_setproperty y
//47
_as3_returnvoid
}// end function
private function OnMouseUp(event:MouseEvent) : void
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//5d 37
_as3_findpropstrict gotoAndStop
//2c 48
_as3_pushstring "_over"
//4f 37 01
_as3_callpropvoid gotoAndStop(param count:1)
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//d0
_as3_getlocal <0>
//66 0f
_as3_getproperty textX
//61 26
_as3_setproperty x
//d0
_as3_getlocal <0>
//66 0b
_as3_getproperty st_ButtonText
//d0
_as3_getlocal <0>
//66 10
_as3_getproperty textY
//61 27
_as3_setproperty y
//d0
_as3_getlocal <0>
//66 0a
_as3_getproperty st_CivBuck
//d0
_as3_getlocal <0>
//66 0f
_as3_getproperty textX
//61 26
_as3_setproperty x
//d0
_as3_getlocal <0>
//66 0a
_as3_getproperty st_CivBuck
//d0
_as3_getlocal <0>
//66 10
_as3_getproperty textY
//24 03
_as3_pushbyte 3
//a0
_as3_add
//61 27
_as3_setproperty y
//47
_as3_returnvoid
}// end function
function frame1()
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//5d 38
_as3_findpropstrict stop
//4f 38 00
_as3_callpropvoid stop(param count:0)
//47
_as3_returnvoid
}// end function
}
}
but dont know how to do itQuote:
public function SetNumHarvests(param1:int) : void
{
//d0
_as3_getlocal <0>
//30
_as3_pushscope
//d0
_as3_getlocal <0>
//66 11
_as3_getproperty prev_numHarvests
//d1
_as3_getlocal <1>
//14 01 00 00
_as3_ifne offset: 1
//47
_as3_returnvoid
//d0
_as3_getlocal <0>
//d1
_as3_getlocal <1>
//68 11
_as3_initproperty prev_numHarvests
//d1
_as3_getlocal <1>
//24 00
_as3_pushbyte 0
//0e 42 00 00
_as3_ifngt offset: 66
//d0
_as3_getlocal <0> we need to change this zero to anthing so that if the number of harves becomes 0 so it will not show the buy harvest button and loop never gonna end