# Flash 8 - deeplinking - swfAddress

**URL:** <https://forum.kirupa.com/t/flash-8-deeplinking-swfaddress/319334>\
**Category:** flash\
**Created:** [February 16, 2011, 8:49pm UTC](https://forum.kirupa.com/t/flash-8-deeplinking-swfaddress/319334 "2011-02-16T20:49:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eFrankd](https://avatars.discourse-cdn.com/v4/letter/e/65b543/32.png) [@eFrankd](https://forum.kirupa.com/u/eFrankd)\
**Post date:** [February 16, 2011, 8:49pm UTC](https://forum.kirupa.com/t/flash-8-deeplinking-swfaddress/319334/1 "2011-02-16T20:49:53Z")

</div>

I was busy with this code wich works fine.

```auto

function traceMyPage(id) {
    SWFAddress.onChange = function() {
        var addr = SWFAddress.getValue();
        switch (addr) {
            case ‘/’ :
                var the_html_name = pages[id].name;
                SWFAddress.setValue(the_html_name);
                SWFAddress.setTitle(the_html_name);
                my_info.htmlText = pages[id].desc;
                main_holder.loadMovie(pages[id].thumb);
                break;
            case ‘/Testpage 1’ :
                SWFAddress.setTitle(“Testpage 1”);
                my_info.htmlText = pages[0].desc;
                main_holder.loadMovie(pages[0].thumb);
                break;
            case ‘/Testpage 2’ :
                SWFAddress.setTitle(“Testpage 2”);
                my_info.htmlText = pages[1].desc;
                main_holder.loadMovie(pages[1].thumb);
                break;
            case ‘/Testpage 3’ :
                SWFAddress.setTitle(“Testpage 3”);
                my_info.htmlText = pages[2].desc;
                main_holder.loadMovie(pages[2].thumb);
                break;
            case ‘/Testpage 4’ :
                SWFAddress.setTitle(“Testpage 4”);
                my_info.htmlText = pages[3].desc;
                main_holder.loadMovie(pages[3].thumb);
                break;
            case ‘/Testpage 5’ :
                SWFAddress.setTitle(“Testpage 5”);
                my_info.htmlText = pages[4].desc;
                main_holder.loadMovie(pages[4].thumb);
                break;
            case ‘/Testpage 6’ :
                SWFAddress.setTitle(“Testpage 6”);
                my_info.htmlText = pages[5].desc;
                main_holder.loadMovie(pages[5].thumb);
                break;
        }
    };
}
function showPage(id:Number, clips:Array) {
    var the_html_name = pages[this.id].name;
    SWFAddress.setValue(the_html_name);
    my_info.htmlText = pages[this.id].desc;
    main_holder.loadMovie(pages[this.id].thumb);
}

```

Now this isnt dynamic, so I was working with another solution.  
See code below…

But when I put SWFAddress.setStrict(false) to SWFAddress.setStrict(true)  
than the code won’t work.

```auto

SWFAddress.setStrict(false);
SWFAddress.onChange = function() {
    var value = SWFAddress.getValue();
    //trace("the value is: "+value);
    var path = SWFAddress.getPath();
    //trace("the path is: "+path);
    var id = SWFAddress.getParameter('id');
    //trace("the id is: "+id);
    for (var i:Number = 0; i<pages.length; i++) {
        if (pages*.name == value) {
            my_info.htmlText = pages*.desc;
            main_holder.loadMovie(pages*.thumb);
        }
    }
    var title = 'SWFAddress Website';
    var names = SWFAddress.getPathNames();
    for (var i = 0; i<names.length; i++) {
        title += ' / '+names*.substr(0, 1).toUpperCase()+names*.substr(1);
    }
    var id = SWFAddress.getParameter('id');
    if (typeof id != 'undefined') {
        title += ' / '+id;
    }
    SWFAddress.setTitle(title);

```

};

What goes wrong here?  
Can the code also have more improvements?

Every input is welcome.

Thnx!
