# AS3 OOP and 1 SWF - Deep linking

**URL:** <https://forum.kirupa.com/t/as3-oop-and-1-swf-deep-linking/313378>\
**Category:** flash\
**Created:** [August 27, 2010, 1:37pm UTC](https://forum.kirupa.com/t/as3-oop-and-1-swf-deep-linking/313378 "2010-08-27T13:37:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RubenDoliveira](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rubendoliveira/32/3905_2.png) [@RubenDoliveira](https://forum.kirupa.com/u/RubenDoliveira)\
**Post date:** [August 27, 2010, 1:37pm UTC](https://forum.kirupa.com/t/as3-oop-and-1-swf-deep-linking/313378/1 "2010-08-27T13:37:57Z")

</div>

Hi everyone,

I’m reaching a final stage of my project and I need to implement deep linking on it.

So let’s say I have [www.mysite.com](http://www.mysite.com), when I click the button “one”, the URL should be [www.mysite.com/one](http://www.mysite.com/one)

For that, I’m using swfaddress and swfobject and I was already able to change the URL.

I’m already able to use the back and forward button and if I write [www.mysite.com/#/one](http://www.mysite.com/#/one) on the browser, it works but ONLY if I was already on that subpage.

I have just one swf fully on OOP (no frames, no timeline).

**My questions are:** How to make [www.mysite.com/one](http://www.mysite.com/one) work at the first time without having being there before? and how to remove the “#” from the URL ?

My code have more than 1500 lines of code, regarding the swfaddress I have this:

```auto

function stage_ready(){
	SWFAddress.addEventListener(SWFAddressEvent.CHANGE, handleSWFAddress);

if(page == "one"){
	link = "one";
	newurl = "5.jpg";
        remove_stage();
	initOne();
}

function formatTitle(newTitle:String):String {
    var updatedTitle:String = newTitle;
    return updatedTitle;
}
		
function handleSWFAddress(event:SWFAddressEvent):void {	
        if(link == "one"){
		newurl = "5.jpg";
		page = "one";
		remove_stage();
		initOne();
	}	

        var newAddress:String = "/" + link + "/";
	SWFAddress.setValue(newAddress);
			
	SWFAddress.setHistory(true);
	SWFAddress.setTitle(formatTitle(link));
}

```

Thank you in advance.
