打印

[编程] flash023大哥,你不救我,我生活没盼头了!

var photos_array = new Array();
var picbox_strecke = 696-93;
var picfolder = "pictures/";

_global.picpath;
_global.tiefe = 1;
_global.indexMySelection;

function ergaenzeHistory(pic){

       gewaehlt = picfolder+picpath+"/"+pic
       var MySelection_string = MySelection_array.join();
       
       
       if(MySelection_string.indexOf(gewaehlt) == -1){
              
              MySelection_array.push(picfolder+picpath+"/"+pic);
              history_mc.tmp_mc.attachMovie("picbox_mc", pic, tiefe ,{pic_txt: pic, shooting: picpath});
              history_mc.tmp_mc[pic].ladejpg(pic); //laden       
              MyHistory_array.push(picfolder+picpath+"/"+pic);
              indexMySelection = MyHistory_array.length-1;
              
              history_mc.tmp_mc[pic].selectPicboxHistory(pic, picfolder+picpath+"/");
              history_mc.tmp_mc[pic]._xscale = 70;
              history_mc.tmp_mc[pic]._yscale = 70;
              
              
                     
                     history_mc.tmp_mc[pic]._x = 72;
                     history_mc.tmp_mc[pic]._y = (Math.ceil(MySelection_array.length/2)*60)-60;
              }else{
                     
                     history_mc.tmp_mc[pic]._x = 4;
                     history_mc.tmp_mc[pic]._y = (Math.ceil(MySelection_array.length/2)*60)-60;
              }
              history_mc.refreshPane();              
       }


pictures = function(){
}

Object.registerClass("picbox_mc", pictures);
pictures.prototype = new MovieClip();


pictures.prototype.spreadPicbox= function(){

       this._x = random(picbox_strecke);
       this._y = 5 + random(40);

       this._rotation = randomnumber(-5, 5);
}

pictures.prototype.ladejpg = function(pictures){
       this.pic_mc.loadMovie(picfolder+picpath+"/"+pic);
}


pictures.prototype.ReleaseHandler = function(pictures, ursprungx, ursprungy){
       this.stopDrag();


       delete this.onEnterFrame;
       delete stopit;
       delete cnt;

       if(this._droptarget != "/showbox_mc" && this._droptarget != "/showbox_mc/container_mc"){                     

              if((this._x > 700) || (this._x < 0) || (this._y > 100) || (this._y < 0)){
                     this.onEnterFrame=function(){
                            if(this._x != urspr_x){
                                   this._x -= ((this._x-ursprungx)/2);
                                   this._y -= ((this._y-ursprungy)/4);
                            }else{
                                   delete this.onEnterFrame;
                            }
                     }
              }
       }else{

              pic_reset();
              showbox_mc.container_mc.loadMovie(picfolder+shooting_cb.getValue()+"/"+pic);
              ergaenzeHistory(pic);
              this.pic_mc._alpha=30;
              this._rotation = urspr_rot;
              this.onEnterFrame=function(){
                     if(this._x != ursprungx){
                            this._x -= ((this._x-ursprungx)/2);
                            this._y -= ((this._y-ursprungy)/4);
                     }else{
                            delete this.onEnterFrame;
                     }
              }


pic.prototype.selectPicboxHistory = function(pic){
       this.useHandCursor = false;
       this.onPress=function(){
              _root.attachMovie("picbox_mc", "p", tiefe++, {pic_txt: pic});
              _root.p._xscale = 70;
              _root.p._yscale = 70;
              _root.p.pic_mc.loadMovie(picfolder+this.shooting+"/"+pic);
              MyHistory_array.push(picfolder+this.shooting+"/"+pic);
              indexMySelection = MyHistory_array.length-1;
              _root.p.drag(pic, this.shooting);
       }       
}

//vom pane auf die buehne
pic.prototype.drag = function(pictures, shooting){
       this._x = _root._xmouse - 20;
       this._y = _root._ymouse - 20;

       this.onRollOver=function(){
              if(this._droptarget == "/showbox_mc/container_mc"){
                     pic_reset();
                     //mini-pic in dragsequenz laden
                     showbox_mc.container_mc.loadMovie(picfolder+shooting+"/"+pic);
              }
              removeMovieClip(this);
       }       
       if (hitTest( _root._xmouse, _root._ymouse, false)){;
              this.startDrag();
       }       
}



movieclip.prototype.movement = function(){
       this.useHandCursor=false;
       this.onPress = function(){
              var abstandx = 20;
              var abstandy = 70;
              var links = ((this._width/2)-260)-abstandx;
              var top = ((this._height/2)-195)-abstandy;
              var right = ((this._width/2)-260)+abstandx;
              var below = ((this._height/2)-195)+abstandy;
              this.startDrag(false, 260-links, 195-top, 260+right, 195+below);
       }
       this.onRelease = function(){
              this.stopDrag();
       }
       this.onReleaseOutside = function(){
              this.stopDrag();
       }       
}


shooting_lv = new LoadVars();
shooting_lv.onLoad = function(){
       var shootings_array = new Array();
       for(var i=0; i<this.anz_shootings; i++){
              shootings_array = this.folder.split("|");
       }
       shooting_cb.setDataProvider(shootings_array);
}
shooting_lv.load("pictures/config.txt",shooting_lv,"GET");

shooting_cb.setChangeHandler("ladePicboxPreview");
ladePicboxPreview = function(){
       _global.picpath = shooting_cb.getValue();
       
       pictures_lv.Load(picfolder+picpath+"/pictures.txt", pictures_lv, "GET");
}


pictures_lv = new LoadVars();
pictures_lv.onLoad = function(){
       showbox_mc.movement();
       _root.container_thumbs_mc.removeMovieClip();
       _root.createEmptyMovieClip("container_thumbs_mc", tiefe++)
       container_thumbs_mc._x = 50
       container_thumbs_mc._y = 470;

       for(var i=0; i<this.anz_pictures; i++){
              photos_array = this.photos.split("|");
              container_thumbs_mc.attachMovie("picbox_mc", "picbox"+i, tiefe++,{pic_txt: photos_array[i]});
              container_thumbs_mc["picbox"+i].spreadPicbox();
              container_thumbs_mc["picbox"+i].ladejpg(photos_array[i]);
              container_thumbs_mc["picbox"+i].selectPicbox(photos_array[i]);
       }
}


stop();



我折腾了一天半了,那些小图标怎么还是显示不出来……我的小心肝呀,你们快出来呀,可把我急死了。

flash023大哥,你帮我看看吧,我对这这些代码上看下看,都要老眼昏花了





http://xn--b9wn46ayrcowp.com/download/Test_2008_05_11_22_40.rar

[ 本帖最后由 insistwo 于 2008-5-12 11:42 编辑 ]

TOP


有点受不了`

TOP

太长了   
妞,来给爷香个!

TOP

谁来救我啊,我想她!!!!!呜呜呜!
我在单位,电脑上没装FLASH,看不到哦。
http://www.flash023.cn 终极讨厌

TOP

无能为力
我也在一边想我的她一边写脚本,要不就没有动力写了。
再说能力有限
看着flash里面AS编辑窗口那比鼠标还短小4毫米的滚动条
想死

TOP

- -!意外的文件格式
想打开瞅瞅都没盼头
貌似AS3?

TOP