Flash Map Help

  • routhu
  • Beginner
  • Beginner
  • User avatar
  • Joined: Feb 28, 2007
  • Posts: 47
  • Loc: India
  • Status: Offline

Post December 16th, 2007, 10:06 pm

Hi to all,

I have developed a Flash Map, it's working fine.

Here is my Problem.

Map is having the Circular Locations whenever u rollover the mouse on Location , Location will be hightlited and u will get some information regarding the availability and u can see Check Availability Button.

Whenever i click on Check Availability its taking me to other page which is having the flash file.
But How can i highlite the Loation On which i have selected Previously.

Here is xml code:

Code: [ Select ]
_global.checkmap = 0;
_global.vid = new Array();
_global.vname = new Array();
_global.vdes = new Array();
_global.vlink = new Array();
_global.option = new Array();
_global.opt = new Array();
_global.title = new Array();

function loadXML(loaded) {
    _global.checkmap = 2;
    _global.total = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
    
    if (_global.total<=19) {
        ccftot = _global.total;
    } else {
        ccftot = 19;
    }
    if (loaded) {
        for (i=1; i<=ccftot; i++) {
            //_global.total
            if (this.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue != null) {
                curid = this.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue;
                _global.vname[i-1] = this.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue;
                _global.vdes[i-1] = this.firstChild.childNodes[i].childNodes[2].firstChild.nodeValue;
                _global.vlink[i-1] = this.firstChild.childNodes[i].childNodes[3].firstChild.nodeValue;
                map1 = this.firstChild.childNodes[i].childNodes[4].firstChild.nodeValue;
                _global.option[i-1] = eval("_root.main.location" add map1);
                _global.title[i-1] = _global.vname[i-1];
                _global.opt[i-1] = map1;
                _global.vid[i-1] = curid;
            }
        }
        _global.popuptitle = new Array();
        _global.popuptitle = _global.title;
        }
}

xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("maps.xml");
  1. _global.checkmap = 0;
  2. _global.vid = new Array();
  3. _global.vname = new Array();
  4. _global.vdes = new Array();
  5. _global.vlink = new Array();
  6. _global.option = new Array();
  7. _global.opt = new Array();
  8. _global.title = new Array();
  9. function loadXML(loaded) {
  10.     _global.checkmap = 2;
  11.     _global.total = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
  12.     
  13.     if (_global.total<=19) {
  14.         ccftot = _global.total;
  15.     } else {
  16.         ccftot = 19;
  17.     }
  18.     if (loaded) {
  19.         for (i=1; i<=ccftot; i++) {
  20.             //_global.total
  21.             if (this.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue != null) {
  22.                 curid = this.firstChild.childNodes[i].childNodes[0].firstChild.nodeValue;
  23.                 _global.vname[i-1] = this.firstChild.childNodes[i].childNodes[1].firstChild.nodeValue;
  24.                 _global.vdes[i-1] = this.firstChild.childNodes[i].childNodes[2].firstChild.nodeValue;
  25.                 _global.vlink[i-1] = this.firstChild.childNodes[i].childNodes[3].firstChild.nodeValue;
  26.                 map1 = this.firstChild.childNodes[i].childNodes[4].firstChild.nodeValue;
  27.                 _global.option[i-1] = eval("_root.main.location" add map1);
  28.                 _global.title[i-1] = _global.vname[i-1];
  29.                 _global.opt[i-1] = map1;
  30.                 _global.vid[i-1] = curid;
  31.             }
  32.         }
  33.         _global.popuptitle = new Array();
  34.         _global.popuptitle = _global.title;
  35.         }
  36. }
  37. xmlData = new XML();
  38. xmlData.ignoreWhite = true;
  39. xmlData.onLoad = loadXML;
  40. xmlData.load("maps.xml");



Here is location highlighted code:

