Frame 1
stop();
Frame 9
play();
Frame 142
stop();
Frame 158
stop();
Frame 184
bg_anims.plants.gotoAndStop(2);
bg_anims.wall_drip.gotoAndStop(1);
bg_anims.painting.gotoAndStop(1);
chris.play();
Frame 336
stop();
Frame 367
stop();
com.sony.silenthill.site.ExperienceManager.leaveExperience();
Symbol 84 MovieClip [__Packages.com.sony.silenthill.site.ExperienceManager] Frame 0
class com.sony.silenthill.site.ExperienceManager
{
static var __instance;
var _mc, _exp_mc, _transition_mc, _loader, _isInExperience, _curSection, _isLoaded, dispatchEvent;
function ExperienceManager ($mc) {
big.events.EventDispatcher.initialize(this);
_mc = $mc;
_exp_mc = _mc.createEmptyMovieClip("experience", 5);
_transition_mc = _mc.createEmptyMovieClip("transition", 10);
_loader = new MovieClipLoader();
_loader.addListener(this);
__instance = this;
}
function onKeyDown() {
if (((Key.getCode() == 39) && (Key.isDown(37))) || ((Key.getCode() == 39) && (Key.isDown(37)))) {
(_isInExperience ? (leaveExperience()) : (goToExperience()));
}
if (Key.getCode() == 38) {
onClickWallpaper(1024, 768);
}
}
function loadExperience($section) {
if (_curSection != $section) {
_isLoaded = false;
_curSection = $section;
var _local2 = com.sony.silenthill.site.PageData.getSection($section);
if (_local2.exp_swf && (_local2.expTransition_swf)) {
_loader.loadClip(PATH_SWF + _local2.exp_swf, _exp_mc);
_loader.loadClip(PATH_SWF + _local2.expTransition_swf, _transition_mc);
}
}
}
function onLoadInit($mc) {
var _local3 = _loader.getProgress(_exp_mc);
var _local2 = _loader.getProgress(_transition_mc);
if (((_local3.bytesLoaded == _local3.bytesTotal) && (_local2.bytesLoaded == _local2.bytesTotal)) && (!_isLoaded)) {
big.utils.Out.info(this, "onExperienceLoaded");
_isLoaded = true;
_transition_mc.trans0.onAnimate = big.utils.Delegate.create(this, _onTransitionAnimate);
_transition_mc.trans1.onAnimate = big.utils.Delegate.create(this, _onTransitionAnimate);
dispatchEvent({type:"onExperienceLoaded", target:this});
}
}
static function goToExperience() {
if (__instance._isLoaded) {
com.sony.silenthill.site.Main.hideSite();
__instance._isInExperience = true;
__instance._transition_mc["trans" + com.sony.silenthill.site.DarknessManager.isDark.toString()].gotoAndPlay("IN");
var _local1 = com.sony.silenthill.site.PageData.getSection(__instance._curSection);
if (_local1.exp_timeMin && (_local1.exp_timeMax)) {
startTimeout(_local1.exp_timeMin, _local1.exp_timeMax);
}
}
}
static function startTimeout($tMin, $tMax) {
var _local1 = big.utils.bsMath.getRandom($tMin, $tMax);
clearInterval(__instance._leave_int);
__instance._leave_int = setInterval(__instance, "_leaveExperience", _local1);
}
function _leaveExperience() {
leaveExperience();
}
function _onTransitionAnimate() {
_exp_mc.gotoAndPlay("IN");
}
function hideExperience() {
_isInExperience = false;
_exp_mc.gotoAndStop("IDLE");
_transition_mc["trans" + com.sony.silenthill.site.DarknessManager.isDark.toString()].gotoAndStop("IDLE");
}
static function leaveExperience() {
clearInterval(__instance._leave_int);
(__instance._curSection ? (com.sony.silenthill.site.Main.doPageTransition()) : (com.sony.silenthill.site.Main.goToPage(1, 0)));
__instance._exp_mc.deactivate();
}
static function get isLoaded() {
return(__instance._isLoaded);
}
static function get isInExperience() {
return(__instance._isInExperience);
}
static function onClickWallpaper($w, $h) {
var _local3 = ((("sh_wp8_" + $w.toString()) + "x") + $h.toString()) + ".jpg";
com.sony.silenthill.site.Main.callJS("popWallpapers", {img:_local3, w:$w, h:$h});
leaveExperience();
}
var _classname = "ExperienceManager";
var PATH_SWF = "swf/exp/";
}
Symbol 85 MovieClip [__Packages.big.events.EventDispatcher] Frame 0
class big.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new big.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
function getTotalListeners(event) {
var _local2 = "__q_" + event;
return(this[_local2].length);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1};
}
Symbol 86 MovieClip [__Packages.com.sony.silenthill.site.PageData] Frame 0
class com.sony.silenthill.site.PageData
{
function PageData () {
}
static function getPageByString($str) {
return(PAGES[$str]);
}
static function getPageByID($section, $page) {
return(PAGES[SECTIONS[$section].pages[$page]]);
}
static function getPageString($section, $page) {
return(SECTIONS[$section].pages[$page]);
}
static function getSectionString($section) {
return(SECTIONS[$section].id_str);
}
static function getSubnavArray($section) {
return(SECTIONS[$section].pages);
}
static function getSection($section) {
return(SECTIONS[$section]);
}
static var SECTIONS = [{id:0, id_str:"home", pages:[], expTransition_swf:"exp_trans_landing.swf", exp_swf:"landing_exp.swf"}, {id:1, id_str:"about", pages:["synopsis", "history"], trans_swf:"trans_about.swf", anim_swf:"about_anim.swf", expTransition_swf:"exp_trans_about.swf", exp_swf:"about_exp.swf"}, {id:2, id_str:"media", pages:["photogallery", "trailer", "audio"], trans_swf:"trans_media.swf", anim_swf:"media_anim.swf", expTransition_swf:"exp_trans_media.swf", exp_swf:"media_exp.swf"}, {id:3, id_str:"castcrew", pages:["cast", "crew", "notes", "set_loc"], trans_swf:"trans_cast.swf", anim_swf:"cast_anim.swf", expTransition_swf:"exp_trans_cast.swf", exp_swf:"cast_exp.swf"}, {id:4, id_str:"downloads", pages:["wallpapers", "icons", "screensavers", "poster", "psp", "ipod", "more"], trans_swf:"trans_downloads.swf", anim_swf:"downloads_anim.swf", expTransition_swf:"exp_trans_downloads.swf", exp_swf:"download_exp.swf"}, {id:5, id_str:"postercontest", link:{linkurl:"http://www.sonypictures.com/movies/silenthill/postercontest/vote/index.php", window:"_blank"}}, {id:6, id_str:"mobile", link:{linkurl:"Mobile Link", window:"_blank"}}, {id:7, id_str:"promotions", link:{linkurl:"Promotions Link", window:"_blank"}}];
static var PAGES = {synopsis:{sectionid:1, pageid:0}, history:{isTrigger:true, comingsoon:true}, photogallery:{sectionid:2, pageid:0, largepath:"assets/gallery/large/", thumbpath:"assets/gallery/thumb/"}, trailer:{sectionid:2, pageid:1}, audio:{isTrigger:true, comingsoon:true}, cast:{sectionid:3, pageid:0, subnav:[{label:"JODELLE FERLAND", jpg:"jodelle_ferland.jpg", charactername:"SHARON", id:"ferland"}, {label:"ALICE KRIGE", jpg:"alice_krige.jpg", charactername:"CHRISTABELLA", id:"krige"}, {label:"TANYA ALLEN", jpg:"tanya_allen.jpg", charactername:"ANNA", id:"allen"}, {label:"KIM COATES", jpg:"kim_koates.jpg", charactername:"OFFICER GUCCI", id:"koates"}, {label:"DEBORAH KARA UNGER", jpg:"deborah_kara_unger.jpg", charactername:"DAHLIA", id:"unger"}, {label:"LAURIE HOLDEN", jpg:"laurie_holden.jpg", charactername:"CYBIL", id:"holden"}, {label:"SEAN BEAN", jpg:"sean_bean.jpg", charactername:"CHRISTOPHER", id:"bean"}, {label:"RADHA MITCHELL", jpg:"radha_mitchell.jpg", charactername:"ROSE", id:"mitchell"}]}, crew:{sectionid:3, pageid:1, subnav:[{label:"PATRICK TATOPOULOS", jpg:"crew_gen.jpg", charactername:"CREATURE DESIGNER", id:"tatopoulos"}, {label:"DAN LAUSTSEN, D.F.F.", jpg:"crew_gen.jpg", charactername:"DIRECTOR OF PHOTOGRAPHY", id:"laustsen"}, {label:"AKIRA YAMAOKA", jpg:"crew_gen.jpg", charactername:"EXECUTIVE PRODUCER", id:"yamaoka"}, {label:"VICTOR HADIDA", jpg:"crew_gen.jpg", charactername:"EXECUTIVE PRODUCER", id:"vhadida"}, {label:"ANDREW MASON", jpg:"mason.jpg", charactername:"EXECUTIVE PRODUCER", id:"mason"}, {label:"DON CARMODY", jpg:"carmody.jpg", charactername:"PRODUCER", id:"carmody"}, {label:"SAMUEL HADIDA", jpg:"hadida.jpg", charactername:"PRODUCER", id:"hadida"}, {label:"ROGER AVARY", jpg:"crew_gen.jpg", charactername:"WRITER", id:"avary"}, {label:"CHRISTOPHE GANS", jpg:"gans.jpg", charactername:"DIRECTOR", id:"gans"}]}, notes:{sectionid:3, pageid:2, link:{linkurl:"javascript:popProductionNotes()"}}, set_loc:{isTrigger:true, comingsoon:true}, wallpapers:{sectionid:4, pageid:0, path:"swf/", thumbs:[{id:1, img:"wp0.swf"}, {id:2, img:"wp0.swf"}, {id:4, img:"wp0.swf"}, {id:5, img:"wp0.swf"}, {id:6, img:"wp0.swf"}]}, icons:{sectionid:4, pageid:1, path:"swf/", thumbs:[{id:1, img:"iconthumb.swf"}, {id:2, img:"iconthumb.swf"}, {id:3, img:"iconthumb.swf"}, {id:4, img:"iconthumb.swf"}, {id:5, img:"iconthumb.swf"}, {id:7, img:"iconthumb.swf"}, {id:8, img:"iconthumb.swf"}, {id:9, img:"iconthumb.swf", isTrigger:true}]}, screensavers:{sectionid:4, pageid:2, path:"swf/", thumbs:[{id:7, dltype:"ss", img:"dlthumb.swf"}, {id:8, dltype:"ss", img:"dlthumb.swf"}, {id:11, dltype:"ss", img:"dlthumb.swf", isTrigger:true}]}, poster:{sectionid:4, pageid:3, path:"swf/", thumbs:[{id:10, img:"dlthumb.swf"}]}, psp:{sectionid:4, pageid:4, path:"swf/", thumbs:[{id:4, dltype:"pspwp", img:"dlthumb.swf"}, {id:9, dltype:"psptr", img:"dlthumb.swf"}, {id:11, dltype:"pspvid", img:"dlthumb.swf", isTrigger:true}]}, ipod:{sectionid:4, pageid:5, path:"swf/", thumbs:[{id:9, dltype:"tr", img:"dlthumb.swf"}]}, more:{sectionid:4, pageid:6, link:{linkurl:""}}};
}
Symbol 87 MovieClip [__Packages.big.utils.Out] Frame 0
class big.utils.Out
{
static var _instance, _keyListener;
function Out () {
}
function _output(str) {
trace(str);
_root.debug_mc.debug_txt.text = _root.debug_mc.debug_txt.text + (newline + str);
_root.debug_mc.debug_txt.scroll = _root.debug_txt.maxscroll;
}
function _log(str) {
}
static function enableLevel(level) {
if (!_instance) {
_instance = new big.utils.Out();
}
_levels[level] = _instance;
}
static function enableAllLevels() {
enableLevel(OUT_INFO);
enableLevel(OUT_STATUS);
enableLevel(OUT_DEBUG);
enableLevel(OUT_WARNING);
enableLevel(OUT_ERROR);
enableLevel(OUT_FATAL);
_keyListener = {};
_keyListener.onKeyDown = big.utils.Delegate.create(big.utils.Out, onKeyDown);
Key.addListener(_keyListener);
}
static function onKeyDown() {
if (Key.isDown(16) && (Key.isDown(32))) {
_root.debug_mc.swapDepths(99999);
_root.debug_mc._visible = !_root.debug_mc._visible;
}
}
static function disableLevel(level) {
_levels[level] = null;
}
static function silence($origin) {
var _local2 = ((typeof($origin) == "String") ? ($origin) : ($origin._classname));
var _local1 = _silenced.length;
while (_local1--) {
if (_silenced[_local1] == _local2) {
return(undefined);
}
}
_silenced.push(_local2);
}
static function unsilence($origin) {
var _local2 = ((typeof($origin) == "String") ? ($origin) : ($origin._classname));
var _local1 = _silenced.length;
while (_local1--) {
if (_silenced[_local1] == _local2) {
_silenced.splice(_local1, 1);
break;
}
}
}
static function disableAllLevels() {
disableLevel(OUT_INFO);
disableLevel(OUT_STATUS);
disableLevel(OUT_DEBUG);
disableLevel(OUT_WARNING);
disableLevel(OUT_ERROR);
disableLevel(OUT_FATAL);
}
static function report() {
}
static function info(origin, str) {
if (!isSilenced(origin)) {
_levels[OUT_INFO]._output((("INFO: " + origin._classname) + ": ") + str);
}
}
static function status(origin, str) {
if (!isSilenced(origin)) {
_levels[OUT_STATUS]._output((("STATUS: " + origin._classname) + ": ") + str);
}
}
static function debug(origin, str) {
if (!isSilenced(origin)) {
_levels[OUT_DEBUG]._output((("DEBUG: " + origin._classname) + ": ") + str);
}
}
static function warning(origin, str) {
if (!isSilenced(origin)) {
_levels[OUT_WARNING]._output((("WARNING:" + origin._classname) + ": ") + str);
}
}
static function error(origin, str) {
if (!isSilenced(origin)) {
_levels[OUT_ERROR]._output((("ERROR: " + origin._classname) + ": ") + str);
}
}
static function fatal(origin, str) {
if (!isSilenced(origin)) {
_levels[OUT_FATAL]._output((("FATAL: " + origin._classname) + ": ") + str);
}
}
static function traceObject(origin, $label, $obj) {
trace(((("OBJECT: " + origin._classname) + " : ") + $label) + " =============================");
for (var _local2 in $obj) {
trace((("\t" + _local2) + " : ") + $obj[_local2]);
}
trace("============================================================");
}
static function isSilenced($origin) {
var _local1 = ("|" + $origin._classname) + "|";
var _local2 = ("|" + _silenced.join("|")) + "|";
return(_local2.indexOf(_local1) >= 0);
}
static var OUT_INFO = 0;
static var OUT_STATUS = 1;
static var OUT_DEBUG = 2;
static var OUT_WARNING = 3;
static var OUT_ERROR = 4;
static var OUT_FATAL = 5;
static var _levels = new Array();
static var _silenced = new Array();
}
Symbol 88 MovieClip [__Packages.big.utils.Delegate] Frame 0
class big.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local4 = arguments.callee.func;
var _local3 = arguments.callee.args;
return(_local4.apply(_local2, _local3.concat(arguments)));
};
_local2.target = arguments.shift();
_local2.func = arguments.shift();
_local2.args = arguments;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 89 MovieClip [__Packages.com.sony.silenthill.site.Main] Frame 0
class com.sony.silenthill.site.Main
{
static var soundControl, strings, contentxml, __instance, curLoop, soundIsOff;
var _mc, _bg, _bgAnim, _dm, _em, _content, _animLoader, _nav, _nextSection, _nextPage, _isSwitchingState, _curSection, _curPage, _bgAnimTweenOut, _bgAnimTweenIn;
function Main () {
_focusrect = false;
XML.prototype.ignoreWhite = true;
big.utils.Out.enableAllLevels();
}
function init($mc) {
_mc = $mc;
var _local2 = [_mc];
soundControl = new big.sound.SoundControl();
_bg = _mc.createEmptyMovieClip("bg", com.sony.silenthill.site.Constants.DEPTHS.BG);
_bg.loadMovie("swf/bg.swf");
soundControl.addClip("bg", _bg);
_local2.push(_bg);
_bgAnim = _mc.createEmptyMovieClip("bganim", com.sony.silenthill.site.Constants.DEPTHS.ANIM);
var _local6 = _bgAnim.createEmptyMovieClip("home", _bgAnim.getNextHighestDepth());
_local6.loadMovie("swf/entry_anim.swf");
soundControl.addClip("bgAnim", _bgAnim);
_local2.push(_local6);
var _local3 = new XML();
_local3.onLoad = big.utils.Delegate.create(this, _onStringsXML, _local3);
_local3.load("xml/en.xml");
_local2.push(_local3);
var _local4 = new XML();
_local4.onLoad = big.utils.Delegate.create(this, _onContentXML, _local4);
_local4.load("xml/content.xml");
_local2.push(_local4);
_mc.preloader_mc.addEventListener("onPreloaderOut", this);
_mc.preloader_mc.startPreload(_local2);
var _local7 = _mc.createEmptyMovieClip("darkness", com.sony.silenthill.site.Constants.DEPTHS.DARKNESS);
_dm = new com.sony.silenthill.site.DarknessManager(_local7);
_dm.addEventListener("onSwitchState", this);
_dm.addEventListener("onSwitchComplete", this);
soundControl.addClip("dark", _local7);
var _local8 = _mc.createEmptyMovieClip("experience", com.sony.silenthill.site.Constants.DEPTHS.EXPERIENCE);
_em = new com.sony.silenthill.site.ExperienceManager(_local8);
_em.addEventListener("onExperienceLoaded", this);
var _local5 = _mc.createEmptyMovieClip("content", com.sony.silenthill.site.Constants.DEPTHS.CONTENT);
_content = new com.sony.silenthill.site.Content(_local5);
soundControl.addClip("content_mc", _local5);
var _local9 = _mc.createEmptyMovieClip("sound_mc", com.sony.silenthill.site.Constants.DEPTHS.SOUND);
_local9.loadMovie("swf/sound_lib.swf");
_animLoader = new MovieClipLoader();
_animLoader.addListener(this);
}
function _onStringsXML($xml, $b) {
if ($b) {
strings = {};
var _local5 = $xml.firstChild.childNodes;
var _local4 = 0;
while (_local4 < _local5.length) {
var _local2 = _local5[_local4];
if (!strings[_local2.nodeName]) {
strings[_local2.nodeName] = {};
}
var _local3 = 0;
while (_local3 < _local2.childNodes.length) {
strings[_local2.nodeName][_local2.childNodes[_local3].attributes.id] = _local2.childNodes[_local3].firstChild.nodeValue;
_local3++;
}
_local4++;
}
} else {
big.utils.Out.error(this, "strings xml error");
}
}
function _onContentXML($xml, $b) {
if ($b) {
contentxml = {};
var _local4 = $xml.firstChild.childNodes;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
contentxml[_local3.nodeName] = _local3;
_local2++;
}
} else {
big.utils.Out.error(this, "content.xml error");
}
}
function onPreloaderOut() {
_mc.gotoAndStop("IN");
_mc.logo_mc.swapDepths(com.sony.silenthill.site.Constants.DEPTHS.LOGO);
_mc.nav_mc.swapDepths(com.sony.silenthill.site.Constants.DEPTHS.NAV);
_mc.footer_mc.swapDepths(com.sony.silenthill.site.Constants.DEPTHS.FOOTER);
_mc.pageTransition_mc.swapDepths(com.sony.silenthill.site.Constants.DEPTHS.TRANSITION);
_mc.pageTransition_mc.onHide = big.utils.Delegate.create(this, _onHide);
_mc.pageTransition_mc.onReveal = big.utils.Delegate.create(this, _onReveal);
_mc.pageTransition_mc.blendMode = "screen";
soundControl.addClip("logo_mc", _mc.logo_mc);
soundControl.addClip("nav_mc", _mc.nav_mc);
soundControl.addClip("footer_mc", _mc.footer_mc);
soundControl.addClip("pageTransition_mc", _mc.pageTransition_mc);
_nav = new com.sony.silenthill.site.Nav(_mc.nav_mc);
switch (_root.dl) {
case "trailer" :
_nextSection = 2;
_nextPage = 0;
break;
default :
_nextSection = 0;
_nextPage = 0;
}
_onHide();
}
function _onHide() {
_nav.setPage(_nextSection, _nextPage, com.sony.silenthill.site.DarknessManager.isDark);
showSite();
_em.hideExperience();
var _local2 = com.sony.silenthill.site.PageData.getSectionString(_nextSection);
var _local3 = _local2.toUpperCase() + com.sony.silenthill.site.DarknessManager.isDark.toString();
_bg.gotoAndStop(_local3);
_content.clearContent();
_em.loadExperience(__instance._nextSection);
if (!_nextSection) {
(_mc.logo_mc.gotoAndStop("OFF"));// not popped
} else {
(_mc.logo_mc.gotoAndStop("ON"));// not popped
}
if (_isSwitchingState) {
_isSwitchingState = false;
if (_curSection == _nextSection) {
onSwitchComplete({isDark:0});
}
if (!_nextSection) {
_nav.onSwitchComplete(0);
}
}
if (com.sony.silenthill.site.DarknessManager.isDark) {
_mc.pageTransition_mc.blendMode = "multiply";
_mc.pageTransition_mc.gotoAndPlay("DARK_REVEAL");
} else {
_mc.pageTransition_mc.blendMode = "screen";
_mc.pageTransition_mc.gotoAndPlay("FOG_REVEAL");
}
}
function onLoadInit($mc) {
if ($mc._name == com.sony.silenthill.site.PageData.getSectionString(_curSection)) {
_startBGanimation();
}
}
function _onReveal() {
if (!_isInited) {
_isInited = true;
_mc.footer_mc.gotoAndPlay("IN");
}
if (_curSection != _nextSection) {
_curSection = _nextSection;
if (_curSection) {
_dm.startTimer(_curSection);
}
}
var _local2 = com.sony.silenthill.site.PageData.getSectionString(_curSection);
if (!_bgAnim[_local2]) {
var _local3 = _bgAnim.createEmptyMovieClip(_local2, _bgAnim.getNextHighestDepth());
_animLoader.loadClip("swf/" + com.sony.silenthill.site.PageData.getSection(_nextSection).anim_swf, _local3);
} else {
_startBGanimation();
}
if (com.sony.silenthill.site.PageData.getPageString(_curSection, _curPage) == "trailer") {
_dm.stopTimer();
}
_curPage = _nextPage;
_content.animateIn(_curSection, _curPage, com.sony.silenthill.site.DarknessManager.isDark);
_nav.enableNav();
}
function onSwitchState($obj) {
var _local2 = $obj.isDark;
if (!_local2) {
_isSwitchingState = true;
__instance._mc.pageTransition_mc.blendMode = "screen";
__instance._mc.pageTransition_mc.gotoAndPlay("FOG_HIDE");
}
_stopBGanimation();
__instance._nav.onSwitchState(_local2);
__instance._content.onSwitchState(_local2);
}
function onSwitchComplete($obj) {
big.utils.Out.info(this, "onSwitchComplete");
var _local2 = $obj.isDark;
if (_local2) {
var _local3 = com.sony.silenthill.site.PageData.getSectionString(_curSection, _curPage).toUpperCase() + com.sony.silenthill.site.DarknessManager.isDark.toString();
_bg.gotoAndStop(_local3);
}
_nav.onSwitchComplete(_local2);
_content.onSwitchComplete(_local2);
if (_local2) {
_startBGanimation();
}
}
static function goHome() {
if (!__instance._nav.__get__isDisabled()) {
goToPage(0, 0);
}
}
static function goToPage($section, $page) {
__instance._dm.stopTimer();
__instance._nextSection = $section;
__instance._nextPage = $page;
var _local3 = com.sony.silenthill.site.PageData.getSectionString($section);
if (com.sony.silenthill.site.PageData.getPageString($section, $page)) {
_local3 = _local3 + ("+" + com.sony.silenthill.site.PageData.getPageString($section, $page));
}
trackIt(_local3);
if (!$section) {
com.sony.silenthill.site.DarknessManager.forceDark(0);
}
if (__instance._nextSection != __instance._curSection) {
doPageTransition();
__instance._content.fadeSound();
__instance._stopBGanimation();
__instance._nav.disableNav();
} else {
__instance._nav.setPage($section, $page, com.sony.silenthill.site.DarknessManager.isDark);
__instance._content.animateOut($section, $page);
__instance._curPage = $page;
}
startLoop("loop" + com.sony.silenthill.site.DarknessManager.isDark.toString());
}
static function doPageTransition() {
if (com.sony.silenthill.site.DarknessManager.isDark) {
__instance._mc.pageTransition_mc.blendMode = "multiply";
__instance._mc.pageTransition_mc.gotoAndPlay("DARK_HIDE");
} else {
__instance._mc.pageTransition_mc.blendMode = "screen";
__instance._mc.pageTransition_mc.gotoAndPlay("FOG_HIDE");
}
}
function _stopBGanimation() {
var _local2 = _bgAnim[com.sony.silenthill.site.PageData.getSectionString(_curSection)];
_bgAnimTweenOut.stop();
onMotionFinished(_bgAnimTweenOut);
if (_bgAnimTweenIn.obj == _local2) {
_bgAnimTweenIn.stop();
}
_bgAnimTweenOut = new mx.transitions.Tween(_local2, "_alpha", null, _local2._alpha, 0, 8);
_bgAnimTweenOut.addListener(this);
big.utils.Out.info(this, "stopBGanimation : " + _curSection);
}
function _startBGanimation() {
var _local2 = com.sony.silenthill.site.PageData.getSectionString(_curSection);
var _local3 = (com.sony.silenthill.site.DarknessManager.isDark ? "dark" : "fog");
if (_local3 != "dark") {
(_bgAnim[_local2].dark.gotoAndStop("OFF"));// not popped
} else {
(_bgAnim[_local2].fog.gotoAndStop("OFF"));// not popped
}
_bgAnim[_local2][_local3].gotoAndPlay("ON");
_bgAnimTweenOut.stop();
_bgAnimTweenIn = new mx.transitions.Tween(_bgAnim[_local2], "_alpha", null, 0, 100, 15);
if (com.sony.silenthill.site.ExperienceManager.__get__isLoaded()) {
_bgAnim[_local2][_local3].trigger_mc.gotoAndPlay("ON");
}
big.utils.Out.info(this, "startBGanimation : " + _curSection);
}
function onMotionFinished($tween) {
if (($tween == _bgAnimTweenOut) && ($tween.obj._alpha == 0)) {
$tween.obj.dark.gotoAndStop("OFF");
$tween.obj.fog.gotoAndStop("OFF");
$tween.obj._alpha = 100;
}
}
static function addSound($id, $mc) {
soundControl.addSound($id, $mc);
}
static function onSoundLoaded() {
var _local1 = ((!__instance._curSection) ? "landingloop" : ("loop" + com.sony.silenthill.site.DarknessManager.isDark.toString()));
startLoop(_local1);
}
static function startLoop($str) {
if (curLoop != $str) {
if (curLoop) {
soundControl.fadeSound(curLoop, 0, 30);
}
soundControl.fadeSound($str, 50, 30);
curLoop = $str;
}
}
static function stopLoop() {
soundControl.fadeSound(curLoop, 0, 30);
curLoop = null;
}
static function playSound($str) {
soundControl.startSound($str, 100);
}
static function soundOff() {
big.utils.Out.info(__instance, "soundOff: " + com.sony.silenthill.site.PageData.getPageString(__instance._curSection, __instance._curPage));
soundIsOff = true;
soundControl.fadeAll(0, 15);
}
static function soundOn() {
big.utils.Out.info(__instance, "soundOn");
soundIsOff = false;
soundControl.fadeAll(100, 15);
}
static function getInstance() {
if (!__instance) {
__instance = new com.sony.silenthill.site.Main();
}
return(__instance);
}
static function trackIt($str) {
callJS("track", {sectionCode:"255", sectionName:$str, pageCode:"5", pageName:("silenthill+" + $str) + "+main"});
}
static function callJS($method, $params) {
if ($params == undefined) {
$params = {x:"undefined"};
}
if (com.sony.silenthill.site.Constants.__get__IS_IN_BROWSER()) {
flash.external.ExternalInterface.call($method, $params);
} else {
big.utils.Out.traceObject(__instance, "callJS : " + $method, $params);
}
}
static function hideSite() {
__instance._mc.logo_mc._visible = false;
__instance._mc.nav_mc._visible = false;
__instance._mc.footer_mc._visible = false;
__instance._bg._visible = false;
__instance._bgAnim._visible = false;
__instance._stopBGanimation();
__instance._dm.stopTimer();
__instance._content.clearContent();
}
static function showSite() {
__instance._mc.logo_mc._visible = true;
__instance._mc.nav_mc._visible = true;
__instance._mc.footer_mc._visible = true;
__instance._bg._visible = true;
__instance._bgAnim._visible = true;
}
function onExperienceLoaded() {
_nav.onExperienceLoaded();
var _local2 = (com.sony.silenthill.site.DarknessManager.isDark ? "dark" : "fog");
var _local3 = com.sony.silenthill.site.PageData.getSectionString(_curSection);
_bgAnim[_local3][_local2].trigger_mc.gotoAndPlay("ON");
}
var _classname = "Main";
var _isInited = false;
}
Symbol 90 MovieClip [__Packages.com.sony.silenthill.site.Nav] Frame 0
class com.sony.silenthill.site.Nav
{
var _mc, HOME_NAV_X, HOME_NAV_Y, _curSection, _subnav, _curPage, _isDisabled;
function Nav ($mc) {
_mc = $mc;
HOME_NAV_X = _mc._x;
HOME_NAV_Y = _mc._y;
var _local4 = 1;
while (_local4 < com.sony.silenthill.site.PageData.SECTIONS.length) {
var _local3 = com.sony.silenthill.site.PageData.SECTIONS[_local4];
var _local2 = _mc["nav" + _local4.toString()];
_local2.lightx = _local2._x;
_local2.lighty = _local2._y;
_local2.txtbox.label_str = com.sony.silenthill.site.Main.strings.nav[_local3.id_str];
_local2.txtbox.label_mc.txt_mc.label_txt.text = com.sony.silenthill.site.Main.strings.nav[_local3.id_str];
_local2.txtboxdark.label_txt.text = com.sony.silenthill.site.Main.strings.nav[_local3.id_str];
_local2.txtboxdark._visible = false;
_local2.txtbox.comingsoon = _local3.comingsoon;
if (!_local3.link) {
_local2.txtbox.onNavClick = big.utils.Delegate.create(this, _onNavClick, _local3.id, 0);
} else {
_local2.txtbox.onNavClick = big.utils.Delegate.create(this, _openLink, _local3.link);
}
_navBtns.push(_local2);
_local4++;
}
}
function setPage($section, $page, $isDark) {
big.utils.Out.info(this, (((("setPage : " + $section) + " / ") + $page) + " / ") + $isDark);
if ($section) {
_mc._x = INTERIOR_NAV_X;
_mc._y = INTERIOR_NAV_Y;
} else {
_mc._x = HOME_NAV_X;
_mc._y = HOME_NAV_Y;
_setNavButtonsToFog();
}
if ($section != _curSection) {
_mc["nav" + _curSection.toString()].txtbox.gotoAndStop("IDLE");
_mc["nav" + $section.toString()].txtbox.gotoAndPlay("SELECTED");
_subnav = _mc.createEmptyMovieClip("subnav", SUBNAV_DEPTH);
_subnavBtns = [];
_subnav._x = SUBNAV_X;
_subnav._y = SUBNAV_Y;
var _local5 = com.sony.silenthill.site.PageData.getSubnavArray($section);
var _local3 = 0;
while (_local3 < _local5.length) {
var _local2 = _subnav.attachMovie("subnavshell", "sub" + _local3.toString(), _local3);
var _local4 = com.sony.silenthill.site.PageData.getPageByString(_local5[_local3]);
_local2.subnav_btn.label_str = com.sony.silenthill.site.Main.strings.nav[_local5[_local3]];
_local2.isTrigger = _local4.isTrigger;
if (_local4.comingsoon && ((!_local4.isTrigger) || (!com.sony.silenthill.site.ExperienceManager.__get__isLoaded()))) {
_local2.subnav_btn.comingsoon = true;
}
_local2._y = _local3 * SUBNAV_SPACING;
_local2.lightx = _local2._x;
_local2.lighty = _local2._y;
if (!_local4.link) {
_local2.subnav_btn.onNavClick = big.utils.Delegate.create(this, _onNavClick, $section, _local3, _local4.isTrigger);
} else {
_local2.subnav_btn.onNavClick = big.utils.Delegate.create(this, _openLink, _local4.link);
}
_subnavBtns.push(_local2);
if ($isDark) {
_local2.gotoAndPlay("DARK");
_subnavBtns[_local3].subnav_btn.fog_mc._visible = false;
}
_local3++;
}
if ($section) {
_mc.nav5._visible = false;
_mc.nav6._visible = false;
_mc.nav7._visible = false;
} else {
_mc.nav5._visible = true;
_mc.nav6._visible = true;
_mc.nav7._visible = true;
}
} else {
_subnav["sub" + _curPage.toString()].subnav_btn.gotoAndStop("IDLE");
}
_subnav["sub" + $page.toString()].subnav_btn.gotoAndPlay("SELECTED");
_curSection = $section;
_curPage = $page;
}
function onExperienceLoaded() {
var _local2 = 0;
while (_local2 < _subnavBtns.length) {
var _local3 = _subnavBtns[_local2];
if (_local3.isTrigger) {
big.utils.Out.info(this, "onExperienceLoaded : set button trigger");
_local3.subnav_btn.comingsoon = false;
}
_local2++;
}
}
function _onNavClick($section, $page, $isTrigger) {
big.utils.Out.info(this, (((("onNavClick : " + $section) + " :: ") + $page) + " :: ") + $isTrigger);
if (!_isDisabled) {
($isTrigger ? (com.sony.silenthill.site.ExperienceManager.goToExperience()) : (com.sony.silenthill.site.Main.goToPage($section, $page)));
}
}
function onSwitchState($isDark) {
disableNav();
if ($isDark) {
var _local2 = 0;
while (_local2 < _navBtns.length) {
_navBtns[_local2].gotoAndPlay("DARK");
_navBtns[_local2].txtbox.fog_mc.gotoAndPlay("HIDE");
_local2++;
}
_local2 = 0;
while (_local2 < _subnavBtns.length) {
_subnavBtns[_local2].gotoAndPlay("DARK");
_subnavBtns[_local2].subnav_btn.fog_mc._visible = false;
_local2++;
}
}
}
function onSwitchComplete($isDark) {
if (!$isDark) {
_setNavButtonsToFog();
var _local3 = 0;
while (_local3 < _subnavBtns.length) {
var _local2 = _subnavBtns[_local3];
_local2.gotoAndStop("FOG");
_local2.subnav_btn.fog_mc._visible = true;
_local2._x = _local2.lightx;
_local2._y = _local2.lighty;
_local2._rotation = 0;
_local2._xscale = (_local2._yscale = 100);
_local3++;
}
_subnav["sub" + _curPage.toString()].subnav_btn.gotoAndPlay("SELECTED");
} else {
var _local3 = 0;
while (_local3 < _navBtns.length) {
_navBtns[_local3].txtbox.fog_mc.gotoAndPlay("DARK");
_local3++;
}
}
enableNav();
}
function _setNavButtonsToFog() {
var _local3 = 0;
while (_local3 < _navBtns.length) {
var _local2 = _navBtns[_local3];
_local2.gotoAndStop("FOG");
_local2.txtbox.fog_mc.gotoAndStop("FOG");
_local2._x = _local2.lightx;
_local2._y = _local2.lighty;
_local2.txtboxdark._visible = false;
_local2._rotation = 0;
_local2._xscale = (_local2._yscale = 100);
_local3++;
}
}
function _openLink($obj) {
if ($obj.window) {
(com.sony.silenthill.site.Constants.__get__IS_IN_BROWSER() ? (getURL ($obj.linkurl, $obj.window)) : (big.utils.Out.info(this, "openLink : " + $obj.linkurl)));
} else {
(com.sony.silenthill.site.Constants.__get__IS_IN_BROWSER() ? (getURL ($obj.linkurl)) : (big.utils.Out.info(this, "openLink : " + $obj.linkurl)));
}
}
function disableNav() {
_isDisabled = true;
_mc.gotoAndStop("DISABLED");
}
function enableNav() {
_isDisabled = false;
_mc.gotoAndStop("IDLE");
}
function get isDisabled() {
return(_isDisabled);
}
var _classname = "Nav";
var _navBtns = [];
var _subnavBtns = [];
var INTERIOR_NAV_X = 120;
var INTERIOR_NAV_Y = 367;
var SUBNAV_X = 91;
var SUBNAV_Y = 72;
var SUBNAV_SPACING = 15;
var SUBNAV_DEPTH = 10;
}
Symbol 91 MovieClip [__Packages.com.sony.silenthill.site.Constants] Frame 0
class com.sony.silenthill.site.Constants
{
function Constants () {
}
static function get IS_IN_BROWSER() {
return((System.capabilities.playerType == "PlugIn") || (System.capabilities.playerType == "ActiveX"));
}
static var DEPTHS = {BG:100, DARKNESS:200, ANIM:250, CONTENT:300, FOOTER:400, NAV:500, LOGO:600, EXPERIENCE:650, TRANSITION:700, SOUND:10000};
}
Symbol 92 MovieClip [__Packages.com.sony.silenthill.site.DarknessManager] Frame 0
class com.sony.silenthill.site.DarknessManager
{
static var __instance;
var _mc, _vidLoader, _curSection, _timeIsElapsed, _timer_int, _switch_int, dispatchEvent;
function DarknessManager ($mc) {
big.events.EventDispatcher.initialize(this);
_mc = $mc;
_vidLoader = new MovieClipLoader();
_vidLoader.addListener(this);
__instance = this;
Key.addListener(this);
}
function onKeyDown() {
if (((Key.getCode() == 16) && (Key.isDown(32))) || ((Key.getCode() == 32) && (Key.isDown(16)))) {
_onTimeElapsed();
}
}
function startTimer($section) {
if (_curSection != $section) {
if (!_vidMCs[$section]) {
var _local4 = (_vidMCs[$section] = _mc.createEmptyMovieClip("v" + $section.toString(), _mc.getNextHighestDepth()));
_vidLoader.loadClip("swf/transitions/" + com.sony.silenthill.site.PageData.SECTIONS[$section].trans_swf, _local4);
}
_curSection = $section;
_timeIsElapsed = false;
var _local3 = big.utils.bsMath.getRandom(MIN_TIME, MAX_TIME);
clearInterval(_timer_int);
_timer_int = setInterval(this, "_onTimeElapsed", _local3);
}
}
function onLoadInit($mc) {
$mc.isLoaded = true;
$mc.onDark = big.utils.Delegate.create(this, _onSwitchComplete);
if ($mc._name == ("v" + _curSection.toString())) {
_switchState();
}
}
function stopTimer() {
clearInterval(_timer_int);
_timeIsElapsed = false;
}
function _onTimeElapsed() {
clearInterval(_timer_int);
_timeIsElapsed = true;
if (!isDark) {
clearInterval(_switch_int);
_switch_int = setInterval(this, "_switchState", 3000);
com.sony.silenthill.site.Main.playSound("siren");
} else {
_switchState();
}
}
function _switchState() {
clearInterval(_switch_int);
if ((_timeIsElapsed && (_vidMCs[_curSection].isLoaded)) && (!com.sony.silenthill.site.ExperienceManager.__get__isInExperience())) {
_isDark = (_isDark ? 0 : 1);
isDark = _isDark;
com.sony.silenthill.site.Main.playSound("transition");
com.sony.silenthill.site.Main.startLoop("loop" + _isDark.toString());
dispatchEvent({type:"onSwitchState", isDark:_isDark, target:this});
var _local2 = _vidMCs[_curSection];
if (_isDark) {
_local2.gotoAndPlay("IN");
}
}
}
function _stepBack($mc) {
$mc.gotoAndStop($mc._currentframe - 1);
if ($mc._currentframe == 1) {
delete _mc.onEnterFrame;
_onSwitchComplete();
}
}
function _onSwitchComplete() {
dispatchEvent({type:"onSwitchComplete", isDark:_isDark, target:this});
}
static function addEventListenerToInstance($event, $obj) {
__instance.addEventListener($event, $obj);
}
static function forceDark($d) {
__instance._isDark = $d;
isDark = $d;
}
var _classname = "DarknessManager";
var _isDark = 0;
var _vidMCs = [];
var MIN_TIME = 10000;
var MAX_TIME = 30000;
static var isDark = 0;
}
Symbol 93 MovieClip [__Packages.big.utils.bsMath] Frame 0
class big.utils.bsMath
{
function bsMath () {
}
static function getRandom(min_num, max_num) {
return(min_num + Math.floor(Math.random() * ((max_num + 1) - min_num)));
}
static function getRandomFloat(min_num, max_num) {
return(min_num + (Math.random() * (max_num - min_num)));
}
static function roundToDecimal($i, $dec) {
var _local1 = Math.pow(10, $dec);
return(Math.round($i * _local1) / _local1);
}
}
Symbol 94 MovieClip [__Packages.com.sony.silenthill.site.Content] Frame 0
class com.sony.silenthill.site.Content
{
var _mc, _assetLoader, _contentSound, FOG_TEXT, DARK_TEXT, _curPage_str, _nextImage, _curImage, _thumbsLoaded, _totalThumbs, _animCount, _animPause, _curTextPage, _texture_int, _curThumbPage, _curName, _animStart, _pageAnimating, _thumbsOut, _largeImageHolder, _volumeTween, _vidPlayer, _curPage, _curSection, _vidAudio_mc, _vidAudio, _nextSection, _nextPage, _fadeOutTween, _curThumb, _contentVolume;
function Content ($mc) {
_mc = $mc;
_assetLoader = new MovieClipLoader();
_assetLoader.addListener(this);
_contentSound = new Sound(_mc);
FOG_TEXT = new TextFormat();
FOG_TEXT.font = "Univers LT Std 55";
FOG_TEXT.size = 11;
FOG_TEXT.color = 3815478 /* 0x3A3836 */;
DARK_TEXT = new TextFormat();
DARK_TEXT.color = 16777215 /* 0xFFFFFF */;
DARK_TEXT.size = 13;
DARK_TEXT.font = "Adobe Jenson Pro SmBd";
}
function onLoadInit($mc) {
var _local4 = com.sony.silenthill.site.PageData.getPageByString(_curPage_str);
var _local3 = Number($mc._name.split("_")[1]);
switch (_curPage_str) {
case "wallpapers" :
$mc.onWallpaperOver = big.utils.Delegate.create(this, _onWallpaperOver);
$mc.onWallpaperClick = big.utils.Delegate.create(this, _onWallpaperClick);
$mc.id = _local4.thumbs[_local3].id;
var _local6 = new mx.transitions.Tween($mc, "_alpha", null, 0, 100, 10);
if (com.sony.silenthill.site.DarknessManager.isDark) {
$mc.gotoAndStop("SWITCH");
_startBlink($mc.thumb_mc, 0, 5, 10, 20);
} else {
$mc.gotoAndStop("IDLE0");
}
break;
case "screensavers" :
case "poster" :
case "psp" :
case "ipod" :
$mc.label_str = com.sony.silenthill.site.Main.strings.thumbs[_local4.thumbs[_local3].dltype];
case "icons" :
$mc.gotoAndPlay("IDLE" + com.sony.silenthill.site.DarknessManager.isDark.toString());
$mc.id = _local4.thumbs[_local3].id;
_local6 = new mx.transitions.Tween($mc, "_alpha", null, 0, 100, 10);
$mc.onThumbClick = big.utils.Delegate.create(this, _onThumbClick, $mc.id, _local4.thumbs[_local3].isTrigger);
if ((_curPage_str == "screensavers") || (_curPage_str == "poster")) {
$mc.label_mc._visible = false;
}
if (com.sony.silenthill.site.DarknessManager.isDark) {
if ((_curPage_str != "icons") && (_curPage_str != "photogallery")) {
$mc.gotoAndStop("SWITCH");
}
_startBlink($mc, 0, 5, 10, 20);
}
break;
case "photogallery" :
if ($mc == _nextImage) {
_local6 = new mx.transitions.Tween(_nextImage, "_alpha", null, 0, 100, 10);
_nextImage._y = 0;
_curImage.removeMe = true;
var _local5 = new mx.transitions.Tween(_curImage, "_alpha", null, _curImage._alpha, 0, 10);
_local5.addListener(this);
_curImage = _nextImage;
com.sony.silenthill.site.Main.playSound("photochange");
} else {
_thumbsLoaded++;
if (com.sony.silenthill.site.DarknessManager.isDark) {
_startBlink($mc, 0, 5, 10, 20);
}
if (_thumbsLoaded == _totalThumbs) {
_animCount = 0;
_animPause = 0;
_mc.onEnterFrame = big.utils.Delegate.create(this, _animateThumbsIn);
}
com.sony.silenthill.site.Main.playSound("gallerythumbsin");
}
break;
case "cast" :
case "crew" :
if (com.sony.silenthill.site.DarknessManager.isDark) {
_startBlink($mc, 0, 5, 10, 20);
} else {
_local6 = new mx.transitions.Tween($mc, "_alpha", null, 0, 100, 15);
}
}
}
function _clearTextField() {
var _local2 = 0;
while (_clips["txt" + _local2.toString()]) {
_clips["txt" + _local2.toString()].removeMovieClip();
_local2++;
}
if (_clips.texture) {
_clips.texture.removeMovieClip();
}
}
function _buildTextField($page, $subpage) {
var _local5 = TF_POSITION[$page];
var _local6 = 0;
var _local11 = 0;
while (com.sony.silenthill.site.Main.strings[$page][((($subpage + "_") + _curTextPage.toString()) + "_") + _local6.toString()]) {
_local6++;
}
_local6--;
var _local4 = _local6;
while (_local4 >= 0) {
var _local2 = (_clips["txt" + _local4.toString()] = _mc.createEmptyMovieClip("txt" + _local4.toString(), _mc.getNextHighestDepth()));
_local2.isTextField = true;
var _local3 = _local2.createTextField("txt", 1, 0, 0, _local5.w, _local5.h);
_local3.embedFonts = true;
_local3.autoSize = true;
_local3.html = true;
_local3.htmlText = com.sony.silenthill.site.Main.strings[$page][((($subpage + "_") + _curTextPage.toString()) + "_") + _local4.toString()];
_local3.setTextFormat(FOG_TEXT);
_local2._x = _local5.x;
var _local7 = _local6 - _local4;
_local2._y = (_local5.y + ((-_local5.yspace) * _local7)) - _local3.textHeight;
_local11 = _local2._y;
_local2.cacheAsBitmap = true;
var _local10 = new mx.transitions.Tween(_local2, "_alpha", null, 0, 100, 15);
if (com.sony.silenthill.site.DarknessManager.isDark) {
_startBlink(_local2, 0, 5, 10, 20);
}
_local4--;
}
var _local12 = (_clips.texture = _mc.attachMovie("texture", "texture", _mc.getNextHighestDepth()));
_local12._x = _local5.x - 30;
_local12._y = _local11;
_local12._height = -_local11;
_local12.blendMode = "multiply";
if (!com.sony.silenthill.site.DarknessManager.isDark) {
_local12._visible = false;
} else {
clearInterval(_texture_int);
_texture_int = setInterval(this, "_showTextTexture", 5000);
}
var _local14 = _curTextPage + 1;
var _local13 = com.sony.silenthill.site.Main.strings[$page][(($subpage + "_") + _local14.toString()) + "_0"];
if ((_local13 != undefined) || (_curTextPage)) {
if (!_clips.arrows_mc) {
_clips.arrows_mc = _mc.attachMovie("pageArrows", "arrows", _mc.getNextHighestDepth());
_clips.arrows_mc._x = CASTCREW_ARROWS.x;
_clips.arrows_mc._y = CASTCREW_ARROWS.y;
_clips.arrows_mc.up_mc.onArrowClick = big.utils.Delegate.create(this, _onTextPageArrowClick, -1);
_clips.arrows_mc.down_mc.onArrowClick = big.utils.Delegate.create(this, _onTextPageArrowClick, 1);
}
if (!_curTextPage) {
(_clips.arrows_mc.up_mc.gotoAndStop("INACTIVE"));// not popped
} else {
(_clips.arrows_mc.up_mc.gotoAndStop("IDLE"));// not popped
}
if (_local13 == undefined) {
(_clips.arrows_mc.down_mc.gotoAndStop("INACTIVE"));// not popped
} else {
(_clips.arrows_mc.down_mc.gotoAndStop("IDLE"));// not popped
}
}
}
function _buildThumbs($str) {
var _local2 = THUMB_POSITION[$str];
var _local6 = com.sony.silenthill.site.PageData.getPageByString($str);
var _local7 = 0;
var _local5 = _local2.x;
var _local8 = _curThumbPage * _local2.perpage;
var _local9 = Math.min(_local8 + _local2.perpage, _local6.thumbs.length);
var _local3 = _local8;
while (_local3 < _local9) {
var _local4 = (_clips["thumb" + _local3] = _mc.createEmptyMovieClip("thumb_" + _local3, _mc.getNextHighestDepth()));
_local4._x = _local5;
_local4._y = (_local2.y + ((-_local2.yspace) * _local7)) - _local2.h;
_local5 = _local5 + _local2.xspace;
if ((_local3 % _local2.cols) == (_local2.cols - 1)) {
_local5 = _local2.x;
_local7++;
}
_assetLoader.loadClip(_local6.path + _local6.thumbs[_local3].img, _local4);
_local3++;
}
if (_local6.thumbs.length > _local2.perpage) {
if (!_clips.arrows_mc) {
_clips.arrows_mc = _mc.attachMovie("pageArrows", "arrows", _mc.getNextHighestDepth());
_clips.arrows_mc._x = ARROW_POSITION.x;
_clips.arrows_mc._y = ARROW_POSITION.y;
_clips.arrows_mc.up_mc.onArrowClick = big.utils.Delegate.create(this, _onPageArrowClick, -1);
_clips.arrows_mc.down_mc.onArrowClick = big.utils.Delegate.create(this, _onPageArrowClick, 1);
}
if (_local8 != 0) {
(_clips.arrows_mc.up_mc.gotoAndStop("IDLE"));// not popped
} else {
(_clips.arrows_mc.up_mc.gotoAndStop("INACTIVE"));// not popped
}
if (_local9 != _local6.thumbs.length) {
(_clips.arrows_mc.down_mc.gotoAndStop("IDLE"));// not popped
} else {
(_clips.arrows_mc.down_mc.gotoAndStop("INACTIVE"));// not popped
}
} else if (_clips.arrows_mc) {
_clips.arrows_mc.removeMovieClip();
}
}
function _onPageArrowClick($dir) {
_curThumbPage = _curThumbPage + $dir;
_curThumbPage = Math.max(0, _curThumbPage);
for (var _local2 in _clips) {
if (_clips[_local2] != _clips.arrows_mc) {
_clips[_local2].t = new mx.transitions.Tween(_clips[_local2], "_alpha", null, _clips[_local2]._alpha, 0, 8);
_clips[_local2].removeMe = true;
_clips[_local2].t.addListener(this);
}
}
_buildThumbs(_curPage_str);
}
function _onTextPageArrowClick($dir) {
_curTextPage = _curTextPage + $dir;
_clearTextField();
var _local2 = com.sony.silenthill.site.PageData.getPageByString(_curPage_str);
_buildTextField(_curPage_str, _local2.subnav[_curName].id);
}
function _buildGalleryThumbs() {
var _local11 = com.sony.silenthill.site.PageData.getPageByString("photogallery");
var _local7 = com.sony.silenthill.site.Main.contentxml.gallery.childNodes;
_totalThumbs = 0;
_thumbsLoaded = 0;
var _local4 = GALLERY_THUMB_POS;
var _local5 = 0;
var _local8 = 0;
var _local9 = _curThumbPage * _local4.perpage;
_animStart = _local9;
var _local10 = Math.min(_local9 + _local4.perpage, _local7.length);
var _local3 = _local9;
while (_local3 < _local10) {
var _local2 = (_clips["t" + _local3.toString()] = _mc.attachMovie("galleryThumb", "t" + _local3.toString(), _mc.getNextHighestDepth()));
_local2._x = _local4.x + (_local8 * _local4.xspace);
_local2._y = _local4.y + ((_local4.yspace * _local5) - _local4.h);
_local2.x = _local2._x;
_local2.y = _local2._y;
_local2.filename = _local7[_local3].attributes.filename;
_local2.onPhotoThumbClick = big.utils.Delegate.create(this, _onPhotoThumbClick);
_local2.onAnimateOut = big.utils.Delegate.create(this, _onPhotoThumbOut, _local2);
var _local6 = _local2.imgHolder_mc.createEmptyMovieClip("img", 1);
_totalThumbs++;
_assetLoader.loadClip(_local11.thumbpath + _local7[_local3].attributes.filename, _local6);
_local5++;
if (_local5 == _local4.rows) {
_local5 = 0;
_local8++;
}
_local3++;
}
_clips.arrows_mc.swapDepths(_mc.getNextHighestDepth());
if (_local9 != 0) {
(_clips.arrows_mc.up_mc.gotoAndStop("IDLE"));// not popped
} else {
(_clips.arrows_mc.up_mc.gotoAndStop("INACTIVE"));// not popped
}
if (_local10 != _local7.length) {
(_clips.arrows_mc.down_mc.gotoAndStop("IDLE"));// not popped
} else {
(_clips.arrows_mc.down_mc.gotoAndStop("INACTIVE"));// not popped
}
}
function _onGalleryPageClick($dir) {
if (!_pageAnimating) {
_pageAnimating = true;
_curThumbPage = _curThumbPage + $dir;
_thumbsOut = 0;
for (var _local2 in _clips) {
if ((_clips[_local2] != _largeImageHolder) && (_clips[_local2] != _clips.arrows_mc)) {
_clips[_local2].gotoAndPlay("OUT");
}
}
}
}
function animateIn($section, $page, $isDark) {
var _local9 = com.sony.silenthill.site.PageData.getPageString($section, $page);
big.utils.Out.info(this, "animateIn : " + _local9);
_mc._alpha = 100;
_volumeTween.stop();
_vidPlayer.reset();
vol = (100);
var _local7 = com.sony.silenthill.site.PageData.getPageByString(_local9);
if (($page != _curPage) || ($section != _curSection)) {
_curTextPage = 0;
_curName = _local7.subnav.length - 1;
}
_curPage_str = _local9;
_curPage = $page;
_curSection = $section;
_curThumbPage = 0;
switch (_local9) {
case "synopsis" :
_buildTextField("synopsis", "synopsis");
break;
case "photogallery" :
_largeImageHolder = (_clips.large = _mc.createEmptyMovieClip("large", _mc.getNextHighestDepth()));
_largeImageHolder._x = GALLERY_LARGE_POS.x;
_largeImageHolder._y = GALLERY_LARGE_POS.y;
_curImage = null;
_nextImage = _largeImageHolder.createEmptyMovieClip("i1", 1);
_nextImage._y = -1000;
var _local11 = com.sony.silenthill.site.Main.contentxml.gallery.childNodes;
_assetLoader.loadClip(_local7.largepath + _local11[0].attributes.filename, _nextImage);
if (com.sony.silenthill.site.DarknessManager.isDark) {
_startBlink(_largeImageHolder, 0, 5, 10, 20);
}
_clips.arrows_mc = _mc.attachMovie("pageArrows", "arrows", _mc.getNextHighestDepth());
_clips.arrows_mc._x = GALLERY_ARROWS.x;
_clips.arrows_mc._y = GALLERY_ARROWS.y;
_clips.arrows_mc.up_mc.onArrowClick = big.utils.Delegate.create(this, _onGalleryPageClick, -1);
_clips.arrows_mc.down_mc.onArrowClick = big.utils.Delegate.create(this, _onGalleryPageClick, 1);
_buildGalleryThumbs();
break;
case "trailer" :
var _local5 = (_clips.vidplayer = _mc.attachMovie("videoControl", "vid", _mc.getNextHighestDepth()));
_local5._x = TRAILER_POSITION.x;
_local5._y = TRAILER_POSITION.y;
_local5.bg._width = TRAILER_SIZE.l.w;
_local5.bg._height = TRAILER_SIZE.l.h;
_local5.bg._y = -13 - _local5.bg._height;
_local5.vidHolder_mc._y = _local5.bg._y;
_local5.bar_bg._width = TRAILER_SIZE.l.w;
_local5.bars_mc._width = _local5.bar_bg._width - 19;
_local5.vidHolder_mc.vid._width = TRAILER_SIZE.l.w;
_local5.vidHolder_mc.vid._height = TRAILER_SIZE.l.h;
if (!_vidAudio_mc) {
_vidAudio_mc = _root.createEmptyMovieClip("audio_mc", _root.getNextHighestDepth());
_vidAudio = new Sound(_vidAudio_mc);
}
_vidAudio.setVolume(100);
_vidPlayer = new big.applets.videoplayer.ProgressiveFLVPlayer("http://flash.sonypictures.com/movies/silenthill/site/", _local5.vidHolder_mc, null, _local5.bars_mc, _vidAudio_mc);
_vidPlayer.loadVideo("trailer480x200.flv");
_vidPlayer.addEventListener("onVideoEnd", this);
_local5.play_btn.onClickPlay = big.utils.Delegate.create(this, _onClickPlay, _local5);
_local5.pause_btn.onClickPause = big.utils.Delegate.create(this, _onClickPause, _local5);
_local5.pause_btn.gotoAndPlay("IN");
com.sony.silenthill.site.Main.stopLoop();
var _local8 = new mx.transitions.Tween(_mc, "_alpha", null, 0, 100, 15);
break;
case "cast" :
case "crew" :
_buildTextField(_local9, _local7.subnav[_curName].id);
var _local6 = CASTCREW_NAV;
var _local4 = 0;
while (_local4 < _local7.subnav.length) {
var _local3 = (_clips["sub" + _local4] = _mc.attachMovie("subnav_btn", "sub" + _local4, _mc.getNextHighestDepth()));
_local3._y = _local6.y + ((_local4 * _local6.yspace) - 13);
_local3._x = _local6.x;
_local3.isSubnav = true;
_local3.label_str = _local7.subnav[_local4].label;
_local3.onNavClick = big.utils.Delegate.create(this, _onCastCrewNavClick, _local4);
if (_local4 == _curName) {
_local3.gotoAndPlay("SELECTED");
}
if (com.sony.silenthill.site.DarknessManager.isDark) {
_local3.fog_mc._visible = false;
_startBlink(_local3, 0, 5, 30, 45);
} else {
_local8 = new mx.transitions.Tween(_local3, "_alpha", null, 0, 100, 10);
}
_local4++;
}
var _local10 = (_clips.img = _mc.createEmptyMovieClip("img", _mc.getNextHighestDepth()));
_local10._x = CASTCREW_IMG.x;
_local10._y = CASTCREW_IMG.y;
_assetLoader.loadClip("assets/castcrew/" + _local7.subnav[_curName].jpg, _local10);
_showCharacterName(_local7.subnav[_curName].charactername);
break;
case "wallpapers" :
case "screensavers" :
case "psp" :
case "ipod" :
case "icons" :
case "poster" :
_buildThumbs(_local9);
}
}
function _onCastCrewNavClick($i) {
var _local2 = com.sony.silenthill.site.PageData.getPageByString(_curPage_str);
if (_local2.subnav[$i].id) {
_curTextPage = 0;
_clearTextField();
_buildTextField(_curPage_str, _local2.subnav[$i].id);
_clips["sub" + _curName].gotoAndStop("IDLE");
_curName = $i;
_clips["sub" + _curName].gotoAndPlay("SELECTED");
_clips.img.swapDepths(_mc.getNextHighestDepth());
_assetLoader.loadClip("assets/castcrew/" + _local2.subnav[$i].jpg, _clips.img);
_showCharacterName(_local2.subnav[$i].charactername);
}
}
function _showCharacterName($name_str) {
if (!_clips.charname) {
_clips.charname = _mc.attachMovie("subnav_btn", "charname", _mc.getNextHighestDepth());
}
var _local2 = _clips.charname;
_local2._x = CASTCREW_NAME.x;
_local2._y = CASTCREW_NAME.y;
_local2.isSubnav = true;
_local2.label_str = $name_str;
_local2.gotoAndStop("SELECTED");
if (com.sony.silenthill.site.DarknessManager.isDark) {
_local2.fog_mc._visible = false;
_startBlink(_local2, 0, 5, 30, 45);
} else {
var _local3 = new mx.transitions.Tween(_local2, "_alpha", null, 0, 100, 10);
}
}
function animateOut($nextSection, $nextPage) {
big.utils.Out.info(this, "animateOut");
_nextSection = $nextSection;
_nextPage = $nextPage;
_fadeOutTween = new mx.transitions.Tween(_mc, "_alpha", null, _mc._alpha, 0, 20);
_fadeOutTween.addListener(this);
fadeSound();
}
function onMotionFinished($tween) {
if ($tween == _fadeOutTween) {
_onAnimateOut();
}
if ($tween.obj.removeMe) {
$tween.obj.removeMovieClip();
}
if ($tween == _volumeTween) {
_vidPlayer.reset();
}
}
function _onAnimateOut() {
clearContent();
animateIn(_nextSection, _nextPage);
}
function clearContent() {
for (var _local2 in _clips) {
_clips[_local2].removeMovieClip();
}
if (_curPage_str == "trailer") {
_vidPlayer.unloadVideo();
}
_clips = {};
clearInterval(_texture_int);
}
function onSwitchState($isDark) {
switch (_curPage_str) {
case "wallpapers" :
for (var _local4 in _clips) {
clearInterval(_clips[_local4].hit_int);
_clips[_local4].menu_mc.gotoAndStop("OFF");
if ($isDark) {
_clips[_local4].gotoAndStop("SWITCH");
_startBlink(_clips[_local4].thumb_mc, 10, 20, 30, 45);
}
}
break;
case "cast" :
case "crew" :
case "synopsis" :
clearInterval(_texture_int);
_texture_int = setInterval(this, "_showTextTexture", 5000);
case "screensavers" :
case "photogallery" :
case "icons" :
case "psp" :
case "ipod" :
case "poster" :
if (!$isDark) {
break;
}
for (var _local4 in _clips) {
var _local2 = _clips[_local4];
if ((_curPage_str != "icons") && (_curPage_str != "photogallery")) {
_local2.gotoAndStop("SWITCH");
}
if (_local2 != _clips.texture) {
_startBlink(_local2, 10, 20, 30, 45);
}
if (_local2.isSubnav) {
_local2.fog_mc._visible = false;
}
}
}
}
function onSwitchComplete($isDark) {
}
function _showTextTexture() {
clearInterval(_texture_int);
if (_clips.texture) {
_clips.texture._visible = true;
var _local2 = new mx.transitions.Tween(_clips.texture, "_alpha", null, 0, 100, 20);
}
}
function _startBlink($mc, $pausemin, $pausemax, $blinkmin, $blinkmax) {
$mc.x = $mc._x;
$mc.y = $mc._y;
$mc.pauseLength = big.utils.bsMath.getRandom($pausemin, $pausemax);
$mc.blinkLength = big.utils.bsMath.getRandom($blinkmin, $blinkmax);
$mc.pauseCount = 0;
$mc.blinkCount = 0;
$mc.onEnterFrame = big.utils.Delegate.create(this, _doBlink, $mc);
}
function _doBlink($mc) {
if ($mc.pauseCount >= $mc.pauseLength) {
if (big.utils.bsMath.getRandom(0, 1)) {
$mc.blinkCount++;
if ($mc.blinkCount >= $mc.blinkLength) {
_stopBlink($mc);
} else {
$mc._visible = !$mc._visible;
if ($mc._visible) {
var _local5 = BLUR_VALUES[big.utils.bsMath.getRandom(0, BLUR_VALUES.length)];
var _local4 = BLUR_VALUES[big.utils.bsMath.getRandom(0, BLUR_VALUES.length)];
$mc.filters = [new flash.filters.BlurFilter(_local5, _local4)];
if (_curPage_str == "synopsis") {
var _local3 = big.utils.bsMath.getRandom(-30, 60);
(big.utils.bsMath.getRandom(0, 1) ? ($mc.txt.setTextFormat(DARK_TEXT)) : ($mc.txt.setTextFormat(FOG_TEXT)));
} else {
var _local3 = big.utils.bsMath.getRandom(-10, 10);
}
$mc._x = $mc.x + _local3;
$mc._y = $mc.y + big.utils.bsMath.getRandom(-10, 10);
$mc._rotation = big.utils.bsMath.getRandom(-5, 5);
}
}
}
} else {
$mc.pauseCount++;
}
}
function _stopBlink($mc) {
switch (_curPage_str) {
case "wallpapers" :
$mc._parent.gotoAndStop("IDLE" + com.sony.silenthill.site.DarknessManager.isDark.toString());
break;
case "screensavers" :
case "psp" :
case "ipod" :
case "poster" :
$mc.gotoAndStop("IDLE" + com.sony.silenthill.site.DarknessManager.isDark.toString());
case "icons" :
case "photogallery" :
$mc._visible = true;
$mc.filters = [];
if ($mc == _largeImageHolder) {
$mc._rotation = 0;
}
$mc.onEnterFrame = big.utils.Delegate.create(this, _makeTwitchy, $mc);
break;
case "synopsis" :
case "cast" :
case "crew" :
$mc._visible = true;
$mc.filters = [];
$mc._y = $mc.y;
if (!$mc.isTextField) {
break;
}
$mc._rotation = 0;
$mc.txt.setTextFormat(DARK_TEXT);
}
}
function _makeTwitchy($mc) {
var _local2 = big.utils.bsMath.getRandom(0, 500);
if (_local2 == 500) {
_startBlink($mc, 0, 0, 5, 10);
}
}
function _clearTwitchy($mc) {
delete $mc.onEnterFrame;
}
function _onWallpaperClick($thumb_mc, $size) {
big.utils.Out.info(this, (("onWallpaperClick : " + $thumb_mc.id) + " / ") + $size);
var _local3 = ($thumb_mc.id + 1).toString();
var _local7 = WALLPAPER_SIZES[$size].w;
var _local6 = WALLPAPER_SIZES[$size].h;
var _local5 = ((((("sh_wp" + _local3) + "_") + _local7.toString()) + "x") + _local6.toString()) + ".jpg";
com.sony.silenthill.site.Main.callJS("popWallpapers", {img:_local5, w:_local7, h:_local6});
}
function _onWallpaperOver($thumb_mc) {
$thumb_mc.menu_mc.gotoAndPlay("IN");
var _local3 = com.sony.silenthill.site.DarknessManager.isDark;
$thumb_mc.gotoAndPlay("ROLLOVER" + _local3.toString());
if (_local3) {
delete $thumb_mc.vidHolder.vid.onEnterFrame;
$thumb_mc.vidHolder.vid.gotoAndPlay("OVER");
}
clearInterval($thumb_mc.hit_int);
$thumb_mc.hit_int = setInterval(this, "_checkThumbHit", 500, $thumb_mc);
var _local4 = (_local3 ? ("wp0" + $thumb_mc.id.toString()) : ("wp" + big.utils.bsMath.getRandom(0, 1).toString()));
com.sony.silenthill.site.Main.playSound(_local4);
}
function _checkThumbHit($tmc) {
if (!$tmc.hitTest(_root._xmouse, _root._ymouse)) {
clearInterval($tmc.hit_int);
var _local4 = com.sony.silenthill.site.DarknessManager.isDark;
$tmc.gotoAndPlay("ROLLOUT" + _local4.toString());
$tmc.menu_mc.gotoAndPlay("OUT");
if (_local4) {
$tmc.vidHolder.vid.onEnterFrame = function () {
if (this._currentframe > 1) {
this.prevFrame();
} else {
delete this.onEnterFrame;
}
};
}
}
}
function _animateThumbsIn() {
if (_animCount == _totalThumbs) {
delete _mc.onEnterFrame;
_pageAnimating = false;
} else if (!_animPause) {
var _local2 = (_animCount + _animStart).toString();
_clips["t" + _local2].gotoAndPlay("IN");
_animCount++;
_animPause = 1;
} else {
_animPause--;
}
}
function _onPhotoThumbClick($tmc) {
_curThumb.gotoAndPlay("OFF");
$tmc.gotoAndStop("SELECTED");
_curThumb = $tmc;
var _local2 = _largeImageHolder.getNextHighestDepth();
_nextImage = _largeImageHolder.createEmptyMovieClip("i" + _local2.toString(), _local2);
_nextImage._y = -1000;
_assetLoader.loadClip(com.sony.silenthill.site.PageData.getPageByString("photogallery").largepath + $tmc.filename, _nextImage);
}
function _onPhotoThumbOut($mc) {
$mc.removeMovieClip();
_thumbsOut++;
if (_thumbsOut == _totalThumbs) {
_buildGalleryThumbs();
}
}
function _onThumbClick($id, $isTrigger) {
big.utils.Out.info(this, (((("_onThumbClick : " + _curPage_str) + " / ") + $id) + " / ") + $isTrigger);
if ($isTrigger) {
com.sony.silenthill.site.ExperienceManager.goToExperience();
} else {
switch (_curPage_str) {
case "icons" :
var _local5 = ("sh_icon" + $id.toString()) + ".gif";
com.sony.silenthill.site.Main.callJS("popIcons", {img:_local5});
break;
case "screensavers" :
var _local4 = $id - 7;
com.sony.silenthill.site.Main.callJS("popScreensavers", {id:_local4});
break;
case "ipod" :
var _local2 = "downloads/ipod/silenthill_trailer_ipod.zip";
(com.sony.silenthill.site.Constants.__get__IS_IN_BROWSER() ? (getURL (_local2)) : (big.utils.Out.info(this, _local2)));
break;
case "psp" :
_local2 = "downloads/psp/" + PSP_FILES[$id];
(com.sony.silenthill.site.Constants.__get__IS_IN_BROWSER() ? (getURL (_local2)) : (big.utils.Out.info(this, _local2)));
break;
case "poster" :
com.sony.silenthill.site.Main.callJS("popPoster");
}
}
}
function _onClickPause($mc) {
_vidPlayer.pauseVideo();
$mc.play_btn.gotoAndPlay("IN");
$mc.pause_btn.gotoAndPlay("OUT");
}
function _onClickPlay($mc) {
_vidPlayer.playVideo();
$mc.play_btn.gotoAndPlay("OUT");
$mc.pause_btn.gotoAndPlay("IN");
}
function onVideoEnd() {
var _local2 = _clips.vidplayer;
_local2.play_btn.gotoAndPlay("IN");
_local2.pause_btn.gotoAndPlay("OUT");
}
function get vol() {
return(_contentVolume);
}
function set vol($v) {
_contentVolume = $v;
_contentSound.setVolume($v);
_vidAudio.setVolume($v);
//return(vol);
}
function fadeSound() {
_volumeTween = new mx.transitions.Tween(this, "vol", null, _contentVolume, 0, 18);
_volumeTween.addListener(this);
}
var _classname = "Content";
var _clips = {};
var BLUR_VALUES = [0, 2, 4, 8, 16, 32];
var ARROW_POSITION = {x:300, y:440};
var TF_POSITION = {synopsis:{x:312, y:440, yspace:15}, cast:{x:405, y:440, yspace:15}, crew:{x:405, y:440, yspace:15}};
var THUMB_POSITION = {wallpapers:{x:312, y:440, xspace:250, yspace:160, cols:2, h:150, perpage:4}, icons:{x:312, y:440, xspace:80, yspace:80, cols:3, h:50, perpage:9}, screensavers:{x:312, y:440, xspace:250, yspace:160, cols:2, h:150, perpage:4}, psp:{x:312, y:440, xspace:250, yspace:160, cols:2, h:150, perpage:4}, ipod:{x:312, y:440, xspace:250, yspace:160, cols:2, h:150, perpage:4}, poster:{x:312, y:440, xspace:250, yspace:160, cols:1, h:150, perpage:4}};
var CASTCREW_IMG = {x:640, y:190};
var CASTCREW_NAV = {x:263, y:440, yspace:-15};
var CASTCREW_NAME = {x:843, y:440};
var CASTCREW_ARROWS = {x:390, y:440};
var TRAILER_POSITION = {x:312, y:440};
var TRAILER_SIZE = {xl:{w:800}, l:{w:480, h:200}, m:{w:360}, s:{w:240}};
var GALLERY_THUMB_POS = {x:770, y:440, yspace:-30, xspace:45, cols:3, rows:5, h:25, perpage:15};
var GALLERY_LARGE_POS = {x:312, y:140};
var GALLERY_ARROWS = {x:910, y:440};
var WALLPAPER_SIZES = [{w:1024, h:768}, {w:1280, h:1024}, {w:1600, h:1200}];
var PSP_FILES = ["", "", "", "", "silenthill_wallpapers_psp.zip", "", "", "", "", "silenthill_trailer_psp.zip"];
}
Symbol 95 MovieClip [__Packages.big.applets.videoplayer.ProgressiveFLVPlayer] Frame 0
class big.applets.videoplayer.ProgressiveFLVPlayer
{
var _netconnection, _stream, _video_mc, _audio_mc, _controls_mc, _buffer_mc, _scrubberMinX, _scrubberMaxX, _scrubberDist, _isMiddle, _isEnd, dispatchEvent;
function ProgressiveFLVPlayer (video_path, video_mc, controls_mc, buffer_mc, audio_mc) {
big.events.EventDispatcher.initialize(this);
_netconnection = new NetConnection();
_netconnection.connect(null);
_stream = new NetStream(_netconnection);
_stream.setBufferTime(5);
_stream.onStatus = mx.utils.Delegate.create(this, _onStreamStatus);
_stream.onMetaData = mx.utils.Delegate.create(this, _onStreamData);
_video_path = video_path;
_video_mc = video_mc;
_video_mc.vid.attachVideo(_stream);
_audio_mc = (audio_mc ? (audio_mc) : (_video_mc.createEmptyMovieClip("audio", _video_mc.getNextHighestDepth())));
_audio_mc.attachAudio(_stream);
_controls_mc = controls_mc;
_buffer_mc = buffer_mc;
_buffer_mc.playprogress._xscale = 0;
_buffer_mc.progress._xscale = 0;
_initControls();
}
function _initControls() {
var _local2 = _controls_mc;
_local2.scrubber_mc.onPress = mx.utils.Delegate.create(this, onScrubberPress);
_local2.scrubber_mc.onRelease = mx.utils.Delegate.create(this, onScrubberRelease);
_local2.scrubber_mc.onReleaseOutside = _local2.scrubber_mc.onRelease;
_scrubberMinX = _local2.scrubber_mc._x;
_scrubberMaxX = _scrubberMinX + _local2.scrubber_bar_mc._width;
_scrubberDist = _scrubberMaxX - _scrubberMinX;
}
function initSpecialControls($mc, $min, $max) {
_controls_mc = $mc;
_initControls();
_scrubberMinX = $min;
_scrubberMaxX = $max;
_scrubberDist = _scrubberMaxX - _scrubberMinX;
if (!_isPlaying) {
_whilePlaying();
}
}
function loadVideo(file) {
reset();
_video_file = file;
_stream.play(_video_path + _video_file);
clearInterval(_loadInterval);
_loadInterval = setInterval(this, "_whileLoading", POLL_FREQUENCY);
}
function unloadVideo() {
reset();
}
function reset() {
pauseVideo();
_video_mc.vid.clear();
clearInterval(_loadInterval);
clearInterval(_interval);
_isMiddle = (_isEnd = (_isPlaying = false));
_video_floaded = (_video_bloaded = 0);
_video_ftotal = (_video_btotal = 1);
}
function killStream() {
reset();
delete _stream;
delete _netconnection;
}
function playVideo() {
if (_isEnd) {
_isMiddle = (_isEnd = false);
_stream.seek(0);
}
clearInterval(_interval);
_interval = setInterval(this, "_whilePlaying", POLL_FREQUENCY);
_isPlaying = true;
_stream.pause(false);
}
function pauseVideo() {
_isPlaying = false;
_stream.pause(true);
}
function onScrubberPress() {
var _local2 = _controls_mc.scrubber_mc;
var _local3 = _video_mc;
var _local5 = _scrubberMinX;
var _local4 = _scrubberMinX + Math.round((_scrubberDist * _stream.bytesLoaded) / _stream.bytesTotal);
clearInterval(_interval);
_local3.stop();
_local2.startDrag(false, _local5, _local2._y, _local4, _local2._y);
_interval = setInterval(this, "_whileScrubbing", POLL_FREQUENCY);
}
function onScrubberRelease() {
var _local2 = _controls_mc.scrubber_mc;
_local2.stopDrag();
clearInterval(_interval);
if (_isPlaying) {
playVideo();
}
}
function _whileScrubbing() {
var _local3 = _controls_mc.scrubber_mc;
var _local2 = (_local3._x - _scrubberMinX) / _scrubberDist;
_stream.seek(_video_ftotal * _local2);
}
function _onStreamStatus($obj) {
switch ($obj.code) {
case "NetStream.Play.Start" :
case "NetStream.Buffer.Full" :
if (_isPlaying) {
break;
}
playVideo();
}
}
function _onStreamData($obj) {
_video_ftotal = $obj.duration;
}
function _whilePlaying() {
var _local3 = _controls_mc.scrubber_mc;
var _local2 = _stream.time / _video_ftotal;
if ((Math.floor(_local2 * 100) >= 50) && (!_isMiddle)) {
_isMiddle = true;
}
if ((Math.floor(_local2 * 100) >= 99) && (!_isEnd)) {
_isEnd = true;
dispatchEvent({type:"onVideoEnd", target:this});
}
_local3._x = _scrubberMinX + (_local2 * _scrubberDist);
_buffer_mc.playprogress._xscale = _local2 * 100;
}
function _whileLoading() {
_video_bloaded = _stream.bytesLoaded;
_video_btotal = _stream.bytesTotal;
var _local2 = (100 * _video_bloaded) / _video_btotal;
_buffer_mc.progress._xscale = _local2;
if ((_buffer_mc.progress != undefined) && (_buffer_mc.progress._xscale >= 98)) {
clearInterval(_loadInterval);
}
}
var _classname = "ProgressiveFLVPlayer";
var _video_path = "";
var _video_file = "";
var _video_floaded = 0;
var _video_ftotal = 1;
var _video_bloaded = 0;
var _video_btotal = 1;
var _isBuffering = false;
var _isPlaying = false;
var _interval = -1;
var _loadInterval = -1;
var DEFAULT_VOLUME = 100;
var BUFFER_FRAMES = 200;
var POLL_FREQUENCY = 30;
}
Symbol 96 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 97 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 98 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 99 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(Math.round(func(t, begin, change, _duration)));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 100 MovieClip [__Packages.big.sound.SoundControl] Frame 0
class big.sound.SoundControl
{
var id, master_vol_ref, _master, sounds, fadetween;
function SoundControl (str) {
mx.events.EventDispatcher.initialize(this);
id = str;
master_vol_ref = 1;
_master = 100;
sounds = new Object();
}
function addSound(sound_id, source_mc, alt_id) {
var _local2 = ((alt_id != undefined) ? (alt_id) : (sound_id));
if (!this[_local2]) {
if (source_mc.soundcontrol_top) {
source_mc.soundcontrol_top++;
} else {
source_mc.soundcontrol_top = 99999 /* 0x01869F */;
}
var _local4 = source_mc.createEmptyMovieClip(_local2 + "_SoundControl_mc", source_mc.soundcontrol_top);
var _local5 = (sounds[_local2] = new big.sound.ScSound(_local4, this, sound_id));
_local5.attachSound(sound_id);
} else {
trace((("ERROR: " + id) + ".addSound :: a sound already exists with id: ") + _local2);
}
}
function addClip($sound_id, $mc) {
if (!this[$sound_id]) {
sounds[$sound_id] = new big.sound.ScSound($mc, this);
} else {
trace((("ERROR: " + id) + ".addClip :: a sound already exists with id: ") + $sound_id);
}
}
function removeSound(sound_id) {
if (!sounds[sound_id].isClip) {
stopSound(sound_id);
sounds[sound_id].mc.removeMovieClip();
}
delete sounds[sound_id];
}
function removeAllSounds() {
for (var _local2 in sounds) {
removeSound(_local2);
}
}
function traceSounds() {
trace("sounds --- ");
for (var _local2 in sounds) {
trace(_local2);
}
trace("-----");
}
function set master(vol) {
_master = vol;
master_vol_ref = vol / 100;
for (var _local3 in sounds) {
var _local2 = sounds[_local3];
setSoundVolume(_local3, _local2.vol);
}
//return(master);
}
function get master() {
return(_master);
}
function setMasterVolume(v) {
master = (v);
}
function fadeAll(target_vol, dur) {
fadetween = new mx.transitions.Tween(this, "master", null, master, target_vol, dur);
fadetween.addListener(this);
}
function onMotionFinished() {
fadetween.removeListener(this);
}
function getSoundObj(sound_id) {
var _local2 = sounds[sound_id];
if (_local2) {
return(_local2);
}
trace((("ERROR: " + id) + " :: there is no sound with id: ") + sound_id);
return(null);
}
function setSoundVolume(sound_id, vol) {
var _local2 = getSoundObj(sound_id);
if (_local2) {
abortFade(sound_id);
_local2.vol = vol;
}
}
function setSoundPan(sound_id, p) {
var _local2 = getSoundObj(sound_id);
if (_local2) {
abortFadePan(sound_id);
_local2.pan = p;
}
}
function startSound(sound_id, vol, start_pos, loop) {
var _local2 = getSoundObj(sound_id);
if (_local2) {
if (start_pos == undefined) {
start_pos = 0;
}
if (loop == undefined) {
loop = 0;
}
if (vol == undefined) {
vol = _local2.vol;
}
stopSound(sound_id);
_local2.vol = vol;
_local2.startPlaying(start_pos, loop);
} else {
trace("SoundControl.startSound :: there is no sound called " + sound_id);
}
}
function stopSound(sound_id) {
var _local2 = getSoundObj(sound_id);
if (_local2) {
abortFade(sound_id);
_local2.stopPlaying();
}
}
function fadeSound(sound_id, target_vol, dur) {
abortFade(sound_id);
var _local2 = getSoundObj(sound_id);
if (_local2) {
if ((!_local2.isClip) && (!_local2.playing)) {
startSound(sound_id, 0, 0, 99999);
}
_local2.fadetween = new mx.transitions.Tween(_local2, "vol", null, _local2.vol, target_vol, dur);
_local2.fadetween.addListener(_local2);
}
}
function abortFade(sound_id) {
var _local2 = getSoundObj(sound_id);
if (_local2) {
_local2.fadetween.stop();
}
}
function fadePan(sound_id, target_pan, dur) {
abortFadePan(sound_id);
var _local2 = getSoundObj(sound_id);
if (_local2) {
if ((!_local2.playing) && (!_local2.isClip)) {
startSound(sound_id, 0, 0, 99999);
}
_local2.pantween = new mx.transitions.Tween(_local2, "pan", null, _local2.pan, target_pan, dur);
_local2.pantween.addListener(_local2);
}
}
function abortFadePan(sound_id) {
var _local2 = getSoundObj(sound_id);
if (_local2) {
_local2.pantween.stop();
}
}
var className = "SoundControl";
}
Symbol 101 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 102 MovieClip [__Packages.big.sound.ScSound] Frame 0
class big.sound.ScSound extends Sound
{
var parent_sc, mc, isClip, sound_id, playing, _vol, setVolume, _pan, setPan, start, stop;
function ScSound (clip, sc_obj, sid) {
super(clip);
parent_sc = sc_obj;
mc = clip;
if (sid == undefined) {
isClip = true;
} else {
sound_id = sid;
}
playing = false;
vol = (100);
}
function set vol(v) {
if (v <= 0) {
v = 0;
}
_vol = v;
setVolume(v * parent_sc.master_vol_ref);
//return(vol);
}
function get vol() {
return(_vol);
}
function set pan(p) {
_pan = p;
setPan(p);
//return(pan);
}
function get pan() {
return(_pan);
}
function onSoundComplete() {
playing = false;
}
function onMotionFinished() {
if ((!_vol) && (!isClip)) {
stopPlaying();
}
}
function startPlaying(p, l) {
if (!isClip) {
start(p, l);
playing = true;
}
}
function stopPlaying() {
if (!isClip) {
stop(sound_id);
playing = false;
}
}
var className = "ScSound";
}
Symbol 30 MovieClip Frame 1
stop();
Symbol 30 MovieClip Frame 2
stop();
Symbol 40 MovieClip Frame 110
gotoAndPlay (1);
Symbol 40 MovieClip Frame 111
stop();
Symbol 44 Button
on (release) {
gotoAndPlay ("phone_grow");
bg_anims.phone.onEnterFrame = function () {
this._alpha = this._alpha + ((-this._alpha) / 6);
if (this._alpha <= 0.2) {
this._alpha = 0;
this.onEnterFrame = eval (null)();
}
};
}
Symbol 58 Button
on (release) {
gotoAndStop ("btn_up");
this.screen.play();
this.onRelease = eval (null)();
this.onPress = eval (null)();
this.useHandCursor = false;
}
on (press) {
gotoAndStop ("btn_down");
_parent._parent.bg_anims.phone.gotoAndStop("OFF");
}
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 114
Symbol 70 MovieClip Frame 222
stop();
_parent._parent._parent.gotoAndPlay("phone_click");
Symbol 72 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 5
stop();
Symbol 73 MovieClip Frame 1
gotoAndPlay(random(this._totalframes));
Symbol 73 MovieClip Frame 20
gotoAndPlay(random(this._totalframes));
Symbol 78 MovieClip Frame 1
stop();
Symbol 78 MovieClip Frame 84
stop();
Symbol 83 MovieClip Frame 243
_parent.play();
stop();