Scholieren.com forum

Scholieren.com forum (https://forum.scholieren.com/index.php)
-   Software & Hardware (https://forum.scholieren.com/forumdisplay.php?f=20)
-   -   Vraagje over flash cs3 (https://forum.scholieren.com/showthread.php?t=1663719)

maxwell 20-01-2008 22:34

Vraagje over flash cs3
 
Ik ben bezig met een mp3 speler in flash maar ik krijg telkens opnieuw een fout, ik weet niet of dit is iets is in mijn actions of omdat ik mijn actionscript in SEPY heb gemaakt. Ik vroeg me af of iemand dit zou willen nakijken?

Code:

// Setup sound object
var s:Sound = new Sound();
s.onSoundComplete = playSong;
s.setVolume(75);

// Array of songs
var sa:Array = new Array();

// Currently playing song
var cps:Number =-1;

//Load the songs XML
var xml:XML = new XML();
xml.ignoreWhite=true;
xml.onLoad=function()
{
  var nodes:Array=this.first.Child.childNodes;
  for(var i=0;i<nodes.length;i++)
  {
    sa.push(nodes[i].attributes.url);
  }
  playSong();
}

xml.load("songs.xml");

// Play the MP3 file
function playSong():Void
{
  if(cps == sa.length - 1)
  {
    cps = 0;
        s.loadSound(sa[cps], true);
          }
  else
  {
    s.loadSound(sa[++cps], true);
  }
}

Het zou ook zo kunnen zijn dat de fouten zitten in de { haakjes.

Alvast bedankt!

maxwell 20-01-2008 22:37

oh en ik heb die action script via
Code:

#include "mp3player.as"
in de actions van flash gezet maar krijg bij het testen meteen een foutmelding "1093: Syntax error."

Kingofthemall 22-01-2008 18:56

Ik loop altijd vast met CS3, ik ben niet zo'n actionscripter maar met CS3 lukt helemaal niets meer :\

Succes! Misschien weet iemand uit mn klas het wel :) Dan hoor je het (y)

maxwell 23-01-2008 18:11

hmm klote :')
maar iig bedankt!


Alle tijden zijn GMT +1. Het is nu 22:40.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.