Code: [ Select ]
    on (rollOver) {
    gotoAndPlay(2);
    tstr = new String(this);
    q1 = tstr.indexOf("location");
    q3 = tstr.substr(q1+8, tstr.length);
    for (jj=0; jj<_global.opt.length; jj++) {
        if (_global.opt[jj] == q3) {
            break;
        }
    }
    
    // this highlight prevos one
    
        objOver_prev = eval("_root.main.location" add _global.prevval);
        objOver_prev.gotoAndPlay(11);

    // this higlioght ends
    
q2 = jj+1;
    _global.prevval=q2;
    
    val = _global.title[q2-1];
    for (ii=0; ii<_global.vname.length; ii++) {
        if (_global.vname[ii] == val) {
            break;
        }
    }
    
    if (ii == _global.vname.length) {
        _global.popname = "Venue Name";
        _global.popdesc = "No Content Available";
        _global.poplink = "";
        
    } else {
        _global.popname = _global.vname[ii];
        _global.popdesc = _global.vdes[ii];
        _global.poplink = _global.vlink[ii];
        
    }
    _root.main.popup.gotoAndPlay(2);
    }

on (rollOut) {
    gotoAndPlay(2);
    //objOver.gotoAndPlay(11);
}
on (release) {
    getURL(_global.poplink);
}
  1.     on (rollOver) {
  2.     gotoAndPlay(2);
  3.     tstr = new String(this);
  4.     q1 = tstr.indexOf("location");
  5.     q3 = tstr.substr(q1+8, tstr.length);
  6.     for (jj=0; jj<_global.opt.length; jj++) {
  7.         if (_global.opt[jj] == q3) {
  8.             break;
  9.         }
  10.     }
  11.     
  12.     // this highlight prevos one
  13.     
  14.         objOver_prev = eval("_root.main.location" add _global.prevval);
  15.         objOver_prev.gotoAndPlay(11);
  16.     // this higlioght ends
  17.     
  18. q2 = jj+1;
  19.     _global.prevval=q2;
  20.     
  21.     val = _global.title[q2-1];
  22.     for (ii=0; ii<_global.vname.length; ii++) {
  23.         if (_global.vname[ii] == val) {
  24.             break;
  25.         }
  26.     }
  27.     
  28.     if (ii == _global.vname.length) {
  29.         _global.popname = "Venue Name";
  30.         _global.popdesc = "No Content Available";
  31.         _global.poplink = "";
  32.         
  33.     } else {
  34.         _global.popname = _global.vname[ii];
  35.         _global.popdesc = _global.vdes[ii];
  36.         _global.poplink = _global.vlink[ii];
  37.         
  38.     }
  39.     _root.main.popup.gotoAndPlay(2);
  40.     }
  41. on (rollOut) {
  42.     gotoAndPlay(2);
  43.     //objOver.gotoAndPlay(11);
  44. }
  45. on (release) {
  46.     getURL(_global.poplink);
  47. }
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post December 16th, 2007, 10:06 pm

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1828
  • Loc: In the Great White North
  • Status: Offline

Post December 17th, 2007, 6:38 am

Pass a variable to flash when the page loads...

You can do this with javascript or php etc.

Then in flash simply check for the correct location and show the highlite
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com
  • routhu
  • Beginner
  • Beginner
  • User avatar
  • Joined: Feb 28, 2007
  • Posts: 47
  • Loc: India
  • Status: Offline

Post December 17th, 2007, 9:53 pm

Hi graphixboy,

Thank for your reply.

I didn't understand what you say, can you please give me a example.

Thanks
krishna

graphixboy wrote:
Pass a variable to flash when the page loads...

You can do this with javascript or php etc.

Then in flash simply check for the correct location and show the highlite
:?
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1828
  • Loc: In the Great White North
  • Status: Offline

Post December 18th, 2007, 8:59 am

here's a tutorial...
http://www.kirupa.com/developer/actionscript/tricks/passingvariables.htm

basically you need to tell your flash file the current page.
For example PageID=5 so Flash should show location number 5 highlighted.
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 41 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.