Computerhilfen.de Logo
Forum
Tipps
News

In Action Script Bildergallery funktioniert nicht richtig

Gute Abend liebes Forum,

Ich habe in ein Flash Site eine Bildergallery (Template) eingebunden. Nachdem man im Menü die Bildergallery auswählt, wird Sie ziemlich prima dargestellt. Wenn man dann nun ins Hauptmenü zurückkehrt und dann nochmal die Bildergallery wählt wird:
-In 1. Linie Die Bilder der Bildergallery nicht mehr angezeigt (Nur der Schnitt)
-Sekundär wird die komplette Seite dann total langsam...

Habe schon einiges ausprobiert leider ohne erfolg...

das ist der Code der Bildergallery:

 

Zitat
/*
Created by Min Thu
   http://www.flashmo.com
   
AS3 References and Credits
   http://blog.papervision3d.org/
   http://theflashblog.com/?p=306
   http://www.gotoandlearn.com/
   http://www.onerutter.com/
   http://labs.blitzagency.com/
   http://vilebody.wordpress.com/2007/11/29/3d-papervision-plane-events/
*/
import org.papervision3d.scenes.*;
import org.papervision3d.cameras.*;
import org.papervision3d.objects.*;
import org.papervision3d.materials.*;
import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.display.Sprite;
import flash.events.MouseEvent;

var container:Sprite = new Sprite();
container.x = stage.stageWidth * 0.5;
container.y = 160;
addChild(container);

var scene:Scene3D = new MovieScene3D(container);
var cam:Camera3D = new Camera3D();
cam.zoom = 6.5;

tn_title.text = "";
tn_desc.text = "";
tn_url.text = "";

var p_dict:Dictionary=new Dictionary();
var pc:Plane = new Plane();
pc.visible = false;
cam.target = pc;

var numOfRotations:Number = 3;
var yPos:Number = 0;
var angle:Number = 0;

var filename_list = new Array();
var url_list = new Array();
var url_target_list:Array = new Array();
var title_list = new Array();
var description_list = new Array();
var folder:String = "thumbnails/";

var i:Number;
var j:Number = 0;
var k:Number = 0;
var l:Number = 0;
var m:Number = 0;
var total:Number;
var flashmo_xml:XML = new XML();
var loader:URLLoader = new URLLoader();
loader.load(new URLRequest("thumbnail_list_2.xml"));
loader.addEventListener(Event.COMPLETE, create_thumbnail);

function create_thumbnail(e:Event):void
{
   flashmo_xml = XML(e.target.data);
   total = flashmo_xml.thumbnail.length();
   var anglePer:Number = ((Math.PI*2) * numOfRotations) / total;
   
   for( i = 0; i < total; i++ )
   {
      url_list.push( flashmo_xml.thumbnail.@url.toString() );
      url_target_list.push( flashmo_xml.thumbnail.@target.toString() );
      title_list.push( flashmo_xml.thumbnail.@title.toString() );
      description_list.push( flashmo_xml.thumbnail.@description.toString() );
     
      var bfm:BitmapFileMaterial = new BitmapFileMaterial(
         folder + flashmo_xml.thumbnail.@filename.toString());
      bfm.oneSide = false;
      bfm.smooth = true;
      var p:Plane = new Plane(bfm, 140, 105, 2, 2);
      scene.addChild(p);
      var p_container:Sprite = p.container;
      p_container.name = "flashmo_" + i;
      p_dict[p_container] = p;

      p_container.buttonMode = true;
      p_container.addEventListener( MouseEvent.ROLL_OVER, p_rollover );
      p_container.addEventListener( MouseEvent.ROLL_OUT, p_rollout );
      p_container.addEventListener( MouseEvent.CLICK, p_click );
     
      p.rotationY = (-i*anglePer) * (180/Math.PI) + 270;
      p.x = Math.cos(i * anglePer) * 185;
      p.z = Math.sin(i * anglePer) * 185;
      p.y = yPos;

      if( (i+1) % 8 == 0 )
      {
          yPos += 115;
      }
   }
}

function p_rollover(me:MouseEvent)
{
   var sp:Sprite = me.target as Sprite;
   var tw1:Tween = new Tween(sp, 'scaleX', Strong.easeOut, 1, 1.14, 0.5, true);
   var tw2:Tween = new Tween(sp, 'scaleY', Strong.easeOut, 1, 1.14, 0.5, true);
   var s_no:Number = parseInt(sp.name.slice(8,10));
   tn_title.text = title_list[s_no];
   tn_desc.text = description_list[s_no];
   tn_url.text = url_list[s_no];
}
function p_rollout(me:MouseEvent)
{
   var sp:Sprite = me.target as Sprite;
   var tw1:Tween = new Tween(sp, 'scaleX', Strong.easeOut, 1.14, 1, 0.5, true);
   var tw2:Tween = new Tween(sp, 'scaleY', Strong.easeOut, 1.14, 1, 0.5, true);
   tn_title.text = "";
   tn_desc.text = "";
   tn_url.text = "";
}
function p_click(me:MouseEvent)
{
   var sp:Sprite = me.target as Sprite;
   var s_no:Number = parseInt(sp.name.slice(8,10));
   navigateToURL(new URLRequest(url_list[s_no]), url_target_list[s_no]);
}

addEventListener(Event.ENTER_FRAME, render);

function render(e:Event):void
{
   var dist2:Number = ((stage.mouseX) - stage.stageWidth * 0.5) * 0.00015;
   angle += dist2;
   cam.x = Math.cos(angle) * 900;
   cam.z = Math.sin(angle) * 900;
   
   var new_zoom = 10 - stage.mouseY * 0.01;
   cam.zoom += ( new_zoom - cam.zoom ) * 0.05;
   cam.y = cam.zoom * 85 - 220;
   pc.y = cam.y * 0.5;
   scene.renderCamera(cam);
}

Vielen dank im voraus!
« Meldung von Website - FensterGratis Webspace »
 

Schnelle Hilfe: Hier nach ähnlichen Fragen und passenden Tipps suchen!