mediengestalter.info
FAQ :: Mitgliederliste :: MGi Team

Willkommen auf dem Portal für Mediengestalter

Aktuelles Datum und Uhrzeit: Mi 24.04.2024 18:01 Benutzername: Passwort: Auto-Login

Thema: [Flash] Scrolltext wir abgeschnitten vom 21.05.2010


Neues Thema eröffnen   Neue Antwort erstellen MGi Foren-Übersicht -> Multimedia -> [Flash] Scrolltext wir abgeschnitten
Autor Nachricht
F.O.X
Threadersteller

Dabei seit: 19.04.2002
Ort: DA
Alter: 41
Geschlecht: Männlich
Verfasst Fr 21.05.2010 15:20
Titel

[Flash] Scrolltext wir abgeschnitten

Antworten mit Zitat Zum Seitenanfang

Hallo zusammen,

ich habe in Flash einen Scrolltext mit Hilfe eines
Movieclips erstellt (also vielmehr aus diversen Scripten zusammenkopiert *zwinker*.
Bis jetzt hat das auch immer super funktioniert, allerdings schneidet er
(nachdem ich den Text ergänzt habe) den unteren Teil des Textes ab.

Weiss vielleicht jemand woran das liegen könnte?

Hier mal das Script was auf den Scrollbars liegt:



function FScrollPaneClass()
{
this.init();
this.width = this._width;
this.height = this._height;
this._xscale = this._yscale = 100;
this.contentWidth = this.contentHeight = 0;

if (this.hScroll==undefined) {
this.hScroll=this.vScroll="auto";
this.dragContent = false;
}

this.offset = new Object();
function boolToString(str)
{
if (str=="false") return false;
if (str=="true") return true;
else return str;
}
this.vScroll = boolToString(this.vScroll);
this.hScroll = boolToString(this.hScroll);

this.attachMovie("FScrollBarSymbol", "hScrollBar_mc", 100, {hostStyle:this.styleTable});
this.hScrollBar_mc.setHorizontal(true);
this.hScrollBar_mc.setSmallScroll(5);
this.hScrollBar_mc.setChangeHandler("onScroll", this);

this.attachMovie("FScrollBarSymbol", "vScrollBar_mc", 99, {hostStyle:this.styleTable});
this.vScrollBar_mc.setSmallScroll(5);
this.vScrollBar_mc.setChangeHandler("onScroll", this);

this.setSize(this.width, this.height);
if (this.scrollContent!="") {
this.setScrollContent(this.scrollContent);
}
this.setDragContent(this.dragContent);
}

FScrollPaneClass.prototype = new FUIComponentClass();

Object.registerClass("FScrollPaneSymbol", FScrollPaneClass);


FScrollPaneClass.prototype.getScrollContent = function()
{
return this.content_mc;
}

FScrollPaneClass.prototype.getPaneWidth = function()
{
return this.width;
}

FScrollPaneClass.prototype.getPaneHeight = function()
{
return this.height;
}

FScrollPaneClass.prototype.getScrollPosition = function()
{
var xPos = (this.hScrollBar_mc==undefined) ? 0 : this.hScrollBar_mc.getScrollPosition();
var yPos = (this.vScrollBar_mc==undefined) ? 0 : this.vScrollBar_mc.getScrollPosition();

return {x:xPos, y:yPos};
}

FScrollPaneClass.prototype.setScrollContent = function(target)
{

this.offset.x = 0;
this.offset.y = 0;

// remove or hide the old movie clip
if ( this.content_mc != undefined ) {
if (target!=this.content_mc) {
this.content_mc._visible = false;
this.content_mc.removeMovieClip();
this.content_mc.unloadMovie();
}
}


if (typeof(target)=="string") {
this.attachMovie(target, "tmp_mc", 3);
this.content_mc = this.tmp_mc;
} else if (target==undefined) {
this.content_mc.unloadMovie();
} else {
this.content_mc = target;
}

this.localToGlobal(this.offset);
this.content_mc._parent.globalToLocal(this.offset);
this.content_mc._x = this.offset.x;
this.content_mc._y = this.offset.y;

var contentBounds = this.content_mc.getBounds(this);
this.offset.x = -contentBounds.xMin;
this.offset.y = -contentBounds.yMin;

this.localToGlobal(this.offset);
this.content_mc._parent.globalToLocal(this.offset);
this.content_mc._x = this.offset.x;
this.content_mc._y = this.offset.y;

this.contentWidth = this.content_mc._width;
this.contentHeight = this.content_mc._height;

// set up the mask
this.content_mc.setMask(this.mask_mc);
this.setSize(this.width, this.height);

}

FScrollPaneClass.prototype.setSize = function(w, h)
{
if (arguments.length<2 || isNaN(w) || isNaN(h)) return;
super.setSize(w,h);
this.width = Math.max(w, 60);
this.height = Math.max(h, 60);
this.boundingBox_mc._xscale = 100;
this.boundingBox_mc._yscale = 100;

// adjust the border size
this.boundingBox_mc._width = this.width;
this.boundingBox_mc._height = this.height;

this.setHandV();
this.initScrollBars();

// set up the mask
if (this.mask_mc==undefined) {
this.attachMovie("FBoundingBoxSymbol", "mask_mc", 3000);
}
this.mask_mc._xscale = 100;
this.mask_mc._yscale = 100;
this.mask_mc._width = this.hWidth;
this.mask_mc._height = this.vHeight;

this.mask_mc._alpha = 0;
}

FScrollPaneClass.prototype.setScrollPosition = function(x,y)
{
x = Math.max(this.hScrollBar_mc.minPos, x);
x = Math.min(this.hScrollBar_mc.maxPos, x);
y = Math.max(this.vScrollBar_mc.minPos, y);
y = Math.min(this.vScrollBar_mc.maxPos, y);
this.hScrollBar_mc.setScrollPosition(x);
this.vScrollBar_mc.setScrollPosition(y);
}

FScrollPaneClass.prototype.refreshPane = function()
{
this.setScrollContent(this.content_mc);
}

FScrollPaneClass.prototype.loadScrollContent = function(url, handler, location)
{
this.content_mc.removeMovieClip();
this.content_mc.unloadMovie();
this.content_mc._visible = 0;
this.loadContent.duplicateMovieClip("loadTemp", 3);
this.dupeFlag = true;
this.contentLoaded = function()
{
this.loadReady = false;
this.content_mc = this.loadTemp;
this.refreshPane();
this.executeCallBack();
}
this.setChangeHandler(handler, location);
this.loadTemp.loadMovie(url);
}

FScrollPaneClass.prototype.setHScroll = function(prop)
{
this.hScroll = prop;
this.setSize(this.width, this.height);
}

FScrollPaneClass.prototype.setVScroll = function(prop)
{
this.vScroll = prop;
this.setSize(this.width, this.height);
}

FScrollPaneClass.prototype.setDragContent = function(dragFlag)
{
if (dragFlag) {
this.boundingBox_mc.useHandCursor = true;
this.boundingBox_mc.onPress = function()
{
this._parent.startDragLoop();
}
this.boundingBox_mc.tabEnabled = false;
this.boundingBox_mc.onRelease = this.boundingBox_mc.onReleaseOutside = function()
{
this._parent.pressFocus();
this._parent.onMouseMove = null;
}
} else {
delete this.boundingBox_mc.onPress;
this.boundingBox_mc.useHandCursor = false;
}
}


FScrollPaneClass.prototype.setSmallScroll = function(x,y)
{
this.hScrollBar_mc.setSmallScroll(x);
this.vScrollBar_mc.setSmallScroll(y);
}



FScrollPaneClass.prototype.setHandV = function()
{
if ( (this.contentHeight-this.height>2 && this.vScroll!=false) || this.vScroll==true ) {
this.hWidth = this.width-this.vScrollBar_mc._width;
} else {
this.hWidth = this.width;
}
if ((this.contentWidth-this.width>2 && this.hScroll!=false) || this.hScroll==true ) {
this.vHeight = this.height-this.hScrollBar_mc._height;
} else {
this.vHeight = this.height;
}
}


FScrollPaneClass.prototype.startDragLoop = function()
{
this.tabFocused=false;
this.myOnSetFocus();
this.lastX = this._xmouse;
this.lastY = this._ymouse;
this.onMouseMove = function() {
this.scrollXMove = this.lastX-this._xmouse;
this.scrollYMove = this.lastY-this._ymouse;
this.scrollXMove += this.hScrollBar_mc.getScrollPosition();
this.scrollYMove += this.vScrollBar_mc.getScrollPosition();
this.setScrollPosition(this.scrollXMove, this.scrollYMove);
if (this.scrollXMove< this.hScrollBar_mc.maxPos && this.scrollXMove>this.hScrollBar_mc.minPos) {
this.lastX = this._xmouse;
}
if (this.scrollYMove< this.vScrollBar_mc.maxPos && this.scrollYMove>this.vScrollBar_mc.minPos) {
this.lastY = this._ymouse;
}

this.updateAfterEvent();
}
}

FScrollPaneClass.prototype.initScrollBars = function()
{
this.hScrollBar_mc._y = this.height-this.hScrollBar_mc._height;
this.hScrollBar_mc.setSize(this.hWidth);
this.hScrollBar_mc.setScrollProperties(this.hWidth, 0, this.contentWidth-this.hWidth);
this.vScrollBar_mc._visible = (this.hWidth==this.width) ? false : true;

this.vScrollBar_mc._x = this.width-this.vScrollBar_mc._width;
this.vScrollBar_mc.setSize(this.vHeight);
this.vScrollBar_mc.setScrollProperties(this.vHeight, 0, this.contentHeight-this.vHeight);
this.hScrollBar_mc._visible = (this.vHeight==this.height) ? false : true;
}

FScrollPaneClass.prototype.onScroll = function(component)
{
var pos = component.getScrollPosition();
var XorY = (component._name=="hScrollBar_mc") ? "x" : "y";
if (component._name=="hScrollBar_mc") {
this.content_mc._x = -pos+this.offset.x;
} else {
this.content_mc._y = -pos+this.offset.y;
}
}

FScrollPaneClass.prototype.myOnKeyDown = function()
{
var posX = this.hScrollBar_mc.getScrollPosition();
var posY = this.vScrollBar_mc.getScrollPosition();

if (this.hScrollBar_mc.maxPos > this.hScrollBar_mc.minPos) {
if (Key.isDown(Key.LEFT)) {
this.setScrollPosition(posX-3, posY);
} else if (Key.isDown(Key.RIGHT)) {
this.setScrollPosition(posX+3, posY);
}
}
if (this.vScrollBar_mc.maxPos > this.vScrollBar_mc.minPos) {
if (Key.isDown(Key.UP)) {
this.setScrollPosition(posX, posY-3);
} else if (Key.isDown(Key.DOWN)) {
this.setScrollPosition(posX, posY+3);
} else if (Key.isDown(Key.PGDN)) {
this.setScrollPosition(posX, posY+this.vScrollBar_mc.pageSize);
} else if (Key.isDown(Key.PGUP)) {
this.setScrollPosition(posX, posY-this.vScrollBar_mc.pageSize);
}
}
}

#endinitclip
this.deadPreview._visible = false;
  View user's profile Private Nachricht senden
F.O.X
Threadersteller

Dabei seit: 19.04.2002
Ort: DA
Alter: 41
Geschlecht: Männlich
Verfasst Fr 21.05.2010 16:43
Titel

Antworten mit Zitat Zum Seitenanfang

hmm .... niemand ´ne idee?

Die Fläche scrollt zwar bis zum Ende hin runter ... allerdings
ist am ende nur weisse Fläche und kein Text mehr zu sehen.
  View user's profile Private Nachricht senden
Anzeige
Anzeige
itac

Dabei seit: 15.04.2004
Ort: -
Alter: 48
Geschlecht: -
Verfasst Fr 04.06.2010 19:27
Titel

Antworten mit Zitat Zum Seitenanfang

Hallo,

hab dein script nur überflogen aber Du musst beim Scollen nur soweit scrollen:
Höhe des gescrollten MC - angezeigteFlächenhöhe (Maskenhöhe)

minscroll=0;
maxscroll=(content_mc.height-mask_mc.height)*-1;

salü
  View user's profile Private Nachricht senden Website dieses Benutzers besuchen
 
Ähnliche Themen Flash CS3: Wie erstelle ich Scrolltext mit Links?
[Flash] Scrolltext scrollt nicht :-(
Probleme mit Scrolltext
+++ Bitte um ScrollText Hilfe von Anfängerin +++
Wie erstelle ich in JavaScript einen Scrolltext?
pdf abgeschnitten bei mac os x!
Neues Thema eröffnen   Neue Antwort erstellen
MGi Foren-Übersicht -> Multimedia


Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst an Umfragen in diesem Forum nicht mitmachen.