Deep Link Question

  • Pang
  • Born
  • Born
  • No Avatar
  • Joined: Jan 05, 2007
  • Posts: 4
  • Loc: Chicago
  • Status: Offline

Post January 15th, 2007, 10:16 am

I was trying to figure out how to have internal pages of my flash file be linked witha #variable, So if you typed in http://www.blah.com/#portfolio it would go to a subpage in the flash file. A good example of this working is at http://www.2advanced.com.

I know this uses the ExternalInterface scripting method, I have some examples of code. My question is does someone know of a good tutorial on this somewhere, because I was unable to figure this out. I think I am just missing something, I need a little boost of information and understanding to be able to accomplish this for my own site.

example code that 2advanced uses.

Code: [ Select ]
class com.jmoore.DeepLinkInterface
{
  var deepLink;
  function DeepLinkInterface(jsMethodName, callbackInstance, callbackMethod)
  {
    var _loc1 = flash.external.ExternalInterface.addCallback(jsMethodName, callbackInstance, callbackMethod);
  } // End of the function
  function setDeepLink(deepLink, deepTitle)
  {
    flash.external.ExternalInterface.call("setDeepLink", deepLink, deepTitle);
  } // End of the function
  function getDeepLink()
  {
    deepLink = String(flash.external.ExternalInterface.call("getDeepLink"));
    return (deepLink);
  } // End of the function
  function getPageTitle()
  {
    flash.external.ExternalInterface.call("getPageTitle");
  } // End of the function
  function setPageTitle(windowTitle)
  {
    flash.external.ExternalInterface.call("setPageTitle", windowTitle);
  } // End of the function
} // End of Class

  1. class com.jmoore.DeepLinkInterface
  2. {
  3.   var deepLink;
  4.   function DeepLinkInterface(jsMethodName, callbackInstance, callbackMethod)
  5.   {
  6.     var _loc1 = flash.external.ExternalInterface.addCallback(jsMethodName, callbackInstance, callbackMethod);
  7.   } // End of the function
  8.   function setDeepLink(deepLink, deepTitle)
  9.   {
  10.     flash.external.ExternalInterface.call("setDeepLink", deepLink, deepTitle);
  11.   } // End of the function
  12.   function getDeepLink()
  13.   {
  14.     deepLink = String(flash.external.ExternalInterface.call("getDeepLink"));
  15.     return (deepLink);
  16.   } // End of the function
  17.   function getPageTitle()
  18.   {
  19.     flash.external.ExternalInterface.call("getPageTitle");
  20.   } // End of the function
  21.   function setPageTitle(windowTitle)
  22.   {
  23.     flash.external.ExternalInterface.call("setPageTitle", windowTitle);
  24.   } // End of the function
  25. } // End of Class


and a link to the externalinterface script help
flex 2
http://livedocs.macromedia.com/flex/2/l ... rface.html
flash 8
http://livedocs.macromedia.com/flash/8/ ... 02200.html


I am assuming it passes variables back and forth to javascript, and javascript does some crap to make the thing work.

I hope someone can make my lightbulb turn on. Thanks in advance.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post January 15th, 2007, 10:16 am

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post January 16th, 2007, 12:08 am

yea, they pass variable to some javascript methods.
If you look in their page source, you'll see that they include more .js files.
the one you look for is this
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 63 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
 
cron
 

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