detect current url

  • cris02
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Sep 27, 2003
  • Posts: 38
  • Loc: Manila, Philippines
  • Status: Offline

Post October 6th, 2008, 8:36 pm

hi there,

Is there a way to detect current url using actionscript. i have a flash here please see the attached image. there's a three button now: e.g: if the current page is http://myserver.com/calculator.htm now the calculator button in the flash banner should be stand-up then if the current page is in faq.htm the faq button should be stand up then the calculator should be in down position same with prticipant login button.

Image

My current option is to make a tree flash banner that are the same but i think this is not the best one.. so is there other way to done this instead of creating multiple flash that are the same?

Thanks
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post October 6th, 2008, 8:36 pm

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1828
  • Loc: In the Great White North
  • Status: Offline

Post October 6th, 2008, 9:37 pm

Yes you can. You need to use javascript to the URL (window.url) I believe will work. Then you need to pass that into flash using either something like the SFO Object to pass the url as a variable at run time or you need to have flash use the External Interface command to get the url string from the javascript.
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com
  • cris02
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Sep 27, 2003
  • Posts: 38
  • Loc: Manila, Philippines
  • Status: Offline

Post October 6th, 2008, 11:57 pm

if you dont mind can you give simple example for that. thanks for the reply anyways
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1828
  • Loc: In the Great White North
  • Status: Offline

Post October 7th, 2008, 10:45 am

I have an example someplace. I'll go digging and get back to you. In the mean time here's what adobe's docs say about the externalInterface command.
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 53 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.