Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 16-08-2005, 14:30   #1 (permalink)
... loves Japan!
 
Benutzerbild von compuboy1010
 
Registriert seit: Apr 2005
Ort: D'dorf; DE
Beiträge: 715
Kann eine Scrollpane nur SWFs und Bilder aufnehmen?

Hallo,

kann eine Scrollpane nur SWFs und bIlder aufnehmen?
Ich will einen Movieclip in einer SP unterbringen aber es klappt nicht. Kann man nur Bilder und SWFs laden?
compuboy1010 ist offline   Mit Zitat antworten
Alt 16-08-2005, 14:33   #2 (permalink)
................
 
Benutzerbild von Der Frager
 
Registriert seit: Jun 2004
Beiträge: 15.890
Tag!
Was meinst du mit "Movieclip"? Einen Flash-Film aus der Bibliothek oder was anderes?
__________________

ternärer Konditionaloperator

+++ Bitte keine Privat-Nachrichten bezüglich Flashfragen! +++
Der Frager ist offline   Mit Zitat antworten
Alt 16-08-2005, 14:40   #3 (permalink)
... loves Japan!
 
Benutzerbild von compuboy1010
 
Registriert seit: Apr 2005
Ort: D'dorf; DE
Beiträge: 715
Ja, genau. Einen MC aus der Bibliothek.
Es wird genau ein item Film angezeigt. Aber die Daten fehlen.

Geändert von compuboy1010 (16-08-2005 um 14:50 Uhr)
compuboy1010 ist offline   Mit Zitat antworten
Alt 16-08-2005, 14:51   #4 (permalink)
................
 
Benutzerbild von Der Frager
 
Registriert seit: Jun 2004
Beiträge: 15.890
Jo, geht. ScrollPane Inatanznamen verpassen (z.B. sp) MC in der Bibliothek unter Verknüpfung einen Bezeichener geben (z.B. mc) und dann:
ActionScript:
  1. this.sp.contentPath = "mc"
__________________

ternärer Konditionaloperator

+++ Bitte keine Privat-Nachrichten bezüglich Flashfragen! +++
Der Frager ist offline   Mit Zitat antworten
Alt 16-08-2005, 14:58   #5 (permalink)
... loves Japan!
 
Benutzerbild von compuboy1010
 
Registriert seit: Apr 2005
Ort: D'dorf; DE
Beiträge: 715
Hi,

ja meine Scrollpane hat einen instanznamen, aber es wird nur ein Artikel angezeigt. Könnte das onEnterFrame Probleme machen?
Oder überschreibt der sich wieder. Dürfte eingentlich nicht. Komisch.Die Daten werden nun auch angezeigt, aber es erscheint wie gesagt nur ein Artikel. Schau mal hier:

ActionScript:
  1. function displayOrderinfo():Void {
  2.     var yPosition:Number;
  3.     this.mcSection.removeMovieClip();
  4.     var myStyle = new TextField.StyleSheet();
  5.     myStyle.load("style/styles.css");
  6.     this.createEmptyMovieClip("mcSection", getNextHighestDepth());
  7.     this.mcSection.attachMovie("itemlist", "mcItemlist", this.getNextHighestDepth(), {_x:0, _y:60});
  8.     onEnterFrame = function() {
  9.        delete this.onEnterFrame;
  10.         this.mcSection.mcItemlist.spItemlist.setStyle("borderStyle", "none")
  11.         this.mcSection.mcItemlist.spItemlist.setStyle("backgroundColor", 0xffffff);;
  12.         this.mcSection.mcItemlist.spItemlist.createEmptyMovieClip("container", this.getNextHighestDepth());
  13.         for(var i:Number = 0; i < _global.aItems.length; i++) {
  14.             this.mcSection.mcItemlist.spItemlist.container.attachMovie("item", "mcItem"+i, this.getNextHighestDepth());
  15.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i]._x = 5;
  16.            yPosition = (this.mcSection.mcItemlist.spItemlist["mcItem"+i]._height*i)+30;
  17.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i]._y += yPosition;
  18.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tAb1.text = _global.aItems[i]["ab1"];
  19.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tAb4.text = _global.aItems[i]["ab4"];
  20.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tAb6.text = _global.aItems[i]["ab6"];
  21.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tAb12.text = _global.aItems[i]["ab12"];     
  22.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tDescription.text = _global.aItems[i]["description"];           
  23.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tItemNo.text = _global.aItems[i]["no"];     
  24.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tVpe.text = _global.aItems[i]["vpe"];           
  25.         }
  26.     };
  27.     _level0.main.tTest.text = _global.aItems[i]["ab12"];
  28. }
