Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/05/2010, 17:06
Mircastle
 
Fecha de Ingreso: mayo-2010
Mensajes: 7
Antigüedad: 14 años, 6 meses
Puntos: 0
Pregunta error de sintaxis

Me baje un menu en flash me tira este error,no le modifique nada, estaba en swf y lo converti a .fla aca el mainTimeline

El error que me da es
1084: Error de sintaxis: se esperaba identifier antes de 8.

Dice que en la linea 1, Espero su ayuda

package 8_fla
{
import flash.display.*;
import flash.events.*;
import flash.net.*;
import vortex.components.*;
import vortex.events.*;
import vortex.utils.*;

dynamic public class MainTimeline extends MovieClip
{
public var totalItems:Number;
public var itemsText:Array;
public var myWindow:SWindow;
public var subMenusSpeed:Number;
public var id:Number;
public var mainButtonsWidth:Number;
public var menuText:Array;
public var myMenu:SAccordionMenu;
public var menuTextTemp:String;
public var windowTitle:String;
public var skinXml:Skin_Xml;
public var displayWindow:Boolean;
public var sep:String;
public var i:Number;
public var finalStageHeight:Number;
public var menuLinkTemp:String;
public var subMenusButtonsVSpacing:Number;
public var content:Sprite;
public var mainButtonsVSpacing:Number;
public var subMenusWidth:Number;
public var subMenusTopPadding:Number;
public var style:String;
public var finalStageWidth:Number;
public var menuPadding:Number;
public var itemsTarget:Array;
public var myLink:LinkBack;
public var subMenusDynamics:String;
public var menuTarget:Array;
public var menuTargetTemp:String;
public var subMenusLeftPadding:Number;
public var itemsLink:Array;
public var myResizer:Resizer;
public var menuLink:Array;

public function MainTimeline()
{
addFrameScript(0, frame1, 1, frame2);
return;
}// end function

function frame2()
{
sep = String.fromCharCode(13);
menuTextTemp = rTrim("Click Me !\r-Google\r-Yahoo\r-Facebook\r-Youtube\rClick Me !\r-Google\r-Yahoo\r-Facebook\r-Youtube");
menuLinkTemp = rTrim("\rhttp://www.google.com\rhttp://www.yahoo.com\rhttp://www.facebook.com\rhttp://www.youtube.com\r\rhttp://www.google.com\rhttp://www.yahoo.com\rhttp://www.facebook.com\rhttp://www.youtube.com");
menuTargetTemp = rTrim("");
menuText = menuTextTemp.split(sep);
menuLink = menuLinkTemp.split(sep);
menuTarget = menuTargetTemp.split(sep);
mainButtonsWidth = isNaN(parseInt("120")) ? (120) : (parseInt("120"));
mainButtonsVSpacing = isNaN(parseInt("2")) ? (2) : (parseInt("2"));
subMenusTopPadding = isNaN(parseInt("2")) ? (2) : (parseInt("2"));
subMenusLeftPadding = isNaN(parseInt("5")) ? (5) : (parseInt("5"));
subMenusWidth = isNaN(parseInt("120")) ? (120) : (parseInt("120"));
subMenusButtonsVSpacing = isNaN(parseInt("2")) ? (2) : (parseInt("2"));
subMenusSpeed = isNaN(parseInt("150")) ? (150) : (parseInt("150"));
menuPadding = isNaN(parseInt("2")) ? (2) : (parseInt("2"));
windowTitle = "Menu";
subMenusDynamics = "regular";
displayWindow = parseInt("1") == 1 ? (true) : (false);
style = "simultaneous";
i = 0;
id = 0;
totalItems = menuText.length;
itemsText = new Array();
itemsLink = new Array();
itemsTarget = new Array();
while (i < totalItems)
{

itemsText[id] = new Object();
itemsLink[id] = new Object();
itemsTarget[id] = new Object();
itemsText[id].mainButtonText = menuText[i];
itemsLink[id].mainButtonLink = menuLink[i];
itemsTarget[id].mainButtonTarget = menuTarget[i];
i++;
if (menuText[i] != undefined && menuText[i].charAt(0) == "-")
{
itemsText[id].subButtonsText = new Array();
itemsLink[id].subButtonsLink = new Array();
itemsTarget[id].subButtonsTarget = new Array();
while (menuText[i] != undefined && menuText[i].charAt(0) == "-")
{

itemsText[id].subButtonsText.push(menuText[i].substr(1));
itemsLink[id].subButtonsLink.push(menuLink[i]);
itemsTarget[id].subButtonsTarget.push(menuTarget[i]);
i++;
}
}
id++;
}
myMenu = new SAccordionMenu(itemsText, skinXml.skin);
myMenu.mainButtonsWidth = mainButtonsWidth;
myMenu.mainButtonsVSpacing = mainButtonsVSpacing;
myMenu.subMenusTopPadding = subMenusTopPadding;
myMenu.subMenusLeftPadding = subMenusLeftPadding;
myMenu.subMenusWidth = subMenusWidth;
myMenu.subMenusButtonsVSpacing = subMenusButtonsVSpacing;
myMenu.subMenusDynamics = subMenusDynamics;
myMenu.subMenusSpeed = subMenusSpeed;
myMenu.style = style;
myMenu.maxHeightSprite = true;
myMenu.addEventListener(MenuEvent.ITEM_SELECTED, itemSelected);
myMenu.draw();
myLink = new LinkBack(this);
myLink.dataString = "0_283_";
if (displayWindow == true)
{
content = new Sprite();
content.addChild(myMenu);
content.addChild(myLink);
myLink.yPosition = myMenu.y + myMenu.maxMenuHeight + 2;
myLink.xPosition = Math.floor(myMenu.width / 2 - myLink.width / 2);
if (myLink.x < 0)
{
myLink.x = 0;
}
myWindow = new SWindow();
myWindow.setSkin(skinXml.skin);
myWindow.title = windowTitle;
myWindow.height = -1;
myWindow.width = -1;
myWindow.content = content;
myWindow.contentPadding = menuPadding;
myWindow.x = 0;
myWindow.y = 0;
myWindow.draw();
addChild(myWindow);
finalStageWidth = new Number(myWindow.width);
finalStageHeight = new Number(myWindow.height);
}
else
{
this.addChild(myMenu);
this.addChild(myLink);
myMenu.x = menuPadding;
myMenu.y = menuPadding;
myLink.yPosition = myMenu.y + myMenu.maxMenuHeight + 2;
myLink.xPosition = myMenu.x + Math.floor((myMenu.width - myLink.width) / 2);
if (myLink.x < 0)
{
myLink.x = 0;
}
finalStageWidth = new Number(menuPadding + myMenu.width + menuPadding);
finalStageHeight = new Number(myLink.y + myLink.height + menuPadding);
}
myResizer = new Resizer(stage);
myResizer.newWidth = finalStageWidth;
myResizer.newHeight = finalStageHeight;
myResizer.resize();
stop();
return;
}// end function

function frame1()
{
skinXml = new Skin_Xml();
return;
}// end function

public function rTrim(param1:String) : String
{
var _loc_2:int;
while (param1.charCodeAt(_loc_2--) < 32)
{

param1 = param1.substring(0, param1.length--);
}
return param1;
}// end function

public function itemSelected(param1:Event) : void
{
var _loc_2:String;
var _loc_3:String;
var _loc_4:Number;
var _loc_5:Number;
var _loc_6:URLRequest;
_loc_4 = param1["mainButtonIndex"];
_loc_5 = param1["subButtonIndex"];
if (_loc_5 == -1)
{
_loc_2 = itemsLink[_loc_4].mainButtonLink;
_loc_3 = itemsTarget[_loc_4].mainButtonTarget;
}
else
{
_loc_2 = itemsLink[_loc_4].subButtonsLink[_loc_5];
_loc_3 = itemsTarget[_loc_4].subButtonsTarget[_loc_5];
}
_loc_6 = new URLRequest(_loc_2);
if (_loc_3 == null)
{
_loc_3 = "";
}
navigateToURL(_loc_6, _loc_3);
return;
}// end function

}
}