STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229494
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2575 · P5149

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/44107189?noj=FRM44107189-15DC" width="1" height="1"></div>

baby-s-bedroom.swf

This is the info page for
Flash #118573

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
// unknown tag 1001 length 2 frame 1 { } movieClip 16 { frame 1 { function GlobalInterface(baseClip) { this.pToolkit = null; this.pBubbleUtilities = null; this.pPreloader = null; this.pGameManager = null; this.baseClip = baseClip; this.codeClip = baseClip.code; this.curTime = 0; this.offsetTime = 0; this.clockRunningB = false; this.startClock(); } function Toolkit() { this.clipInfo = {}; } function GameManager() { this.setDollDefaults(); this.setRoomDefaults(); this.rooms[0].hiddenB = false; this.rooms[1].hiddenB = false; this.rooms[2].hiddenB = false; this.idleAnimFrames = {}; this.idleAnimFrames.default = 0; this.idleAnimFrames.wave = 1; this.idleAnimFrames.akimbo = 20; this.idleAnimFrames.love = 38; this.noBtmTops = [null, true, true, true, false, false, false, false, false]; this.hideLoc = {'x': 0, 'y': -10000}; this.curMenuChoice = 1; this.curRoom = 2; this.curTints = []; this.selectedTint = 14610349; this.idleAnimInfo = {}; this.idleAnimInfo.curIdleIndex = 0; this.idleAnimInfo.frames = {}; this.idleAnimInfo.frames.tops = []; this.idleAnimInfo.frames.tops[0] = 1; this.idleAnimInfo.frames.tops[1] = 6; this.idleAnimInfo.frames.tops[2] = 1; this.idleAnimInfo.frames.tops[3] = 20; this.idleAnimInfo.frames.tops[4] = 38; this.idleAnimInfo.frames.tops[5] = 1; this.idleAnimInfo.frames.tops[6] = 1; this.idleAnimInfo.frames.tops[7] = 6; this.idleAnimInfo.frames.eyes = []; this.idleAnimInfo.frames.eyes[0] = 1; this.idleAnimInfo.frames.eyes[1] = 6; this.idleAnimInfo.frames.eyes[2] = 1; this.idleAnimInfo.frames.eyes[3] = 1; this.idleAnimInfo.frames.eyes[4] = 20; this.idleAnimInfo.frames.eyes[5] = 20; this.idleAnimInfo.frames.eyes[6] = 6; this.idleAnimInfo.frames.eyes[7] = 1; this.idleAnimInfo.frames.shoe = []; this.idleAnimInfo.frames.shoe[0] = 1; this.idleAnimInfo.frames.shoe[1] = 1; this.idleAnimInfo.frames.shoe[2] = 1; this.idleAnimInfo.frames.shoe[3] = 6; this.idleAnimInfo.frames.shoe[4] = 1; this.idleAnimInfo.frames.shoe[5] = 1; this.idleAnimInfo.frames.shoe[6] = 1; this.idleAnimInfo.frames.shoe[7] = 1; this.idleAnimInfo.frames.lips = []; this.idleAnimInfo.frames.lips[0] = 1; this.idleAnimInfo.frames.lips[1] = 1; this.idleAnimInfo.frames.lips[2] = 1; this.idleAnimInfo.frames.lips[3] = 1; this.idleAnimInfo.frames.lips[4] = 1; this.idleAnimInfo.frames.lips[5] = 1; this.idleAnimInfo.frames.lips[6] = 1; this.idleAnimInfo.frames.lips[7] = 1; this.idleAnimInfo.frames.window = []; this.idleAnimInfo.frames.window[0] = 2; this.idleAnimInfo.freqWt = []; this.idleAnimInfo.freqWt[0] = 30; this.idleAnimInfo.freqWt[1] = 10; this.idleAnimInfo.freqWt[2] = 10; this.idleAnimInfo.freqWt[3] = 10; this.idleAnimInfo.freqWt[4] = 10; this.idleAnimInfo.freqWt[5] = 10; this.idleAnimInfo.freqWt[6] = 30; this.idleAnimInfo.freqWt[7] = 10; this.idleAnimInfo.freqWt[8] = 30; this.idleAnimInfo.freqWt.total = 0; var i = this.idleAnimInfo.freqWt.length; while (i--) { this.idleAnimInfo.freqWt.total += this.idleAnimInfo.freqWt[i]; } this.idleAnimInfo.baseTimeBetween = 4000; this.idleAnimInfo.randTimeBetween = 4000; this.idleAnimInfo.nextAnimTime = null; this.idleAnimInfo.firstWindowAnim = this.idleAnimInfo.frames.tops.length; this.curmode = 'mainMenu'; this.menuAnimFrames = {}; this.menuAnimFrames.open = 2; this.menuAnimFrames.close = 9; this.radioSnd = new Sound(this.GI.getBaseClip()); this.sndSfx = new Sound((this.GI.getBaseClip()).sfx_playback); this.lastRadio = null; } GlobalInterface.prototype.getDebugClip = function () { return _root.largeAnimalDebug; }; GlobalInterface.prototype.debugModeB = function () { return typeof this.getDebugClip() == 'movieclip'; }; GlobalInterface.prototype.getToolkit = function () { if (this.pToolkit == null) { this.pToolkit = new this.codeClip.Toolkit(); this.pToolkit.GI = GI; } return this.pToolkit; }; GlobalInterface.prototype.getPreloader = function () { if (this.pPreloader == null) { this.pPreloader = ((this.getClipCollector()).getWrapper({'clip': this.baseClip.preloader})).funcList[0]; } if (typeof this.pPreloader == 'undefined') { (this.getToolkit()).error({'comment': 'preloader instance not found', 'priority': 0}); } return this.pPreloader; }; GlobalInterface.prototype.clipNotification = function (args) { var aClip = (this.getToolkit()).getProp(args, 'clip', args); var listener; if (typeof aClip.listener == 'undefined') { listener = this.defaultListener; } else { listener = aClip.listener; } listener.clipNotification({'instanceName': aClip._name, 'currentFrame': aClip._currentframe, 'clip': aClip}); }; GlobalInterface.prototype.setDefaultListener = function (args) { this.defaultListener = (this.getToolkit()).getProp(args, 'listener'); }; GlobalInterface.prototype.getDefaultListener = function (args) { return this.defaultListener; }; GlobalInterface.prototype.getGameManager = function (args) { if (this.pGameManager == null) { this.pGameManager = new this.codeClip.GameManager(); this.pGameManager.GI = this; } if (typeof this.pGameManager == 'undefined') { (this.getToolkit()).error({'comment': 'gameManager script not found', 'priority': 0}); this.pGameManager = null; } return this.pGameManager; }; GlobalInterface.prototype.getCurSubgame = function (args) { return (this.getGameManager()).getCurSubgame(); }; GlobalInterface.prototype.getMovieDims = function () { return {'x': 400, 'y': 400}; }; GlobalInterface.prototype.getBaseClip = function () { return this.baseClip; }; GlobalInterface.prototype.getCodeClip = function () { return this.codeClip; }; GlobalInterface.prototype.stopClock = function () { this.curTime = this.getGameTime(); this.clockRunningB = false; }; GlobalInterface.prototype.startClock = function () { this.offsetTime = (new Date()).getTime() - this.curTime; this.clockRunningB = true; }; GlobalInterface.prototype.getGameTime = function () { if (this.clockRunningB) { this.curTime = (new Date()).getTime() - this.offsetTime; } return this.curTime; }; this._parent.GI = new GlobalInterface(this._parent); _root.largeAnimalData = {}; _root.largeAnimalData.GI = this._parent.GI; Toolkit.prototype.getProp = function (args, prop, default) { var temp; if (typeof args != 'object') { temp = default; return temp; } temp = args[prop]; if (typeof temp == 'undefined') { temp = default; } return temp; }; Toolkit.prototype.dumpObject = function (obj) { for (prop in obj) { } }; Toolkit.prototype.error = function (args) { var str = this.getProp(args, 'comment', 'no error comment given'); var priority = this.getProp(args, 'priority', 0); if (priority == 0) { } }; Toolkit.prototype.isMember = function (args) { var list = this.getProp(args, 'list', []); var elm = this.getProp(args, 'element'); var retVal = false; var i = list.length; while (i--) { if (list[i] == elm) { retVal = true; break; } } return retVal; }; Toolkit.prototype.setcolor = function (r, g, b, aclip) { acolor = new Color(aclip); myColorTransform = new Object(); myColorTransform.ra = 0; myColorTransform.rb = r; myColorTransform.ga = 0; myColorTransform.gb = g; myColorTransform.ba = 0; myColorTransform.bb = b; myColorTransform.aa = 100; myColorTransform.ab = 0; acolor.setTransform(myColorTransform); }; Toolkit.prototype.parseNameValuePairsX = function (args) { var str; str = this.getProp(args, 'data', args); var dataObj = {}; var delim1 = this.getProp(args, 'delim1', '&'); var delim2 = this.getProp(args, 'delim2', '='); var nameValueAry = str.split(delim1); var chi; var name; var value; var i = nameValueAry.length; while (i--) { chi = nameValueAry[i].indexOf(delim2); if (0 < chi) { name = nameValueAry[i].subStr(0, chi); value = nameValueAry[i].subStr(chi + 1); dataObj[name] = value; } } return dataObj; }; Toolkit.prototype.parseNameValuePairs = function (str) { var dataObj = {}; var delim1 = '&'; var delim2 = '='; var nameValueAry = str.split(delim1); var nameValue; var i = nameValueAry.length; while (i--) { nameValue = nameValueAry[i].split(delim2); if (nameValue.length == 2) { dataObj[nameValue[0]] = nameValue[1]; } } return dataObj; }; Toolkit.prototype.getClipInfo = function (args) { var id = this.getProp(args, 'id'); var prop = this.getProp(args, 'prop'); return this.clipInfo[id][prop]; }; Toolkit.prototype.setClipInfo = function (args) { var id = this.getProp(args, 'id'); var prop = this.getProp(args, 'prop'); var val = this.getProp(args, 'value'); if (typeof this.clipInfo[id] == 'undefined') { this.clipInfo[id] = {}; } this.clipInfo[id][prop] = val; }; Toolkit.prototype.stopClip = function (args) { var theClip = this.getProp(args, 'clip'); var fr = this.getProp(args, 'frame'); var id = theClip._target; var conditionalB = this.getProp(args, 'conditionalB', false); var doActionB; if (conditionalB) { doActionB = this.getClipInfo({'id': id, 'prop': 'state'}) == 'playing'; } else { doActionB = true; } if (doActionB) { if (typeof fr == 'undefined') { theClip.stop(); } else { theClip.gotoAndStop(fr); } if (!conditionalB) { this.setClipInfo({'id': id, 'prop': 'state', 'value': 'stopped'}); } } }; Toolkit.prototype.playClip = function (args) { var theClip = this.getProp(args, 'clip'); var fr = this.getProp(args, 'frame'); var id = theClip._target; var conditionalB = this.getProp(args, 'conditionalB', false); var doActionB; if (conditionalB) { doActionB = this.getClipInfo({'id': id, 'prop': 'state'}) == 'playing'; } else { doActionB = true; } if (doActionB) { if (typeof fr == 'undefined') { theClip.play(); } else { theClip.gotoAndPlay(fr); } if (!conditionalB) { this.setClipInfo({'id': id, 'prop': 'state', 'value': 'playing'}); } } }; GameManager.prototype.setDollDefaults = function () { this.dolls = []; this.dolls[0] = {}; this.dolls[0].swapData = {}; this.dolls[0].swapData.eyes = 1; this.dolls[0].swapData.lips = 1; this.dolls[0].swapData.shoe = 1; this.dolls[0].swapData.tops = 1; this.dolls[0].swapData.btms = 4; this.dolls[0].swapData.lastTopWithBtm = 4; this.dolls[0].swapData.hair = 1; this.dolls[0].swapData.accA = 1; this.dolls[0].swapData.accB = 1; this.dolls[1] = {}; this.dolls[1].swapData = {}; this.dolls[1].swapData.eyes = 2; this.dolls[1].swapData.lips = 2; this.dolls[1].swapData.shoe = 2; this.dolls[1].swapData.tops = 4; this.dolls[1].swapData.btms = 2; this.dolls[1].swapData.lastTopWithBtm = 4; this.dolls[1].swapData.hair = 2; this.dolls[1].swapData.accA = 1; this.dolls[1].swapData.accB = 1; this.dolls[2] = {}; this.dolls[2].swapData = {}; this.dolls[2].swapData.eyes = 6; this.dolls[2].swapData.lips = 3; this.dolls[2].swapData.shoe = 3; this.dolls[2].swapData.tops = 2; this.dolls[2].swapData.btms = 3; this.dolls[2].swapData.lastTopWithBtm = 4; this.dolls[2].swapData.hair = 3; this.dolls[2].swapData.accA = 1; this.dolls[2].swapData.accB = 1; }; GameManager.prototype.setRoomDefaults = function () { this.rooms = []; this.rooms[0] = {}; this.rooms[0].swapData = {}; this.rooms[0].swapData.item1 = 1; this.rooms[0].swapData.item2 = 2; this.rooms[0].swapData.item3 = 7; this.rooms[0].swapData.item4 = 1; this.rooms[0].swapData.item5 = 1; this.rooms[0].swapData.item6 = 1; this.rooms[0].swapData.item7 = 1; this.rooms[0].swapData.tile1 = 1; this.rooms[0].swapData.tile2 = 1; this.rooms[0].swapData.tile3 = 11; this.rooms[0].swapData.tile4 = 11; this.rooms[0].swapData.tile5 = 7; this.rooms[1] = {}; this.rooms[1].swapData = {}; this.rooms[1].swapData.item1 = 8; this.rooms[1].swapData.item2 = 1; this.rooms[1].swapData.item3 = 12; this.rooms[1].swapData.item4 = 2; this.rooms[1].swapData.item5 = 6; this.rooms[1].swapData.item6 = 5; this.rooms[1].swapData.item7 = 2; this.rooms[1].swapData.tile1 = 6; this.rooms[1].swapData.tile2 = 6; this.rooms[1].swapData.tile3 = 12; this.rooms[1].swapData.tile4 = 12; this.rooms[1].swapData.tile5 = 7; this.rooms[2] = {}; this.rooms[2].swapData = {}; this.rooms[2].swapData.item1 = 3; this.rooms[2].swapData.item2 = 6; this.rooms[2].swapData.item3 = 8; this.rooms[2].swapData.item4 = 3; this.rooms[2].swapData.item5 = 5; this.rooms[2].swapData.item6 = 3; this.rooms[2].swapData.item7 = 3; this.rooms[2].swapData.tile1 = 2; this.rooms[2].swapData.tile2 = 2; this.rooms[2].swapData.tile3 = 9; this.rooms[2].swapData.tile4 = 9; this.rooms[2].swapData.tile5 = 12; }; GameManager.prototype.initRoom = function () { this.lastRadio = -1; var baseClip = this.GI.getBaseClip(); var pt; var roomClip; var i = 3; while (i--) { this.hideRoom({'hideB': i != this.curRoom, 'roomIndex': i}); } roomClip = baseClip['room' + this.curRoom]; var type; var fr; var swapData = this.rooms[this.curRoom].swapData; for (i in swapData) { type = i.substr(0, 4); fr = swapData[i]; if (type == 'item') { roomClip[i].gotoAndStop(fr); } else { if (type == 'tile') { roomClip[i].gotoAndStop(fr); } } } baseClip.headers.gotoAndStop(this.curRoom + 1); this.setMode('room'); }; GameManager.prototype.initDoll = function (dollClip) { var baseClip = this.GI.getBaseClip(); var dollIndex; if (this.curMode == 'mainMenu') { dollIndex = dollClip._name.subStr(4, 2); } else { dollIndex = (this.GI.getToolkit()).getProp(args, 'dollIndex', this.curRoom); } var prop; var fr; var swapData = this.dolls[dollIndex].swapData; for (prop in swapData) { fr = swapData[prop]; if (prop == 'btms') { if (this.noBtmTops[swapData.tops]) { fr = 1; } } this.setDollClipPart(dollClip, prop, fr); } }; GameManager.prototype.setDollClipPart = function (dollClip, prop, fr) { dollClip[prop].gotoAndStop(fr); if (prop == 'hair') { dollClip.hairback.gotoAndStop(fr); } }; GameManager.prototype.updateDollPart = function (args) { var partID = (this.GI.getToolkit()).getProp(args, 'partID', null); var partIndex = (this.GI.getToolkit()).getProp(args, 'partIndex', null); var dollClip = (this.GI.getToolkit()).getProp(args, 'dollClip', null); if (partID == null || partIndex == null || typeof dollClip != 'movieclip') { (this.GI.getToolkit()).error({'comment': 'GameManager:updateDollPart - bad input, partID:' + partID + ', partIndex:' + partIndex + ', typeof(dollClip):' + dollClip}); } else { var dollIndex = (this.GI.getToolkit()).getProp(args, 'dollIndex', this.curRoom); if (partIndex == dollClip[partID]._currentframe && (partID == 'accA' || partID == 'accB')) { partIndex = 1; } this.dolls[dollIndex].swapData[partID] = partIndex; if (partID == 'tops') { if (this.noBtmTops[partIndex]) { this.setDollClipPart(dollClip, 'btms', 1); } else { this.dolls[dollIndex].swapData.lastTopWithBtm = partIndex; this.setDollClipPart(dollClip, 'btms', this.dolls[dollIndex].swapData.btms); } } if (partID == 'eyes') { this.setDollClipPart(dollClip, 'accA', 1); this.dolls[dollIndex].swapData.accA = 1; } if (partID == 'btms') { if (this.noBtmTops[this.dolls[dollIndex].swapData.tops]) { var top = this.dolls[dollIndex].swapData.lastTopWithBtm; this.setDollClipPart(dollClip, 'tops', top); this.dolls[dollIndex].swapData.tops = top; } } this.setDollClipPart(dollClip, partID, partIndex); } }; GameManager.prototype.setSelected = function (clip, fr) { var theName = clip._name; if (theName.indexOf('selected') >= 0) { clip.gotoAndStop(fr); } }; GameManager.prototype.initMenu = function (clip) { this.setSelected(clip.selected, this.curMenuChoice); }; GameManager.prototype.setMode = function (mode) { var baseClip = this.GI.getBaseClip(); this.curmode = mode; var coverFr = 1; if (mode == 'room') { var radioNum = this.rooms[this.curRoom].swapData.item7 - 1; if (this.lastRadio == null || this.lastRadio != radioNum) { this.lastRadio = radioNum; this.radioSnd.stop(); baseClip.buttonCover.gotoAndStop(1); if (radioNum < 9) { radioNum %= 5; this.radioSnd.attachSound('radio' + radioNum); this.radioSnd.start(0, 1000); } } } else { if (mode == 'menu') { coverFr = 2; } else { if (mode == 'mainMenu') { this.radioSnd.stop(); } } } baseClip.buttonCover.gotoAndStop(coverFr); }; GameManager.prototype.buttonOver = function (clip) { var clip1; var clip2; var baseClip = this.GI.getBaseClip(); var roomClip = baseClip['room' + this.curRoom]; var str = clip._parent._name; var type1 = str.substr(0, 4); var index1 = Number(str.substr(4, 2)); var str = clip._name; var type2 = str.substr(0, 4); var index2 = Number(str.substr(4, 2)); if (type2 == 'dbtn') { this.setDollAnim({'animIndex': this.idleAnimFrames.wave, 'animClip': clip._parent['doll' + index2]}); } if (this.curmode == 'menu') { var theClip; if (type1 == 'menu') { theClip = clip._parent._parent.selected; } else { theClip = clip._parent.selected; } if (type2 == 'selm' || type2 == 'tmsl') { this.setSelected(theClip, this.curMenuChoice); } else { this.setSelected(theClip, index2); } } if (type2 == 'tile' || type2 == 'item' || type2 == 'dedt') { _root.clik1.buttonOver(clip._name); } }; GameManager.prototype.buttonOut = function (clip) { var str = clip._name; var type1 = str.substr(0, 4); var index1 = Number(str.substr(4, 2)); if (type1 == 'tile' || type1 == 'item' || type1 == 'dedt') { _root.clik1.buttonOut(clip._name); } }; GameManager.prototype.buttonClicked = function (clip) { var clip1; var clip2; var baseClip = this.GI.getBaseClip(); var roomClip = baseClip['room' + this.curRoom]; var str = clip._parent._name; var type1 = str.substr(0, 4); var index1 = Number(str.substr(4, 2)); var str = clip._name; var type2 = str.substr(0, 4); var index2 = Number(str.substr(4, 2)); _root.clik1.buttonClicked(clip._name); if (clip._name == 'buttonCover' && this.curmode == 'menu') { if (this.lastMenuType == 'tile') { theClip = baseClip['tilemenu' + this.curItemMenuIndex]; } else { theClip = baseClip['itemmenu' + this.curItemMenuIndex]; } this.playSwapSound(this.lastMenuType, this.curItemMenuIndex, index2); theClip.gotoAndPlay(this.menuAnimFrames.close); this.setMode('room'); } else { if (type2 == 'selm' || type2 == 'tmsl') { this.playSwapSound(this.lastMenuType, this.curItemMenuIndex, index2); var menustr = 'itemmenu' + this.curItemMenuIndex; if (type2 == 'tmsl') { menustr = 'tilemenu' + this.curItemMenuIndex; } clip2 = baseClip[menustr]; clip2.gotoAndPlay(this.menuAnimFrames.close); this.setMode('room'); } else { if (type1 == 'menu') { this.playSwapSound(this.lastMenuType, this.curItemMenuIndex, index2); roomClip['item' + this.curItemMenuIndex].gotoAndStop(index2); this.setSelected(clip._parent._parent.selected, index2); clip2 = baseClip['itemmenu' + this.curItemMenuIndex]; clip2.gotoAndPlay(this.menuAnimFrames.close); this.rooms[this.curRoom].swapData['item' + this.curItemMenuIndex] = index2; this.curMenuChoice = index2; this.setMode('room'); } else { if (type1 == 'tmnu') { this.playSwapSound(this.lastMenuType, this.curItemMenuIndex, index2); roomClip['tile' + this.curItemMenuIndex].gotoAndStop(index2); this.setSelected(clip._parent.selected, index2); clip2 = baseClip['tilemenu' + this.curItemMenuIndex]; clip2.gotoAndPlay(this.menuAnimFrames.close); var theTile = 'tile' + this.curItemMenuIndex; this.rooms[this.curRoom].swapData[theTile] = index2; this.curMenuChoice = index2; this.setMode('room'); } else { if (type1 == 'dmnu') { if (type2 == 'done') { this.initDoll(roomClip.doll); baseClip['dmnu' + this.curRoom].play(); this.setMode('room'); this.playSfx('switchfeature'); } else { this.playSfx('click'); this.updateDollPart({'partID': type2, 'partIndex': index2, 'dollClip': clip._parent.doll}); } } else { if (this.curmode == 'room' && type1 == 'room' && type2 == 'dedt') { this.playSfx('openfeature'); baseClip['dmnu' + this.curRoom].play(); this.curmode = 'dedt'; } else { if (this.curmode == 'room' && type2 == 'item') { this.lastMenuType = 'item'; this.setMode('menu'); this.playSfx('openfeature'); this.curMenuChoice = this.rooms[this.curRoom].swapData[type2 + index2]; clip1 = baseClip['menulocs' + this.curRoom][type2 + 'menu' + index2]; clip2 = baseClip[type2 + 'menu' + index2]; this.curItemMenuIndex = index2; clip2._x = clip1._x; clip2._y = clip1._y; clip2.gotoAndPlay(this.menuAnimFrames.open); } else { if (this.curmode == 'room' && type2 == 'tile') { this.lastMenuType = 'tile'; this.setMode('menu'); this.playSfx('openfeature'); clip1 = baseClip['menulocs' + this.curRoom][type2 + 'menu' + index2]; clip2 = baseClip[type2 + 'menu' + index2]; var theTile = 'tile' + this.curItemMenuIndex; var currsetting = this.rooms[this.curRoom].swapData[theTile]; this.curMenuChoice = this.rooms[this.curRoom].swapData[type2 + index2]; this.curItemMenuIndex = index2; clip2._x = clip1._x; clip2._y = clip1._y; clip2.gotoAndPlay(this.menuAnimFrames.open); } else { if (type2 == 'dbtn') { this.playSfx('choosedoll'); this.curRoom = index2; baseClip.play(); } else { if (type2 == 'room') { } else { if (type2 == 'over') { this.setMode('mainMenu'); baseClip.gotoAndStop('mainMenu'); } else { if (type2 == 'prnt') { this.playSfx('switchfeature'); getURL('printasbitmap:#bmax', roomClip); } else {} } } } } } } } } } } } }; GameManager.prototype.playSwapSound = function (cat, area, indx) { if (cat == 'tile') { this.playSfx('switchtile'); } else { if (area != 5) { this.playSfx('switchitem'); } else { var which = indx % 3; if (which == 0) { this.playSfx('dog'); } else { if (which == 1) { this.playSfx('rabbit'); } else { if (which == 2) { this.playSfx('cat'); } } } } } }; GameManager.prototype.playSfx = function (name) { this.sndSfx.attachSound(name); this.sndSfx.start(); }; GameManager.prototype.changeTileRec = function (clip) { var subClip; var subClipName; var instanceName; var oldClipTarg; var clipCnt = 0; var instanceName = 'tileClip'; if (clip._name != instanceName) { for (subClipName in clip) { subClip = clip[subClipName]; if (typeof subClip == 'movieclip') { this.changeTileRec(subClip); } ++clipCnt; } } if (clipCnt == 0) { if (clip._name == instanceName) { oldClipTarg = clip._target; clip = clip._parent; removeMovieClip(oldClipTarg); } clip.attachMovie(this.patternName, instanceName, 1000); } }; GameManager.prototype.changeTile = function (clip, patternName) { if (typeof clip == 'movieclip') { this.patternName = patternName; this.changeTileRec(clip); } }; GameManager.prototype.notify = function (args) { var msg = (this.GI.getToolkit()).getProp(args, 'message'); var clip = (this.GI.getToolkit()).getProp(args, 'clip'); var baseClip = this.GI.getBaseClip(); if (msg == 'dollMenuOpened') { this.hideRoom({'hideB': true}); } else { if (msg == 'dollMenuClosed') { this.hideRoom({'hideB': false}); } else { if (msg == 'initDoll') { this.initDoll(clip); } else { if (msg == 'initMenu') { this.initMenu(clip); } else { if (msg == 'initRoom') { this.initRoom(clip); } else { if (msg == 'recordTint') { var index = Number(clip._parent._parent._name.substr(4, 2)); this.curTints[index - 1] = (new Color(clip)).getRGB(); } else { if (msg == 'setTint') { (new Color(clip)).setRGB(this.selectedTint); } else { if (msg == 'clipDone') { } else { (this.GI.getToolkit()).error({'comment': 'GameManager:notify - message \'' + msg + '\' not handled'}); } } } } } } } } }; GameManager.prototype.hideRoom = function (args) { var roomIndex = (this.GI.getToolkit()).getProp(args, 'roomIndex', this.curRoom); var hideB = (this.GI.getToolkit()).getProp(args, 'hideB', true); var baseClip = this.GI.getBaseClip(); var roomClip = baseClip['room' + roomIndex]; if (typeof this.rooms[roomIndex].origLoc == 'undefined') { this.rooms[roomIndex].origLoc = {'x': roomClip._x, 'y': roomClip._y}; } if (hideB) { pt = this.hideLoc; } else { pt = this.rooms[roomIndex].origLoc; } roomClip._x = pt.x; roomClip._y = pt.y; }; GameManager.prototype.checkIdle = function (t) { if (this.idleAnimInfo.nextAnimTime == null) { this.idleAnimInfo.nextAnimTime = t + 500; } if (0 < t - this.idleAnimInfo.nextAnimTime) { var temp = this.idleAnimInfo.freqWt.total * Math.random(); var i = this.idleAnimInfo.freqWt.length; for (;;) { if (!(0 < temp && --i)) break; temp -= this.idleAnimInfo.freqWt[i]; } this.setIdleAnim({'animIndex': i}); var r = Math.random() * this.idleAnimInfo.randTimeBetween; this.idleAnimInfo.nextAnimTime = t + this.idleAnimInfo.baseTimeBetween + r; } }; GameManager.prototype.setIdleAnim = function (args) { var animIndex = (this.GI.getToolkit()).getProp(args, 'animIndex'); if (animIndex < this.idleAnimInfo.firstWindowAnim) { this.setDollAnim({'animIndex': animIndex}); } else { this.setWindowAnim({'animIndex': animIndex - this.idleAnimInfo.firstWindowAnim}); } this.idleAnimInfo.curIdleIndex = animIndex; }; GameManager.prototype.setWindowAnim = function (args) { var animIndex = (this.GI.getToolkit()).getProp(args, 'animIndex'); var baseClip = this.GI.getBaseClip(); var roomClip = baseClip['room' + this.curRoom]; var animClip = (this.GI.getToolkit()).getProp(args, 'animClip', roomClip.tile1); var fr = this.idleAnimInfo.frames.window[animIndex]; if (fr < animClip.mc._totalframes && animClip.mc._currentframe == 1) { animClip.mc.gotoAndPlay(fr); if (this.curRoom == 0 || this.curRoom == 2) { this.playSfx('windowbirds'); } } else {} }; GameManager.prototype.setDollAnim = function (args) { var animIndex = (this.GI.getToolkit()).getProp(args, 'animIndex'); var baseClip = this.GI.getBaseClip(); var roomClip = baseClip['room' + this.curRoom]; var animClip = (this.GI.getToolkit()).getProp(args, 'animClip', roomClip.doll); var fr = this.idleAnimInfo.frames.tops[animIndex]; if (fr < animClip.tops.mc._totalframes) { animClip.tops.mc.gotoAndPlay(fr); } fr = this.idleAnimInfo.frames.eyes[animIndex]; if (fr < animClip.eyes.mc._totalframes) { animClip.eyes.mc.gotoAndPlay(fr); } fr = this.idleAnimInfo.frames.shoe[animIndex]; if (fr < animClip.shoe.mc._totalframes) { animClip.shoe.mc.gotoAndPlay(fr); } fr = this.idleAnimInfo.frames.lips[animIndex]; if (fr < animClip.lips.mc._totalframes) { animClip.lips.mc.gotoAndPlay(fr); } this.idleAnimInfo.curIdleIndex = animIndex; }; GameManager.prototype.enterFrame = function () { var t = this.GI.getGameTime(); this.checkIdle(t); }; } }




http://swfchan.com/24/118573/info.shtml
Created: 7/3 -2019 03:43:17 Last modified: 7/3 -2019 03:43:17 Server time: 15/11 -2024 01:46:15