Jump to content


Flash [CS3] Linking Nav Bar


  • You cannot reply to this topic
9 replies to this topic

#1 Exc.BluePhoenix

    Young Padawan

  • Members
  • Pip
  • 11 posts

Posted 18 March 2008 - 08:07 AM

Hello,

I am new to flash, however, I wanted to make a site with Flash animated buttons. I then search for tutorials on how to this and I found this one,

Tutorial Link

To my surprise it was easy to do and I got it working. I then assemble the flash navigation into my website, I test it and it worked great,

My Website (Its a Day of Defeat 1.3 Site)

However, one thing I had not added and never though of adding until the site was assemble was well LINKS! So then I went back and search on how to add links, but what I get when I search GOOGLE is that you need the symbols to be BUTTONS but in the tutorial all the author tells you to is to make movie clip and graphics. There is a command(function, i dont really know) called getURL, but it does not work unless its a button.

So after my explanation, the question is, is there anyway to add links to this nav bar? If not, then would anyone be kind enough to point to a tutorial that shows a similar example just using buttons or just explain to me how to integrate buttons in this ordeal, because I have tried going from movieclip to button and it makes the animations weird. ( I used Flash CS3, with actionscript 2 but if 3 is need it I can also use it.)

Here is the action scrip, it can also be found in the tutorial link and how he worked in.

 button1.onRollOver = over;
   button1.onRollOut = out;
   button1.text.buttonText.text = "HOME"; 
 
 function over() {
   this.gotoAndPlay(2);
   }  
 
 function out() {
   this.gotoAndPlay(6);
   }

(I dont think the code tags are for actionscript but oh well, it looks pink....)
(Note: This is just for one button, I have four, so it just the first 3 lines repeated 4 times.)

There is also action script inside each scene, for each button, every 5 frames (10 total, running at 28fps), there is a stop();.

Thank you very much in advance for any replies. Any help is welcomed!

Edited by Exc.BluePhoenix, 19 March 2008 - 02:04 PM.


#2 knedl

    Young Padawan

  • Members
  • Pip
  • 243 posts
  • Gender:Male
  • Location:Slovenia
  • Interests:Designing and programing

Posted 18 March 2008 - 11:37 AM

Just add this line to the button:

instance.onRelease = function () {
getURL ("index.html");
}

And it will open the desired filename in the current window.

#3 Exc.BluePhoenix

    Young Padawan

  • Members
  • Pip
  • 11 posts

Posted 18 March 2008 - 07:36 PM

Thanks for the reply.


Statement must appear within on/onClipEvent handler, i get that error, when i put the code you gave me. Where exactly must i add those lines, in the action script i provide in the previous post?

thanks again for the reply.

#4 knedl

    Young Padawan

  • Members
  • Pip
  • 243 posts
  • Gender:Male
  • Location:Slovenia
  • Interests:Designing and programing

Posted 19 March 2008 - 01:15 AM

Are you giving the actions to the movieclip itself or are you putting the code in the main timeline?

#5 Exc.BluePhoenix

    Young Padawan

  • Members
  • Pip
  • 11 posts

Posted 19 March 2008 - 02:01 PM

The main time line, has

actionscript
buttons
blackshade
background

What I did first, was to add those lines to the actionscript and nothing happens it gives no errors but when you click on the buttons neither of them work. Then i double click to go inside of the buttons and i add it to the movie clip itself and it gave me the error.

thanks again.

#6 knedl

    Young Padawan

  • Members
  • Pip
  • 243 posts
  • Gender:Male
  • Location:Slovenia
  • Interests:Designing and programing

Posted 19 March 2008 - 04:08 PM

Could you provide the .fla please so I can have a closer look.

#7 Exc.BluePhoenix

    Young Padawan

  • Members
  • Pip
  • 11 posts

Posted 19 March 2008 - 04:17 PM

K well they do not let me upload .fla type files, so I upload it to my server here is the link.

Flash Nav Bar (.fla format)

Thanks a lot!

#8 knedl

    Young Padawan

  • Members
  • Pip
  • 243 posts
  • Gender:Male
  • Location:Slovenia
  • Interests:Designing and programing

Posted 19 March 2008 - 05:06 PM

Thanks,

and here you go :)

#9 Exc.BluePhoenix

    Young Padawan

  • Members
  • Pip
  • 11 posts

Posted 19 March 2008 - 07:34 PM

ah okay i see what you meant now.

wow thanks a bunch.

#10 knedl

    Young Padawan

  • Members
  • Pip
  • 243 posts
  • Gender:Male
  • Location:Slovenia
  • Interests:Designing and programing

Posted 20 March 2008 - 09:39 AM

No problem :biggrin:





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users