• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Link from an html (href) to a frame ANCHOR name inside an Animation

New Here ,
Jun 05, 2019 Jun 05, 2019

Copy link to clipboard

Copied

I made an interactive wayfinding map for a hotel, but they want me to create a link from one page, like the restaurant page, to the page that has the Adobe Animate file with the map, but open on the frame that has the path drawn to the restaurant. Currently it opens on the first frame. is there a way to add an "anchor" to the link so it opens the animation, and takes you to the named frame? I saw that in frame labels you have TYPES, which are "Name", "Comment" and "Anchor". i was hoping that maybe i aim to the page that has the animation in html 5 inserted and by some miracle the "href="https://www.domain.com/map.html#anchorname"would take me there, but it didn't. I haved searched all over, but my google hits have nothing to do with what I need.

Views

807

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
community guidelines
LEGEND ,
Jun 05, 2019 Jun 05, 2019

Copy link to clipboard

Copied

No, there is nothing that will do this automatically. Use JavaScript in your Animate file to extract the anchor from the current URL and then do whatever you need to do with that.

https://itsybitsybytes.com/how-to-get-the-url-anchor-with-javascript/

Votes

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
community guidelines
New Here ,
Jun 07, 2019 Jun 07, 2019

Copy link to clipboard

Copied

Thanks for your response. I am a designer, not a coder, but I will pass this to a developer friend of mine and he can probably make it work.

Votes

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
community guidelines
Community Expert ,
Jun 05, 2019 Jun 05, 2019

Copy link to clipboard

Copied

use your anchor link with the #anchorname and in animate parse it in frame 1:

if(document.location.href.indexOf('#')>-1){

this.gotoAndStop(document.location.href.split('#')[1]);

}

Votes

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
community guidelines
New Here ,
Jun 07, 2019 Jun 07, 2019

Copy link to clipboard

Copied

I tried adding this line of code to the first frame in actionscript, and the animation wouldnt load anything after that, so I am sure I am not doing it right. My excuse is I dont know programming. I can only do basic stuff in Adobe Animate, and nothing in Actionscript unless I use the wizard or code snippets. But I do have developer friend, so i will bug them into looking at this and the other responses. Thank you!

Votes

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
community guidelines
Community Expert ,
Jun 07, 2019 Jun 07, 2019

Copy link to clipboard

Copied

oops, another typo.  use:

if(document.location.href.indexOf('#')>-1){

this.gotoAndStop(document.location.href.split('#')[1]);

}

Votes

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
community guidelines
New Here ,
Jun 07, 2019 Jun 07, 2019

Copy link to clipboard

Copied

That worked perfectly right off the bat!!!

Thank you so much!

Votes

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
community guidelines
Community Expert ,
Jun 07, 2019 Jun 07, 2019

Copy link to clipboard

Copied

you're welcome.

Votes

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
community guidelines
New Here ,
Jun 21, 2019 Jun 21, 2019

Copy link to clipboard

Copied

kglad, would you happen to know if i can do the same with an swf file? would you know the actionscript I could use that might detect the anchor from a link and go to the right frame inside an swf?

Votes

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
community guidelines
LEGEND ,
Jun 21, 2019 Jun 21, 2019

Copy link to clipboard

Copied

Come on, at least try to figure things out on your own before asking other people to solve your problems for you.

https://stackoverflow.com/questions/2127962/get-current-browser-url-actionscript-3

Votes

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
community guidelines
New Here ,
Jun 21, 2019 Jun 21, 2019

Copy link to clipboard

Copied

LATEST

I dont mean to come across as lazy. I dont know scripting AT ALL. My background is all graphics side. I can copy paste stuff, but if it doesnt work, I would have zero idea how to fix. I build dumb blondes. I can make them look good but they cant do anything.

Votes

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
community guidelines
Community Expert ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

Be sure to check out your code snippets.

Screen Shot 2019-06-06 at 3.57.48 PM.png

Votes

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
community guidelines
LEGEND ,
Jun 06, 2019 Jun 06, 2019

Copy link to clipboard

Copied

That code snippet is not helpful.

Votes

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
community guidelines
New Here ,
Jun 07, 2019 Jun 07, 2019

Copy link to clipboard

Copied

I saw that, but the point is I need to load an animation I made, and it needs to load the page with the adobe animate html5, and go straigth to 160 (which I would name "restaurant1" in frame labels and/or frame anchors) if I click on one button, and fo to frame 225 if I click on another button, and so forth. This code snippet loads external html.

Votes

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
community guidelines