Hyperlinks in Flash MX2004

  • dkcc0330
  • Newbie
  • Newbie
  • dkcc0330
  • Posts: 6
  • Loc: Reno, NV

Post 3+ Months Ago

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
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

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. };
  • dkcc0330
  • Newbie
  • Newbie
  • dkcc0330
  • Posts: 6
  • Loc: Reno, NV

Post 3+ Months Ago

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
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

On your stage click the button that you want to perform the action. Then open your actions panel and put the button in there.
  • dkcc0330
  • Newbie
  • Newbie
  • dkcc0330
  • Posts: 6
  • Loc: Reno, NV

Post 3+ Months Ago

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
  • dkcc0330
  • Posts: 6
  • Loc: Reno, NV

Post 3+ Months Ago

Would it help if I emailed you the fla file?
  • dkcc0330
  • Newbie
  • Newbie
  • dkcc0330
  • Posts: 6
  • Loc: Reno, NV

Post 3+ Months Ago

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
  • dkcc0330
  • Posts: 6
  • Loc: Reno, NV

Post 3+ Months Ago

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

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.