1

I have an HTML page with a Flash animation inside of it. In my page, I created some anchors like this example :

<a id="p1"><h1>Title 1</h1>

My goal is to access to this anchor with AS3 from a button, so I wrote this :

function re(event:MouseEvent):void
{
    navigateToURL(new URLRequest("text.html/#p1"),"_parent"
    );
}

It works, however it removes the swf file from the page. Maybe I found the issue, after clicking to the button, I got the HTML link without the #p1.

Do you have a way to get this link with the anchor in AS3 ?

In that case I think it would scroll the page until the anchor without removing the swf file...

A. John
  • 31
  • 1
  • 6
  • Try using AS3's `externalInterface` to run a JS function in your page, where function should do the `#p1` scroll. _It might just work..._ – VC.One Jan 14 '17 at 18:25
  • @VC.One Thanks for the help, but what should I write in JS for a scroll function ? Because I don't call any anchors in HTML, only in AS3...Sorry, I'm a bit inexperienced with JS. – A. John Jan 14 '17 at 21:03
  • http://help.typepad.com/anchor-tags.html then either navigateToURL(new URLRequest("#p1"),"_parent"); or http://stackoverflow.com/questions/13735912/anchor-jumping-by-using-javascript – Organis Jan 14 '17 at 21:25

0 Answers0