Jump to content


Photo

button question


  • Please log in to reply
14 replies to this topic

#1 shub

shub

    Young Padawan

  • Members
  • Pip
  • 43 posts
  • Gender:Male
  • Location:belgium

Posted 29 June 2007 - 08:47 AM

hello,

I got 4buttons and 4difrent html pages. For making everything easy im going to add some names :laugh:

|Button 1|     |button 2|    |button 3|    |button 4|

Oke on every of the html pages comes my header whit the 4 buttons... but under the header a difrent text, layout, etc...

Now I got 3 difrent button images for my buttons, Button_up, button_hover, button_down, i made btn and then added the right images for up, over, down.

Now i want that when im on html 1 button 1 is on the down images, when i then click on button 2, the page goes to html 2 and button 2 changes to the down images, and button 1 goes back to the up images, etc..

I hope everyone understand else say it and ill try to add images :( Also i know you can work whit iframes but then google goes crazy and i dont want that... I hope there is a solution for this :laugh:

~Shub

Edited by shub, 29 June 2007 - 08:48 AM.


#2 Pax

Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 29 June 2007 - 09:15 AM

If you don't have an all flash site, I wouldn't use Flash for your navigation. It's too limiting to visitors (and this is coming from a guy who spends all day developing stuff in Flash, so I'm not a Flash hater), if someone doesn't have flash enabled, they can't navigate your site, and neither can Google.

So, do your rollovers with js/css. Use php to determine what page you are on and swap the css style used on that page's button to the "selected" style.

#3 shub

shub

    Young Padawan

  • Members
  • Pip
  • 43 posts
  • Gender:Male
  • Location:belgium

Posted 29 June 2007 - 09:23 AM

hmm i see :( yeah that would be a little bit hard code just for a "fancy" style...

anyway i do my header in flash, show out of results 92% of the people got flash player installed... now a days you cant go to a site whitout using flash player... and nope it wont be a compleat flash site..

Btw google can perfectly handel flash navigations, it search for all pages on your site and index them, it doesnt search for html code that says <a href="home.php"> </a> or something... (and yeah i tested this out... you always got sitemap.xml if google hates you ^^)

also i maybe add a html navigation..; (on top maybe 2 buttons, flash/html or something so they can pick what they want, have to think about that one)

thnx for the answer pax :laugh:

~Shub

#4 Pax

Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 29 June 2007 - 09:34 AM

Google can index swfs, but it is unreliable, and can actually hurt your ranking with google. You'll get keyword flooding, because every keyframe that text is on will be indexed. A complex animation could result in 15 copies of the text, which Google will mark as spamming.

#5 MetalSkin

MetalSkin

    Young Padawan

  • Members
  • Pip
  • 196 posts
  • Gender:Male
  • Location:Brisbane, Australia

Posted 29 June 2007 - 08:25 PM

This is pretty easy to do as Pax said. Have a gander at my site, its very basic though the effect I think is not too bad. Didn't take me too long to through together as well. Have a gander here

#6 lysol

lysol

    Young Padawan

  • Members
  • Pip
  • 140 posts
  • Gender:Male
  • Location:Washington, DC

Posted 30 June 2007 - 10:51 AM

are you using actionscript to make your buttons work?

on (release){
goto.url("http://mysite.com")
}


#7 shub

shub

    Young Padawan

  • Members
  • Pip
  • 43 posts
  • Gender:Male
  • Location:belgium

Posted 30 June 2007 - 12:29 PM

yep but like this
on (release) {
getURL("hosting.html")
}

~Shub

#8 lysol

lysol

    Young Padawan

  • Members
  • Pip
  • 140 posts
  • Gender:Male
  • Location:Washington, DC

Posted 30 June 2007 - 02:12 PM

^right. thanks, i was groggy...lol.

#9 Pax

Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 30 June 2007 - 04:44 PM

You should actually use
this.onRelease = function(){
getURL("myurl");
}

on() and onClipEvent() are old methods and really shouldn't be used anymore. But 80% of the people who write Flash tutorials don't actually know what they are doing, so they teach all of you the wrong code. <- Pet peeve of mine.

#10 lysol

lysol

    Young Padawan

  • Members
  • Pip
  • 140 posts
  • Gender:Male
  • Location:Washington, DC

Posted 30 June 2007 - 04:46 PM

You should actually use

this.onRelease = function(){
getURL("myurl");
}

on() and onClipEvent() are old methods and really shouldn't be used anymore. But 80% of the people who write Flash tutorials don't actually know what they are doing, so they teach all of you the wrong code. <- Pet peeve of mine.


well, wouldnt that code be used if your button was a MovieClip?

#11 Pax

Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 30 June 2007 - 10:31 PM

on() and onClipEvent() work on movie clips too. You shouldn't be using the standard buttons much either because they promote the use of improper code. Buttons were fixed in AS3/Flash 9 to use the proper code, so it's a different story there.

#12 shub

shub

    Young Padawan

  • Members
  • Pip
  • 43 posts
  • Gender:Male
  • Location:belgium

Posted 01 July 2007 - 03:49 AM

thnx for the code but as long as it works why the hell change it?

If a code gets to old and doesn't work anymore whit new things then i understand changing it but working whit old codes really doesnt matter if they all work perfect...

~Shub

#13 Pax

Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 01 July 2007 - 08:49 AM

Yah, when you aren't building anything mind blowing, or some huge project, the way you code doesn't really matter. The new code was added because it works better and follows best practices better than on() and onClipEvent(), but you are right, theres no need to change it right now. If you do another Flash project, it would be a good idea to start out doing it right. It'll probably save some time in the long run.

#14 shub

shub

    Young Padawan

  • Members
  • Pip
  • 43 posts
  • Gender:Male
  • Location:belgium

Posted 01 July 2007 - 09:03 AM

Yeah ill do that :) when i start a new project ill try to use the new code :artist:

But the old is really logic and easy to remember the new one is kinda lol wierd (in the view of a noob lol)

~Shub

#15 Pax

Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 02 July 2007 - 01:13 AM

The new way works much much better. It's the exact same logic, just way more flexible. Plus you have like 7 more events to can handle with it vs on() and onClipEvent().




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users