For some reason I can not figure out why my swf will not load correctly? It for some reason will not play from frame1, it skips to a later frame for some reason. Other than that it works perfect.
AS Code on Frame 1:
The bolded if then statement seems to be not working correctly??Code:// SWFAddress code #include "includes/SWFAddress.as" // Custom utilities function replace(str, find, replace) { return str.split(find).join(replace); } function toTitleCase(str) { return str.substr(0,1).toUpperCase() + str.substr(1).toLowerCase(); } function getIndex(arr, obj) { for (var i = 0; i < arr.length; i++) { if (arr[i] == obj) { return i; } } } function formatTitle(addr) { if (addr.substr(addr.length - 1, 1) == '/') { addr = addr.substr(0, addr.length - 1); } return 'STATUS COUTURE' + ((addr.length > 0) ? ' / ' + toTitleCase(replace(addr.substr(1), '/', ' / ')) : ''); } // SWFAddress handling SWFAddress.onChange = function() { var arr = new Array('', '/travel/', '/dining/', '/entertainment/', '/shopping/', '/information/', '/event-planning/', '/connections/', '/business-services/', '/lifestyle-management/', '/who-we-are/', '/what-we-do/', '/our-members/', '/contact-us/'); var addr = SWFAddress.getValue(); if (_currentframe == 1 && addr == '') { play(); } else { gotoAndPlay(126 + 17*getIndex(arr, addr)); } SWFAddress.setTitle(formatTitle(addr)); } _root.cursor_mc.swapDepths(1000); _root.onEnterFrame = function() { Mouse.hide(); cursor_mc._x = _root._xmouse; cursor_mc._y = _root._ymouse; } var buttonSound:Sound = new Sound(); menu.onRollOver = function() { _root.buttonSound.attachSound("RollOver"); _root.buttonSound.start(); }





Bookmarks