Hyperlinks in Flash MX2004

  • dkcc0330
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jul 31, 2008
  • Posts: 6
  • Loc: Reno, NV
  • Status: Offline

Post August 1st, 2008, 12:52 pm

Is it possible to hyperlink a button/text/image/whatever to a specific frame in that same flash video? I'm a novice at this, so keep that in mind when you answer. Thanks.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post August 1st, 2008, 12:52 pm

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23403
  • Loc: Woodbridge VA
  • Status: Offline

Post August 2nd, 2008, 3:43 am

It's not really hyperlinking. You have to first convert your button image, text, or other image to a button symbol and give it an instance name, example: myBtn. Then you would use action script onRelease and gotoAndPlay or gotoAndStop

example

Code: [ Select ]
myBtn.onRelease = function() {  //where myBtn is the instance name of your button
  gotoAndPlay(2);  //where 2=frame number you want to go to. Alternatively you could do gotoAndStop(2);
};
  1. myBtn.onRelease = function() {  //where myBtn is the instance name of your button
  2.   gotoAndPlay(2);  //where 2=frame number you want to go to. Alternatively you could do gotoAndStop(2);
  3. };
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • dkcc0330
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jul 31, 2008
  • Posts: 6
  • Loc: Reno, NV
  • Status: Offline

Post October 1st, 2008, 1:11 am

Okay--Not only am I a novice, but I'm not too timely in my replies! At any rate the above AS,

"myBtn.onRelease = function() { //where myBtn is the instance name of your button
gotoAndPlay(2); //where 2=frame number you want to go to. Alternatively you could do gotoAndStop(2);
};" How and where do I insert it into my Flash movie? Like I said, I'm a newby to AS, so please be patient.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23403
  • Loc: Woodbridge VA
  • Status: Offline

Post October 1st, 2008, 4:10 am

On your stage click the button that you want to perform the action. Then open your actions panel and put the button in there.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • dkcc0330
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jul 31, 2008
  • Posts: 6
  • Loc: Reno, NV
  • Status: Offline

Post October 29th, 2008, 10:52 pm

Hi--I've added the above AS (2.0 I presume?) in the Action Script pane for each button, but I'm getting the following errors and when I publish the movie, I get nothing when I click on each button:

**Error** Symbol=menutext, layer=Wine, frame=1:Line 1: Statement must appear within on handler
wineb.onRelease = function() {

**Error** Symbol=menutext, layer=Recipes, frame=1:Line 1: Statement must appear within on handler
recipesb.onRelease = function() {

**Error** Symbol=menutext, layer=Arts, frame=1:Line 1: Statement must appear within on handler
artsb.onRelease = function() {

**Error** Symbol=menutext, layer=Features, frame=1:Line 1: Statement must appear within on handler
featureb.onRelease = function() {

**Error** Symbol=menutext, layer=Wine, frame=780:Line 1: Statement must appear within on handler
wineb.onRelease = function() {

Total ActionScript Errors: 5 Reported Errors: 5

I'm using the script on each of four buttons. I have modified them as follows (removing comments):

featureb.onRelease = function() {
gotoAndPlay(1);
};

artsb.onRelease = function() {
gotoAndPlay(192);
};

recipesb.onRelease = function() {
gotoAndPlay(385);
};

wineb.onRelease = function() {
gotoAndPlay(577);
};

As I stated, I'm a newbie when it comes to programming Flash movies. ANy ideas what I am doing wrong?
  • dkcc0330
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jul 31, 2008
  • Posts: 6
  • Loc: Reno, NV
  • Status: Offline

Post October 30th, 2008, 8:40 am

Would it help if I emailed you the fla file?
  • dkcc0330
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jul 31, 2008
  • Posts: 6
  • Loc: Reno, NV
  • Status: Offline

Post October 30th, 2008, 8:41 am

ATNO/TW wrote:
On your stage click the button that you want to perform the action. Then open your actions panel and put the button in there.

Did you mean "put the ACTION in there"? (in stead of button)
  • dkcc0330
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jul 31, 2008
  • Posts: 6
  • Loc: Reno, NV
  • Status: Offline

Post October 30th, 2008, 8:47 am

Finally, since this not a button linking to another page, do I program it as I would any other with regards to states (up, over, down, hit)

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 41 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.