Groups > Multimedia > Macromedia Flash > Re: link issues




link issues

link issues
Sat, 10 May 2008 12:26:50 +000
i'm trying to get a small 'dockbar' animation going which will end up having 
three buttons to various parts of a website i'm building. unfortunately, i 
can't seem to get any link scripts to work. i have my buttons ready to go, but 
if someone could post a script for a simple link to the same page, that i could

paste into the 'actions' panel, that'd be great...
Post Reply
Re: link issues
Sat, 10 May 2008 13:27:28 +000
are you trying to navigate within the swf timeline? or to another html 'page'?

 use the getURL() method to navigate to another html page as in:

 my_btn.onPress = function() {
 getURL( 'http://www.thedomain.com/page.html' );
 }

 or the gotoAdnStop() method to navigate the timeline:

 my_btn.onPress = function() {
 gotoAndStop( [frame or label] );
 }
Post Reply
Re: link issues
Sat, 10 May 2008 17:35:24 +000
it'll link to other html pages, so thanks for the scripts. i'll give them a go,
and see what happens...
Post Reply
Re: link issues
Tue, 13 May 2008 15:00:43 +000
sorry to be back...

 i get a "1120: Access of undefined property my_btn." error for the
first line 
of code, 
 and a "1180: Call to a possibly undefined method getURL." error for
the 
second... 

 do i replace the 'my_btn' with the button name, or does this apply to the 
layer?
 am very much a beginner...
Post Reply
Re: link issues
Tue, 13 May 2008 15:25:21 +000
yes these code should be on the timeline also.  and yes it should be the 
'instance name' of the button you are using - to assign an 'instance name' 
select the button on the Stage and look in the properties panel - you will see 
a box on the right that say... <instance name> type the name in there and
use 
it in your code.
Post Reply
about | contact