# Problems getting DeepLinking to work \[AS2\]

**URL:** <https://forum.kirupa.com/t/problems-getting-deeplinking-to-work-as2/265682>\
**Category:** flash\
**Created:** [July 11, 2008, 9:27am UTC](https://forum.kirupa.com/t/problems-getting-deeplinking-to-work-as2/265682 "2008-07-11T09:27:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HerbyGunther](https://avatars.discourse-cdn.com/v4/letter/h/6de8d8/32.png) [@HerbyGunther](https://forum.kirupa.com/u/HerbyGunther)\
**Post date:** [July 11, 2008, 9:27am UTC](https://forum.kirupa.com/t/problems-getting-deeplinking-to-work-as2/265682/1 "2008-07-11T09:27:15Z")

</div>

Hi, I have done a lot of research of DeepLinking in Flash and currently modifying my site to support it. But I’m having some problems getting it to work 100%. I hope someone can help me out. Thanks in advance!

It works when the site is already loaded, but when I paste the deep link (not home) into an other browser, it shows the homepage instead of the page I want. I think it has something to do with SWFAddress.getValue(); being it cannot find the value /mypage/ because it has not been set by a mouse event.

If you want to see the online example, it’s here:  
[http://www.dualbrain.nl/\_test/](http://www.dualbrain.nl/_test/)

This is my code in the first frame:

```php

import com.asual.swfaddress.SWFAddress;
import com.asual.swfaddress.SWFAddressEvent;

var isLoaded:Boolean = false;

SWFAddress.onChange = mx.utils.Delegate.create(this, action_SWFAddress_onChanged);

function action_SWFAddress_onChanged():Void {
	trace("changed");
	var sGoToDeepLink:String = SWFAddress.getValue();
	var nGoToID:Number;
	
	if (sGoToDeepLink == "/") nGoToID = 0;
	else if (sGoToDeepLink == "/about/") nGoToID = 1;
	else if (sGoToDeepLink == "/work/") nGoToID = 2;
	else if (sGoToDeepLink == "/contact/") nGoToID = 3;
	else nGoToID = 0;
			
	_root.sActiveMainCategory = nGoToID;
	
	if (isLoaded) {

		var mMainMenu:MovieClip = _root.grp_header.grp_MainMenu.holder_MainMenu;
		mMainMenu.goto();
	}
}

```

When clicked on main menu button it sets this:

```php

SWFAddress.setValue(s);
SWFAddress.setStatus(s);

```

s is a variable passed through a function with the correct deep link.  
/home/ or /about/ or /work/ etc

---

<div class="post-metadata">

**Author:** ![HerbyGunther](https://avatars.discourse-cdn.com/v4/letter/h/6de8d8/32.png) [@HerbyGunther](https://forum.kirupa.com/u/HerbyGunther)\
**Post date:** [July 11, 2008, 12:51pm UTC](https://forum.kirupa.com/t/problems-getting-deeplinking-to-work-as2/265682/2 "2008-07-11T12:51:18Z")

</div>

> [@Chuckanucka;2356814](#):
>
> have you checked the examples that come with swfAddress?

Yeah I have checked a few of those examples, but I don’t understand what I’m doing wrong. That’s why I ask my Q here.

---

<div class="post-metadata">

**Author:** ![HerbyGunther](https://avatars.discourse-cdn.com/v4/letter/h/6de8d8/32.png) [@HerbyGunther](https://forum.kirupa.com/u/HerbyGunther)\
**Post date:** [July 11, 2008, 12:59pm UTC](https://forum.kirupa.com/t/problems-getting-deeplinking-to-work-as2/265682/3 "2008-07-11T12:59:34Z")

</div>

Can someone please give me a hint:  
What is the difference between?  
SWFAddress.getValue();  
SWFAddress.getPath();  
SWFAddress.getParameter();

I’m sorry but I don’t understand the explanations in the manual:  
Respectively:  
Provides the current deep linking value. (this one I understand)  
Provides the deep linking value without the query string.  
Provides the value of a specific query parameter.
