Jump to content

passing anchor link from flash to a text


virtualadz
 Share

Recommended Posts

  • 2 weeks later...

Hi,If u use dreamweaver then u can directly give a URL to the flash object, but I am not sure about it.And the other way of doing it is say if your swf has a link text or a button in it, u can associate the flowing script to it.

myMC_mc.onPress = function(){    getURL("www.mylink.htm","_blank");}[\CODE]Hope I was of some help.
Link to comment
Share on other sites

Hi There,If you dont want the content to open in the new window, you can leave the second argument blank, that will open the document in the same window.You can also write Java Script in flash.instead of "_blank" you can also use "_top"just have a look at help for getURL, if this is not helping you, i may help you if you could tell me the exact situation.CheersAshwani

Link to comment
Share on other sites

Hi,Tanks for explaining the problem.I can think of a workaround, and I am not sure that this is the only or the easiest way to acheive this.I have written codes in flash to call a javaScript function in HTML page and which will navigate to the section of the page.In flash file

my1_mc.onPress = function(){	getURL("javascript:openNewWindow('" + "#go1" + "');");}my2_mc.onPress = function(){	getURL("javascript:openNewWindow('" + "#go2" + "');");}my3_mc.onPress = function(){	getURL("javascript:openNewWindow('" + "#go3" + "');");}

and in the <head> tag of the html page

<script language="JavaScript"><--    function openNewWindow(myURL) {        window.open(myURL);    } -->

Anyway, this wont work in local machine as the flash player will block the java script in local machine, but it will work through a server. ( I have tried it )Just try it and R&D with it.Hope I was of some help to you..CheersAshwani

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...