Jump to content


Photo

Flash button link to HTML page


  • Please log in to reply
5 replies to this topic

#1 ::WebCreate::

::WebCreate::

    Young Padawan

  • Members
  • Pip
  • 177 posts
  • Gender:Female
  • Location:a not so great place...

Posted 28 January 2008 - 02:58 PM

I have been doing research on this problem, but I can't seem to come right.

I would just like to know what actionscript needs to be added to my button in Flash, and how it is added, in order for it to link to my HTML page.

#2 MattyG

MattyG

    Young Padawan

  • Members
  • Pip
  • 3 posts

Posted 28 January 2008 - 03:17 PM

This is what I always use.

(click on the button instance)


on (release){
	getURL("http://www.yoursite.com");
}

Edited by MattyG, 28 January 2008 - 04:54 PM.


#3 curthard89

curthard89

    Young Padawan

  • Members
  • Pip
  • 226 posts

Posted 29 January 2008 - 08:41 AM

depends what version of actionscript you are using, so what r u using?

#4 ::WebCreate::

::WebCreate::

    Young Padawan

  • Members
  • Pip
  • 177 posts
  • Gender:Female
  • Location:a not so great place...

Posted 29 January 2008 - 01:56 PM

depends what version of actionscript you are using, so what r u using?


I am using Actionscript 1.0 & 2.0, but I can use 3.0 if I want to (Adobe Flash CS3).
I have tried using the code suggested above, but I keep getting errors.
And when i select the button instance, it tells me that my selection cannot have actions applied to it.
(Yes, it is definetely the instance of my button that I am selecting ;) )

What am I doing wrong? I've never had so much trouble with actionscript before.

#5 MattyG

MattyG

    Young Padawan

  • Members
  • Pip
  • 3 posts

Posted 30 January 2008 - 05:17 PM

depends what version of actionscript you are using, so what r u using?


I am using Actionscript 1.0 & 2.0, but I can use 3.0 if I want to (Adobe Flash CS3).
I have tried using the code suggested above, but I keep getting errors.
And when i select the button instance, it tells me that my selection cannot have actions applied to it.
(Yes, it is definetely the instance of my button that I am selecting :) )

What am I doing wrong? I've never had so much trouble with actionscript before.


Try this....

Make an actions layer

select it and in the actions panel for that frame add code

_root.buttonName.on(release){
	getURL("www.yourlink.com");
}

where "buttonName" is the instance name you gave your button.

If that doesn't work, then I'd check to make sure you made the object a button object.

#6 curthard89

curthard89

    Young Padawan

  • Members
  • Pip
  • 226 posts

Posted 01 February 2008 - 10:39 AM

_root.buttonName.on(release){
getURL("www.yourlink.com");
}


the correct way is

_root.buttonName.onRelease = function(){
getURL("www.yourlink.com");
}

Edited by curthard89, 01 February 2008 - 10:39 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users