Visualizzazione dei risultati da 1 a 10 su 10

Discussione: as x player by diletta

  1. #1

    as x player by diletta

    ciao gagazzi ho problemi con dell as mi aiutate?
    ho trovato un player che vorrei caricare in clip vuoto.
    quando vado a richiamare il filmato non va perchè chiaramente
    le as sono diverse ed io non ne capisco di as.
    non posso allegare il file .fla!!
    se qualcuno mi puo dare la sua e-mail e lo spedisco sarebbe gentilissimo.

    ciao diletta

    ps questo e il comando che do al pulsante:

    on (release) {
    loadMovie("azienda.swf", _root.vuoto1);
    }
    Il tutto sembra sempre facile ma non è difficile!!!

  2. #2

    Re: as x player by diletta

    Originariamente inviato da diletta
    ciao gagazzi ho problemi con dell as mi aiutate?
    ho trovato un player che vorrei caricare in clip vuoto.
    quando vado a richiamare il filmato non va perchè chiaramente
    le as sono diverse ed io non ne capisco di as.
    non posso allegare il file .fla!!
    se qualcuno mi puo dare la sua e-mail e lo spedisco sarebbe gentilissimo.

    ciao diletta

    ps questo e il comando che do al pulsante:

    on (release) {
    loadMovie("azienda.swf", _root.vuoto1);
    }
    ama che devi fare e qualè il problema
    se è solo quello prova
    on (release) {
    loadMovie("azienda.swf", "_root.vuoto1");
    }
    oppure
    on (release) {
    _root.vuoto1.loadMovie("azienda.swf");
    }

    ciao
    la verità non è una meretrice che si getta al collo di chi non la vuole ma anzi essa è dotata di una così altera bellezza che anche chi sacrifica tutto per ottenerla non è sicuro di averla raggiunta !

  3. #3
    no il problema non è sul pulsante bensi nelle as del player che e già fatto e di cui devo modificare la grafica. questo filmato lo importo esternamente in un menu tutto in flash ma non me lo carica perche sicuramente le coordinate sono sbagliate.
    Il tutto sembra sempre facile ma non è difficile!!!

  4. #4
    Originariamente inviato da diletta
    no il problema non è sul pulsante bensi nelle as del player che e già fatto e di cui devo modificare la grafica. questo filmato lo importo esternamente in un menu tutto in flash ma non me lo carica perche sicuramente le coordinate sono sbagliate.
    magari prova a postare lo script che usi altrimenti è difficile capire dove stà l'errore

    ciao
    la verità non è una meretrice che si getta al collo di chi non la vuole ma anzi essa è dotata di una così altera bellezza che anche chi sacrifica tutto per ottenerla non è sicuro di averla raggiunta !

  5. #5
    frame 2 as:

    // VOLT SET = ACTUAL VOLUME SET LEVEL (0 - 100)
    // volWhat = current Frame of Volume indicator MovieClip vol_see
    stop()
    volset = 100
    volWhat = 10

    // Script reads CSV file (see csv file for layout)
    // You can set it up anyway you like as long as you seperate the data fields with a comma

    myVars = new LoadVars();
    myVars.load("data.csv");
    myVars.onData = parseCSV;
    var data = [];
    function parseCSV(raw) {
    var delim = (raw.indexOf("\r\n") > -1) ? "\r\n" : (raw.indexOf("\r") > -1) ? "\r" : "\n";
    var temp = raw.split(delim);
    var fields = temp.shift().split(",");
    for(var i=0;i<temp.length;i++) {
    var row = temp[i].split(",");
    if(row.length != fields.length) continue;
    var tmpObj = {};
    for(var j=0;j<row.length;j++) {
    tmpObj[fields[j]] = row[j];
    //trace (tmpObj[fields[j]])
    }
    data.push(tmpObj);

    }
    _root.nextFrame();
    }

    System.useCodepage = true;

    frame 3 as
    // Script copies data from CSV into seperate usable Array for the rest of the program
    // For any given song signified by the first pointer in the array, there are 4 elements to that
    /*

    ARRAY DAT
    =========
    ** note sited means if the song is from an external url - y for YES, blank for nothing
    ** again the setup of your csv could be anything you like
    URL, TITLE, ARTIST, SITED
    http://xxx, Wild Thing, Kinks,
    http://yyy, Little Wing, Jimmy Hendrix,y

    Array [0,1]
    0: 0: http://xxx
    1: Wild Thing
    2: Kinks
    3:

    1: 0: http://yyy
    1: Little Wing
    2: Jimmy Hendrix
    3: y

    to access: _root.dat[1][2] -> Gives Jimmy Hendrix etc

    IMPORTANT NOTE ABOUT THE ARRAY:

    SAY AN ARRAY HAS 4 ENTRIES, THEY ARE LABELLED, 0-1-2-3
    NOW IN THE CSV IT IS IMPORTANT TO HAVE AN END LINE WITH THE WORD "END" AT THE LAST LINE
    WHICH MEANS IN A NORMAL 4 ENTRY CSV YOU HAVE 0-1-2-3-4 ENTRIES (5)
    WHEN DEALING WITH THE LAST SONG, ENTRY 4 = "END" THE SCRIPT IN FRAME 11 DEALS WITH THIS
    */

    var dat = new Array()

    for(i=0;i<_root.data.length;i++)
    {
    dat[i] = new Array()
    dat[i][0] = _root.data[i]["url"]
    dat[i][1] = _root.data[i]["title"]
    dat[i][2] = _root.data[i]["artist"]
    }



    // Quick Setup of certain Parameters
    // tune is the current song number in the array which corresponds to dat[tune][etc]
    tune = 0
    _root.nextFrame()

    frame 4 as:

    gotoAndPlay(5)

    frame5 as:

    // this part does all the main work
    // The stage contains two important user interactions, playingBar and loadingBar
    // loadingBar is the current download status
    // playingBar is the current play status
    // Both move according to their status
    // Don't forget to see the actioscript associated with the playingBar and loadingBar
    // and the buttons

    var snd_1:Sound = new Sound();
    // snd_1 is the sound container and can be modifed by the rev/next buttons

    _root.playingBar._xscale = 0;
    // set the playingBar width to 0

    loadingBar._xscale = 0;
    // The loadingBar width to 0
    // When the Sound Completes do this function

    snd_1.onSoundComplete = function() {
    tune++;
    if (dat[tune][0] == "end") {
    // Don't forget to leave a line in your CSV with end
    tune = 0;
    }
    newSong = true;
    gotoAndPlay(4);
    };
    stop();
    vol_set.gotoAndStop(volWhat);
    // Set Volume to to volWhat
    // Sets Various TEXT boxes to .....

    statusit = "";
    statusroot = "Preparing";
    FF = 0;
    // Will be used later when converting seconds to mins + secs, eg 80seconds = 1min 20 secs
    // Load snd_1 with the MP3 named in your data file from the URL saved in dat[tune][0]

    snd_1.loadSound(dat[tune][0], true);
    // Shows the viewer the title and artist of song on main stage - update every 100msc

    var nProgressID:Number = setInterval(function () {
    snd_1.setVolume(volset);
    _root.showtext.textit.testme = dat[tune][1]+" - "+dat[tune][2]+statusit;
    }, 100);


    // Heavy Duty Number Crunching
    var nProgressIDA:Number = setInterval(function () {
    bytesload = snd_1.getBytesLoaded();
    bytestotal = snd_1.getBytesTotal();
    d = Math.round(snd_1.position/1000);
    // How Many seconds has been played?
    e = snd_1.duration/1000;
    // How Long Is the Song?
    f = d/e;
    // What decimal has been played of the loaded song?
    c = bytesload/bytestotal*100;
    // What % of song has been loaded
    fA = f*100;
    // Converts f to a %
    cA = c/100;
    // Converts c to a decimal
    g = cA*fA;
    // Gives the % Position the playingBar should be of the loadingBar
    _root.playingBar._xscale = g;
    // Put In Action g
    pointmain._x = 19+_root.playingBar._width;
    // Place the Pointer for the playingBar to it's current position
    loadingBar._xscale = c;
    // Scale the loadingBar accordingly to c


    // These IF/ELSES deal with what message should be put in Various TEXT boxes
    if (d>0.01) {
    statusit = "";
    statusroot = "Playing";
    if (c<99.9) {
    // This Part Is Important for the functioning of the STOP/PLAY buttons
    downStat = "song is downloading";
    if (TT) {
    statusroot = "Stopped";
    } else {
    statusroot = "Playing";
    }
    } else {
    downStat = "song fully downloaded";
    if (TT) {
    statusroot = "Stopped";
    } else {
    statusroot = "Playing";
    }
    }
    }
    }, 100);

    // This is my little Algorithm to convert seconds to minutes and seconds
    var nProgressIDB:Number = setInterval(function () {
    min = Math.floor(d/60);
    // Math.floor rounds DOWN
    if (min<10) {
    timeit = "0"+Math.floor(d/60)+" :";
    if (min>.99) {
    FF = Math.floor(d/60)*60;
    } else {
    FF = 0;
    }
    GG = d-FF;
    if (GG<10) {
    timeit2 = "0"+GG;
    } else {
    timeit2 = GG;
    }
    } else {
    timeit = Math.floor(d/60)+" :";
    if (min>.99) {
    FF = Math.floor(d/60)*60;
    } else {
    FF = 0;
    }
    GG = d-FF;
    if (GG<10) {
    timeit2 = "0"+GG;
    } else {
    timeit2 = GG;
    }
    }
    }, 100);


    // This Bit is optional, it deals with letting the user know various things, such as number
    // of songs online (i.e. number in data.csv) and what song is next etc
    // Again, you are welcome to set this up anyway you like
    var nProgressIDC:Number = setInterval(function () {
    PP = _root.dat.length-2;
    if (_root.tune == PP) {
    tuneA = 0;
    _root.nextsong = "next song: "+_root.dat[tuneA][1]+" by "+_root.dat[tuneA][2]+"\n"+"total songs online: "+(dat.length-1)+" : "+(tune+1)+"/"+(dat.length-1);
    } else {
    _root.nextsong = "next song: "+_root.dat[tune+1][1]+" by "+_root.dat[tune+1][2]+"\n"+"total songs online: "+(dat.length-1)+" : "+(tune+1)+"/"+(dat.length-1);
    }
    //totsongs = ;
    }, 100);
    Il tutto sembra sempre facile ma non è difficile!!!

  6. #6
    se usi flash mx 2004 in poi prova a scrivere nel primo frame this._lockroot=true

    altrimenti devi cambiare tutti i percorsi

    che si riferiscono a root in _root.vuoto1
    Consulenza aziendale a 360° http://www.gruppodg.it http://www.gruppodg.it/3d
    Realizzazione siti internet, Siti Flash, Ricerca Location per bar negozi , esercizi commerciali, sviluppo pratiche e allestimento

  7. #7
    cioè nel primo frame del player metto : this._lockroot=true
    e al pulsante sempre lo ste as cioè:

    on (release) {
    loadMovie("player.swf", _root.vuoto1);
    }

    cosi intendi?

    tante grazie
    Il tutto sembra sempre facile ma non è difficile!!!

  8. #8
    se hai flash mx 2004 si
    Consulenza aziendale a 360° http://www.gruppodg.it http://www.gruppodg.it/3d
    Realizzazione siti internet, Siti Flash, Ricerca Location per bar negozi , esercizi commerciali, sviluppo pratiche e allestimento

  9. #9
    ci provo e ti faccio sapere. grazie tante
    Il tutto sembra sempre facile ma non è difficile!!!

  10. #10
    Ti ringrazio per l'aiuto ci sono riuscita.
    adesso ho un'altro problema. quando provo il tutto
    in locale va bene mentre sul server il download della
    canzone si blocca a meta!! Da cosa puo dipendere?
    Il tutto sembra sempre facile ma non è difficile!!!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.