compuboy1010 ist offline   Mit Zitat antworten
Alt 16-08-2005, 15:01   #6 (permalink)
... loves Japan!
 
Benutzerbild von compuboy1010
 
Registriert seit: Apr 2005
Ort: D'dorf; DE
Beiträge: 715
Aha, du meinst also so?

ActionScript:
  1. this.mcSection.mcItemlist.spItemlist.contentPath = createEmptyMovieClip("container", this.getNextHighestDepth());
compuboy1010 ist offline   Mit Zitat antworten
Alt 16-08-2005, 15:02   #7 (permalink)
................
 
Benutzerbild von Der Frager
 
Registriert seit: Jun 2004
Beiträge: 15.890
Lass dir mal die nextHighestDeph()-Geschichte tracen oder klopp die raus. So irgendwie:
PHP-Code:
function displayOrderinfo():Void {
    var 
yPosition:Number;
    
this.mcSection.removeMovieClip();
    var 
myStyle = new TextField.StyleSheet();
    
myStyle.load("style/styles.css");
    
this.createEmptyMovieClip("mcSection"getNextHighestDepth());
    
this.mcSection.attachMovie("itemlist""mcItemlist"this.getNextHighestDepth(), {_x:0_y:60});
    
onEnterFrame = function () {
        
delete this.onEnterFrame;
        
this.mcSection.mcItemlist.spItemlist.setStyle("borderStyle""none");
        
this.mcSection.mcItemlist.spItemlist.setStyle("backgroundColor"0xffffff);
        
this.mcSection.mcItemlist.spItemlist.createEmptyMovieClip("container"1);
        for (var 
0i<_global.aItems.lengthi++) {
            
this.mcSection.mcItemlist.spItemlist.container.attachMovie("item""mcItem"+ii);
            
this.mcSection.mcItemlist.spItemlist.container["mcItem"+i]._x 5;
            
yPosition = (this.mcSection.mcItemlist.spItemlist["mcItem"+i]._height*i)+30;
            
this.mcSection.mcItemlist.spItemlist.container["mcItem"+i]._y += yPosition;
            
this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tAb1.text _global.aItems[i]["ab1"];
            
this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tAb4.text _global.aItems[i]["ab4"];
            
this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tAb6.text _global.aItems[i]["ab6"];
            
this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tAb12.text _global.aItems[i]["ab12"];
            
this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tDescription.text _global.aItems[i]["description"];
            
this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tItemNo.text _global.aItems[i]["no"];
            
this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tVpe.text _global.aItems[i]["vpe"];
        }
    };
    
_level0.main.tTest.text _global.aItems[i]["ab12"];

__________________

ternärer Konditionaloperator

+++ Bitte keine Privat-Nachrichten bezüglich Flashfragen! +++
Der Frager ist offline   Mit Zitat antworten
Alt 16-08-2005, 15:21   #8 (permalink)
... loves Japan!
 
Benutzerbild von compuboy1010
 
Registriert seit: Apr 2005
Ort: D'dorf; DE
Beiträge: 715
Klappt! Aber ...
Das Problem ist nun, dass die Scrollpane so nicht mehr funzt.
Nun wandern die Artikel über die SP hinaus und es erscheint kein Scrollbalken.

ActionScript:
  1. function displayOrderinfo():Void {
  2.     var yPosition:Number;
  3.     this.mcSection.removeMovieClip();
  4.     var myStyle = new TextField.StyleSheet();
  5.     myStyle.load("style/styles.css");
  6.     this.createEmptyMovieClip("mcSection", getNextHighestDepth());
  7.     this.mcSection.attachMovie("itemlist", "mcItemlist", this.getNextHighestDepth(), {_x:0, _y:60});
  8.     onEnterFrame = function() {
  9.        delete this.onEnterFrame;
  10.         this.mcSection.mcItemlist.spItemlist.setStyle("borderStyle", "none")
  11.         this.mcSection.mcItemlist.spItemlist.setStyle("backgroundColor", 0xffffff);;
  12.         this.mcSection.mcItemlist.spItemlist.createEmptyMovieClip("container", 1);
  13.         for(var i:Number = 0; i < _global.aItems.length; i++) {
  14.             this.mcSection.mcItemlist.spItemlist.container.attachMovie("item", "mcItem"+i, i);
  15.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i]._x = 5;
  16.             yPosition = (this.mcSection.mcItemlist.spItemlist.container["mcItem"+i]._height*i)+30;
  17.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i]._y += yPosition;
  18.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tAb1.text = _global.aItems[i]["ab1"];
  19.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tAb4.text = _global.aItems[i]["ab4"];
  20.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tAb6.text = _global.aItems[i]["ab6"];
  21.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tAb12.text = _global.aItems[i]["ab12"];     
  22.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tDescription.text = _global.aItems[i]["description"];           
  23.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tItemNo.text = _global.aItems[i]["no"];     
  24.             this.mcSection.mcItemlist.spItemlist.container["mcItem"+i].tVpe.text = _global.aItems[i]["vpe"];           
  25.         }
  26.     };
  27. }

