Есть небольшая проблема, я к сожалению не силен в программировании, но пожалуйста помогите.
Вот функции вызова кнопок управления галереей. Мне нужно убрать их, а вместо сделать чтоб при нажатии на картинку они просто переходили на ссылку которая указана в xml файле, в данном случае это происходит, при нажатии галерею а потом на кнопку link.

Код AS1/AS2:
Oprivate function createControls():MovieClip {
// This function creates the control elements (PLAY, STOP, LINK, INFO) every time a new content is opened. Which control
// elements are included, depends on the type of content and the existence of hyperlinks or info texts. It returns a MovieClip
// containing the different control elements.
controls = new MovieClip();
controls.alpha = 0;
// Setting up the controls, if the current content is an Image.
if (_xml.Contents.child(currentImage).name() == "Image") {
if (_xml.Contents.child(currentImage).Text != undefined && _xml.Contents.child(currentImage).Text != "") {
var imageInfo:MovieClip = setupControl("info");
imageInfo.button.addEventListener(MouseEvent.CLICK, showInfo);
controls.addChild(imageInfo);
}
if (int(_xml.Settings.@Autoplay) > 0) {
var autoplay:MovieClip;
if (isPlaying) {
autoplay = setupControl("stop");
}
else {
autoplay = setupControl("play");
}
autoplay.x = controls.numChildren * (int(_xml.Settings.@ControlSize) + int(_xml.Settings.@ControlDistance));
autoplay.button.addEventListener(MouseEvent.CLICK, startStopAutoplay);
controls.addChild(autoplay);
}
if (_xml.Contents.child(currentImage).Hyperlink.@URL != undefined && _xml.Contents.child(currentImage).Hyperlink.@URL != "") {
var href:MovieClip = setupControl("link");
href.button.addEventListener(MouseEvent.CLICK, hyperlink);
href.x = controls.numChildren * (int(_xml.Settings.@ControlSize) + int(_xml.Settings.@ControlDistance));
controls.addChild(href);
}
}
Я сделал так, но у меня не получилось

Код AS3:
private function createControls():MovieClip {
// This function creates the control elements (PLAY, STOP, LINK, INFO) every time a new content is opened. Which control
// elements are included, depends on the type of content and the existence of hyperlinks or info texts. It returns a MovieClip
// containing the different control elements.
controls = new MovieClip();
controls.alpha = 0;
// Setting up the controls, if the current content is an Image.
if (_xml.Contents.child(currentImage).name() == "Image") {
if (_xml.Contents.child(currentImage).Hyperlink.@URL != undefined && _xml.Contents.child(currentImage).Hyperlink.@URL != "")
onclick.addEventListener(MouseEvent.CLICK, hyperlink);
}