A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Location of Containing Document

  1. #1
    Junior Member
    Join Date
    Jun 2004
    Posts
    1

    Location of Containing Document

    We have the following script to determine wich navigation should be displayed in our flash movie. Unfortinatly the _url returns the location of the flash movie not the document that contains it. Is there any way to detirmine the location of the page in flash? This must work with players 4 and higher.

    Thanks
    RnK

    navurl = substring(_url,29,4);

    switch(navURL){
    case navURL == 'mort':
    case navURL == '/mor':
    nav = 'mort';
    break;
    case navURL == 'chec':
    case navURL == '/che':
    nav = 'check';
    break;
    case navURL == 'elec':
    case navURL == '/ele':
    nav = 'elec';
    break;
    case navURL == 'loan':
    case navURL == '/loa':
    nav = 'loan';
    break;
    case navURL == 'auto':
    case navURL == '/aut':
    nav = 'auto';
    break;
    case navURL == 'inve':
    case navURL == '/inve':
    nav = 'invest';
    break;
    case navURL == 'memb':
    case navURL == '/mem':
    nav = 'member';
    break;
    case navURL == 'what':
    case navURL == '/wha':
    navurl = substring(_url,29,4);
    if(navURL == 'comm'){
    nav = 'community';
    }else{
    nav = 'new';
    }
    break;
    default:
    nav = 'home';
    }


    if(_framesloaded >= _totalframes){
    gotoAndStop(nav);
    }

  2. #2
    Senior Member
    Join Date
    May 2002
    Posts
    134
    If anyone has any ideas on this I'd be interested in seeing your suggestions also.

  3. #3
    FK Slacker
    Join Date
    Jun 2000
    Location
    vancouver
    Posts
    3,208
    To work with the v 4 player, I would suggest appending the variable to the querystring, or setting it with javascript, as described here:

    http://www.macromedia.com/support/fl..._variables.htm

    K.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center