Highlighted

add a web link to a popup menu

Contributor ,
Jun 14, 2019

Copy link to clipboard

Copied

I'm publishing to HTML5 and I have a button on a graphic that causes a popup menu to appear. I want each menuitem to launch a webpage. I have a hotspot over the menu graphic and am trying to put a web link to it, but not getting the actionscript right. i tried adding it within the menuitem symbol using:

this.updates_june.addEventListener("click", fl_ClickToGoToWebPage_7);

function fl_ClickToGoToWebPage_7() {

  window.open("http://www.adobe.com", "_blank");

}

and also on the main level using:

this.menu_june.updates_june.addEventListener("click", fl_ClickToGoToWebPage_7);

function fl_ClickToGoToWebPage_7() {

  window.open("http://www.adobe.com", "_blank");

}

neither seems to work. The popup menu appears fine when I mouseover the graphic.

I think i figured it out. the symbol with the menu was a layer below the hotspot for the button that triggered it. Once I moved it above it began to work. Thanks for your help!

Views

164

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

add a web link to a popup menu

Contributor ,
Jun 14, 2019

Copy link to clipboard

Copied

I'm publishing to HTML5 and I have a button on a graphic that causes a popup menu to appear. I want each menuitem to launch a webpage. I have a hotspot over the menu graphic and am trying to put a web link to it, but not getting the actionscript right. i tried adding it within the menuitem symbol using:

this.updates_june.addEventListener("click", fl_ClickToGoToWebPage_7);

function fl_ClickToGoToWebPage_7() {

  window.open("http://www.adobe.com", "_blank");

}

and also on the main level using:

this.menu_june.updates_june.addEventListener("click", fl_ClickToGoToWebPage_7);

function fl_ClickToGoToWebPage_7() {

  window.open("http://www.adobe.com", "_blank");

}

neither seems to work. The popup menu appears fine when I mouseover the graphic.

I think i figured it out. the symbol with the menu was a layer below the hotspot for the button that triggered it. Once I moved it above it began to work. Thanks for your help!

Views

165

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 14, 2019 0
Adobe Community Professional ,
Jun 14, 2019

Copy link to clipboard

Copied

the code snippet should be on the same timeline as the one that contains updates_june and the second should be on the timeline that contains menu_june.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 0
Contributor ,
Jun 14, 2019

Copy link to clipboard

Copied

I tried it each way separately but neither way worked.

I have a link working on the main timeline, but when I put one within a symbol it doesn't work.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 0
Adobe Community Professional ,
Jun 14, 2019

Copy link to clipboard

Copied

is updates_june on the main timeline?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 0
Contributor ,
Jun 14, 2019

Copy link to clipboard

Copied

No it is within the symbol menu_june.

menu_june is on the main timeline.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 0
Adobe Community Professional ,
Jun 14, 2019

Copy link to clipboard

Copied

is updates_june in the first frame of menu_june?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 0
Contributor ,
Jun 14, 2019

Copy link to clipboard

Copied

Yes. it is only a 1 frame timeline.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 0
Contributor ,
Jun 14, 2019

Copy link to clipboard

Copied

I think i figured it out. the symbol with the menu was a layer below the hotspot for the button that triggered it. Once I moved it above it began to work. Thanks for your help!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 0
Adobe Community Professional ,
Jun 14, 2019

Copy link to clipboard

Copied

you're welcome.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 0
pbesong LATEST
Contributor ,
Jun 14, 2019

Copy link to clipboard

Copied

now for some reason the mouseout for the menu is firing even when i'm still on it. so frustrating!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 14, 2019 0