samedi 14 janvier 2017

HTML anchor in AS3

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...

Aucun commentaire:

Enregistrer un commentaire