Geändert von compuboy1010 (16-08-2005 um 15:23 Uhr)
compuboy1010 ist offline   Mit Zitat antworten
Alt 16-08-2005, 15:48   #9 (permalink)
................
 
Benutzerbild von Der Frager
 
Registriert seit: Jun 2004
Beiträge: 15.890
Mach's doch einfach so: Leern MC in die Bibliotehk packen, den als contentPath nehmen und da rein attachen:
ActionScript:
  1. this.sp.contentPath = "leerMC"
  2. this.sp.spContentHolder.attachMovie("mc","mc",1)
__________________

ternärer Konditionaloperator

+++ Bitte keine Privat-Nachrichten bezüglich Flashfragen! +++
Der Frager ist offline   Mit Zitat antworten
Alt 16-08-2005, 15:59   #10 (permalink)
... loves Japan!
 
Benutzerbild von compuboy1010
 
Registriert seit: Apr 2005
Ort: D'dorf; DE
Beiträge: 715
Jo,

nun ist alles weg. Das geht garnicht.

ActionScript:
  1. function displayOrderinfo():Void {
  2.     var yPosition:Number;
  3.     this.mcSection.removeMovieClip();
  4.     var myStyle = new TextField.StyleSheet();
  5.     this.createEmptyMovieClip("mcSection", getNextHighestDepth());
  6.     this.mcSection.attachMovie("itemlist", "mcItemlist", this.getNextHighestDepth(), {_x:0, _y:60});
  7.     onEnterFrame = function() {
  8.        delete this.onEnterFrame;
  9.         this.mcSection.mcItemlist.spItemlist.setStyle("borderStyle", "none")
  10.         this.mcSection.mcItemlist.spItemlist.setStyle("backgroundColor", 0xffffff);
  11.         this.mcSection.mcItemlist.spItemlist.contentPath= "empty";
  12.         for(var i:Number = 0; i < _global.aItems.length; i++) {
  13.             this.mcSection.mcItemlist.spItemlist.empty.attachMovie("item", "mcItem"+i, i);
  14.             this.mcSection.mcItemlist.spItemlist.empty["mcItem"+i]._x = 5;
  15.             yPosition = (this.mcSection.mcItemlist.spItemlist.empty["mcItem"+i]._height*i);
  16.             this.mcSection.mcItemlist.spItemlist.empty["mcItem"+i]._y += yPosition;
  17.             this.mcSection.mcItemlist.spItemlist.empty["mcItem"+i].tAb1.text = _global.aItems[i]["ab1"];
  18.             this.mcSection.mcItemlist.spItemlist.empty["mcItem"+i].tAb4.text = _global.aItems[i]["ab4"];
  19.             this.mcSection.mcItemlist.spItemlist.empty["mcItem"+i].tAb6.text = _global.aItems[i]["ab6"];
  20.             this.mcSection.mcItemlist.spItemlist.empty["mcItem"+i].tAb12.text = _global.aItems[i]["ab12"];     
  21.             this.mcSection.mcItemlist.spItemlist.empty["mcItem"+i].tDescription.text = _global.aItems[i]["description"];           
  22.             this.mcSection.mcItemlist.spItemlist.empty["mcItem"+i].tItemNo.text = _global.aItems[i]["no"];     
  23.             this.mcSection.mcItemlist.spItemlist.empty["mcItem"+i].tVpe.text = _global.aItems[i]["vpe"];           
  24.         }
  25.     };
  26. }

