PDA

Volledige versie bekijken : Tekst aanpassen in menu


Daxboy
%Europe/Berlin %626 %2008, 15:02
Heb onlangs een menu gedownload van op Flashmo en de .xml file aangepast om het menu te gebruiken als foto album kiezer.
Nu wordt als titel van het album de url van de link weergegeven in plaats van een titel die ik het album zou willen geven.
Heb wel wat rondgesleuteld met de actions maar geraak er niet echt wijzer uit.
Zou iemand kunnen helpen??

Hier is het menu zoals het nu werkt
http://www.newscafe.be/Export/Site/Pictures.html

en dit zijn de actions:

frame1:

photo_thumbnail = new Array();
photo_url = new Array();

filepath = "http://www.newscafe.be/files2/photos/";

// Load the photos XML
var flashmo_xml = new XML();
flashmo_xml.ignoreWhite = true;
flashmo_xml.onLoad = function()
{
var nodes:Array = this.firstChild.childNodes;
for(var i=0;i<nodes.length;i++)
{
photo_thumbnail.push(nodes[i].attributes.thumbnail);
photo_url.push(nodes[i].attributes.url); hier misschien?
}

}
flashmo_xml.load(filepath + "Thumblist.xml");



en in frame 5:

x_middle = Stage.width/2;
y_middle = Stage.height/2;

tn_group.tn._visible = false;
tn_group.setMask( tn_area );
tn_alpha_default = 100;
tn_spacing = 6;
p = 0;
info = "";

for( var i = 0; i < photo_thumbnail.length; i++ )
{
tn_group.tn.duplicateMovieClip("tn"+i, i);

tn_group["tn"+i].tn_pic.loadMovie( filepath + photo_thumbnail[i] );
tn_group["tn"+i].tn_pic2.loadMovie( filepath + photo_thumbnail[i] );
tn_group["tn"+i]._x = i * (tn_group.tn._width + tn_spacing);
tn_group["tn"+i]._y = tn._y;
tn_group["tn"+i].tn_pic._alpha = tn_alpha_default;
tn_group["tn"+i].tn_no = i;

tn_group["tn"+i].tn_button.onRollOver = function()
{
this._parent.tn_pic._alpha = 70;
_root.info = photo_url[this._parent.tn_no];
}
tn_group["tn"+i].tn_button.onRollOut = function()
{
this._parent.tn_pic._alpha = tn_alpha_default;
_root.info = "";
}
tn_group["tn"+i].tn_button.onRelease = function()
{
getURL( photo_url[this._parent.tn_no], "_blank" );
}
}

onEnterFrame = function()
{
if( _ymouse > tn_group._y - 30 and _ymouse < tn_group._y + tn_group._height )
{
x_speed = -(_xmouse - x_middle ) / 50;

if( _xmouse > x_middle + 200 )
{
if( tn_group._x + tn_group.tn._width > tn_area._width - tn_group._width + tn_area._x )
tn_group._x+=x_speed;
}
else if( _xmouse < x_middle - 200 )
{
if( tn_group._x - tn_group.tn._width < tn_area._x )
tn_group._x+=x_speed;
}
}

}


Voor zover ik geraakt ben veronderstel ik dat een "name:..." zal moeten gecreerd worden in de .wml file waar naar moet verwezen worden maar dit is me net niet gelukt :)

THX!!!

Jan
%Europe/Berlin %631 %2008, 15:09
Hier is het menu zoals het nu werkt
http://www.newscafe.be/Export/Site/Pictures.html
Je opent de links in een popup en iedereen blokkeert popups. :S
Volgens mij zit het bij IE7 al standaard ingesteld dat alle popups geblokkeerd worden. ;)

Laat die xml file eens zien.

:)
Groeten,
Jan

Daxboy
%Europe/Berlin %643 %2008, 15:26
de xml ziet er als volgt uit:

<?xml version="1.0" encoding="utf-8"?>
<photos>
<photo thumbnail="Shirley.jpg" url="http://www.newscafe.be/files2/Albums/Shirley/index.html" />
<photo thumbnail="Taste1.jpg" url="http://www.newscafe.be/files2/Albums/Taste1/index.html" />
<photo thumbnail="Pole31.jpg" url="http://www.newscafe.be/files2/Albums/Pole31/index.html" />

</photos>


Thnx voor de pop up tip by the way!
Was me net iets te logisch om aan te denken ;)

Jan
%Europe/Berlin %648 %2008, 15:34
Maak in die xml een attribute bij met de naam: albumNaam
<?xml version="1.0" encoding="utf-8"?>
<photos>
<photo thumbnail="Shirley.jpg" albumNaam="Shirley" url="http://www.newscafe.be/files2/Albums/Shirley/index.html" />
<photo thumbnail="Taste1.jpg" albumNaam="Taste1" url="http://www.newscafe.be/files2/Albums/Taste1/index.html" />
<photo thumbnail="Pole31.jpg" albumNaam="Pole31" url="http://www.newscafe.be/files2/Albums/Pole31/index.html" />

</photos>photo_url.push(nodes[i].attributes.url)//hier misschien?
En in je actionscript zet je als extra regels :

photo_thumbnail = new Array();
photo_url = new Array();
photo_albumNamen = new Array();//deze is nieuw

photo_url.push(nodes[i].attributes.url)
photo_albumNamen.push(nodes[i].attributes.albumNaam);//deze is nieuw
en een stukje verder:

tn_group["tn"+i].tn_button.onRollOver = function()
{
this._parent.tn_pic._alpha = 70;
//_root.info = photo_url[this._parent.tn_no]; // hiermee wordt de url getoond
_root.info = photo_albumNamen[this._parent.tn_no];//hiermee wordt de albumNaam getoond
}

Groeten,
Jan

Daxboy
%Europe/Berlin %669 %2008, 16:04
Schitterend!
HEEL hard bedankt!
Bij deze weeral iets bijgeleerd...
THX!