Ciao a tutti,
ho un problemino nello scroll del testo che trovate sotto Highlights -> Technical Sheets di QUESTO sito.
Ho 14 MC che scorrono grazie a questo AS, funziona ma manda al 100% la CPU:
Mi hanno consigliato di usare una cosa del genere:codice:on (rollOver) { _parent.MouseIsOver = true; if (_parent.sheetSelected != this) { this.LabelText.textColor = _root.RollOverColor; } this.LabelOver = true; } on (rollOut) { _parent.MouseIsOver = false; this.LabelOver = false; } on (release) { _parent.sheetSelected = this; this.visited = true; } onClipEvent (enterFrame) { if (_parent.sheetSelected == this) { this.LabelText.textColor = _root.SelectedColor; } else if ((!this.LabelOver) and (!this.visited)){ this.LabelText.textColor = _root.UnselectedColor; } else if ((!this.LabelOver) and (this.visited)){ this.LabelText.textColor = _root.VisitedColor; } if (!_parent.MouseIsOver) { if (((_parent.LabelStep > 0 ) and (this._x <= _parent.LabelEnd)) or ((_parent.LabelStep < 0 ) and (this._x >= _parent.LabelEnd))) { this._x += _parent.LabelHome; } else { this._x -= _parent.LabelStep; } } }
il problema che cosi' si muove tutto il contenitore e quando esce dalla zona visibile si spostata in toto alla posizione di partenza.codice:this.onEnterFrame = function() { if (this._x >= 0) { this._x -= _parent.LabelStep; } else { this._x += _parent.LabelHome; } }
Dove sbaglio?!?!?
Thanks.




Rispondi quotando