Geändert von compuboy1010 (16-08-2005 um 16:02 Uhr)
compuboy1010 ist offline   Mit Zitat antworten
Alt 16-08-2005, 16:08   #11 (permalink)
................
 
Benutzerbild von Der Frager
 
Registriert seit: Jun 2004
Beiträge: 15.890
Du sollst das auch nicht in "empty" attachen, sondern in "spContentHolder"
ActionScript:
  1. this.mcSection.mcItemlist.spItemlist.spContentHolder["mcItem"+i]._x = 5;
...zum Beispiel.
__________________

ternärer Konditionaloperator

+++ Bitte keine Privat-Nachrichten bezüglich Flashfragen! +++
Der Frager ist offline   Mit Zitat antworten
Alt 16-08-2005, 16:12   #12 (permalink)
... loves Japan!
 
Benutzerbild von compuboy1010
 
Registriert seit: Apr 2005
Ort: D'dorf; DE
Beiträge: 715
Du meinst also mit zwei Scrollpanes arbeiten? Warum?
compuboy1010 ist offline   Mit Zitat antworten
Alt 16-08-2005, 16:21   #13 (permalink)
................
 
Benutzerbild von Der Frager
 
Registriert seit: Jun 2004
Beiträge: 15.890
Nein, meine ich nicht. Guck dir den Anhang an. Die ScrollPane fehlt, weil zu große Datei. Einfach noch die ScrollPane auf die Bühne ziehen und der den Instanznamen "sp" geben...
Angehängte Dateien
Dateityp: rar bsp1.rar (3,6 KB, 11x aufgerufen)
__________________

ternärer Konditionaloperator

+++ Bitte keine Privat-Nachrichten bezüglich Flashfragen! +++
Der Frager ist offline   Mit Zitat antworten
Alt 17-08-2005, 08:19   #14 (permalink)
... loves Japan!
 
Benutzerbild von compuboy1010
 
Registriert seit: Apr 2005
Ort: D'dorf; DE
Beiträge: 715
Das funzt, aber wer oder was ist spContentHolder? Wo kommt das her?
compuboy1010 ist offline   Mit Zitat antworten
Alt 17-08-2005, 11:45   #15 (permalink)
................
 
Benutzerbild von Der Frager
 
Registriert seit: Jun 2004
Beiträge: 15.890
Hab ich die Komponenten zusammengeschraubt? Frag Macromedia ...
__________________

ternärer Konditionaloperator

+++ Bitte keine Privat-Nachrichten bezüglich Flashfragen! +++
Der Frager ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 17:38 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele