Rollover effect In AS3 [Flash 9]
| Beiträge: 4 Registriert: Jun 2011
| 22.06.2011, 09:09
HI,
habe einen Problem wobei ich aktuel nicht weiterkomme.
Ziel ist hirbei das beim Rollover sich die textfarbe andert, was in diesen fall nicht funksioniert.
Vielleicht konnt ihr mir weiterhelfen mit dem unteren Code.
ai._visible = false;
updateMenu = function()
{
var meuXML:XML = new XML();
meuXML.ignoreWhite = true;
meuXML.load("xml/menu.xml");
meuXML.onLoad = function(ok)
{
if(ok)
{
var childs:XMLNode = meuXML.firstChild;
var childTotal:Number = childs.childNodes.length;
nMenuName = new Array();
nMenuTarget = new Array();
for (var i = 0; i < childTotal; i++)
{
nMenuName[i] = (childs.childNodes[i].childNodes[0].firstChild.nodeValue);
nMenuTarget[i] = (childs.childNodes[i].childNodes[1].firstChild.nodeValue);
}
picsList.autoSize = true;
comboBoxEntries = new Array();
comboBoxEntries = nMenuName;
for(i=0; i<comboBoxEntries.length; i++)
{
var NNN = i+1;
}
fcdc = function()
{
for (var i = 0; i<NNN; i++)
{
if (i != mSelection)
{
_root.menuHead["ai"+i].enabled = true;
_root.menuHead["ai"+i].useHandCursor = true;
_root.menuHead["ai"+i].fd_txt._visible = false;
}
}
}
var v:Number;
var space:Number = 3; //Space Between Menu
for (var i = 0; i<NNN; i++)
{
duplicateMovieClip (ai,"ai" + i, i);
_root.menuHead["ai"+i].fd_txt._visible = false;
_root.menuHead["ai"+i].num_txt.autoSize = false;
_root.menuHead["ai"+i].num_txt.text = nMenuName[i];
_root.menuHead["ai"+i].fd_txt._width = _root.menuHead["ai"+i].num_txt._width + 10;
//_root.menuHead["ai"+i].breaker._x = _root.menuHead["ai"+i].num_txt._width + 25; // ALIGN RIGHT END FOR MENU
_root.menuHead["ai"+i]._x = _root.menuHead["ai"+(i-1)]._x + _root.menuHead["ai"+(i-1)]._width + space;
_root.menuHead["ai"+i]._y = _root.menuHead.ai._y;
//_root.menuHead["ai"+(NNN-1)].breaker._visible = false; // HIDE THE LAST BREAKER
_root.menuHead["ai"+i].i = i;
// ON ROLL OVER ADDITIONAL IMAGES BUTTON
_root.menuHead["ai"+i].onRollOver = function ()
{
this.textColor==(0xFF0000);
}
//// ON ROLL OVER ADDITIONAL IMAGES BUTTON
// _root.menuHead["ai"+i].onRollOver = function()
// {
// this.fd_txt._visible = true;
// }
// ON ROLL OUT ADDITIONAL BUTTONS
_root.menuHead["ai"+i].onRollOut = _root.menuHead["ai"+i].onReleaseOutside = function()
{
this.fd_txt._visible = false;
//this.menuHead["ai"+i].num_txt.gotoAndStop(2);
//this.ai.num_txt.setRGB=(0x1e1e1e)
//this.ai.setRGB("0x1e1e1e");
}
// ON RELEASE ADDITIONAL BUTTONS
_root.menuHead["ai"+i].onRelease = function()
{
_global.mSelection = this.i;
this.enabled = false;
//this.num_txt.textColor (0x1e1e1e)
//this.gotoAndStop(2);
this.useHandCursor = false;
fcdc();
_global.WHICHSWFTOLOAD = nMenuTarget[mSelection];
preloadSwf();
}
}
}
_global.WHICHSWFTOLOAD = nMenuTarget[0];
preloadSwf();
}
}
updateMenu(); | | | Beiträge: 53 Wohnort: Berlin Registriert: Jul 2010
| 23.06.2011, 17:43
Es ist aber kein AS 3.0! | |
| Ähnliche Beiträge zum Thema | |
|
Flashhilfe.de Flash Platform Tipps & Tutorials Flash Platform Andere Programmiersprachen Jobangebote Diskussionen
Flashhilfe News
Regeln & Bedingungen
|