Welcome, Guest
  • Author Topic: Sound Variable  (Read 2330 times)

    ali

    • Server what's that
    • *
    • Posts: 3
      • View Profile
      • Email
    Sound Variable
    « on: 08/15/03, 21:20 »
    I love your script and have used it on 2 sites and am adding to a third.

    :) I was able to add a drop down menu inside the card swf and have Flash successfully write the user's choice of a midi to the data file, but cannot figure out what tags to use on the page that displays the card to retrieve the information from the data file  ???

    The data file looks like this:

    ToName=ali&ToEmail=dezali@msn.com&FromName=ali&FromEmail=ali@alisdesigns.com&Greeting=test&IntroMessage=test&Created=Ecard Created on Friday 15th of August 2003 ( 01:56:39 PM )&Music=http://www.cardsbyali.com/ac/Clouds.mid



    The tag I had  added to SelectCard.php for the midi is this one:

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    if(navigator.userAgent.indexOf("MSIE") != -1)
    document.writeln ('');
    else
    document.writeln ('<EMBED SRC=$Music> AUTOSTART="true" HIDDEN="true" VOLUME="80%">');
    //-->
    </SCRIPT>
    <BGSOUND SRC$Music>


    with different variations of this added to the card head info:

    $Music = "Music=.$EcardText.";


    Please tell me what I am doing wrong so I can get on with my life  :D

    Thanks in advance

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re:Sound Variable
    « Reply #1 on: 08/18/03, 10:18 »
    Quote
    <EMBED SRC=$Music>


    You need to enclose PHP variables into his own tags, so should be

    <EMBED SRC=<?php echo $Music?>>

    Jorge

    ali

    • Server what's that
    • *
    • Posts: 3
      • View Profile
      • Email
    Re:Sound Variable
    « Reply #2 on: 08/23/03, 10:02 »
    After a week of trying to make this work, I have to admit I am ready to give up but figured I'd ask one more thing -

    I don't understand why I couldn't call for the variable Music with a GetUrl action, but when I tried that, nothing happened.

    The only way that seemed to work was to call for the variable "Music" with a "GetUrl" action sent to a hidden iframe on the page - using conditional statements such as if Music = 1 or if Music = 1.htm, Geturl(1.htm, iframe) and it worked, sort of -  but whatever was last on the list was what was loaded into the iframe - it didn't matter if in the data file Music = 1 or 1.htm, all the statements were ignored except the last one. I tried using both "if" and "if else" and it didn't matter.


    I have already made 39 separate .swf cards and 3 interfaces with this card script, so I really wanted to make this work but I have literally run out of ideas


    ali

    Musicman

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 2685
      • View Profile
      • Email
    Re:Sound Variable
    « Reply #3 on: 08/23/03, 10:48 »
    Hi ali,

    I once tried to add a "background" sound to a page, to entertain viewers while it loaded (same reason as using a preloader for a lengthy flash movie)
    The obvious choice was midi, because a mp3  would just increase the amount of data to load
    .... but we were really disappointed with the results
    some systems would not play the midi at all
    netscape for windows would pop up a fairly unintrusive player menu (play, stop, rewein, volume control)
    IE would pop up the media player which both takes some time to load and also contradicts the idea of "bachground" entertainment by its appearance.

    I think, whereever feasible the best solution would be to convert the sound to mp3

    Musicman

    ali

    • Server what's that
    • *
    • Posts: 3
      • View Profile
      • Email
    Re:Sound Variable
    « Reply #4 on: 08/23/03, 12:58 »
    First, I want to go on record as saying I think you are amazing - I have read enough posts in forums trying to solve this and other flash probs  to know you give way above and beyond AND more than that, you know what you're talking about and are able to get concepts across to people without much programming background - thank you so much for that

    I have been making e-cards as a hobby for about 5 years now and totally agree with you about the sound - for my java applets and static  cards I use midi with a cgi script but in the  flash cards/movies, I have always used a "real" form of music - but the current  project I am trying to integrate the use of a midi with flash is so...I don't know...much...not "too" much, I hope, but it's getting there.

    I already built a stereo that loads quite a few MP3 files (I feature original composers on my site and use their MP3s) but no one on a dial up is going to be able to sit still for those to load and since this monster of a project (488 items inside my Ecards folder to give you some idea of what is happening here and only 4 of those are midi files so I could test ) I just think things are already on the border as far as what I expect anyone on a dial up to put up with - since I do make these things for people to hopefully use and enjoy, high speeders and dial-uppers alike, even a compressed wav would be too much.


    It's breaking my heart to tear things apart to use with a script that will load the midi choice in already since I love the flash-db card script so much and put together 488 files as testament to how much I like it, but I figure if I am gonna go to this much trouble, I don't want it to be just for people who are lucky enough to be able to load things quickly -

    I am not finished with this so I don't want to post a URL to it here, but I will send you a link that I don't expect you to visit considering all the spare time you must have in between solving everyone's programming probs, but if you do, I know if anyone could solve this, you're the man.

    Musicman

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 2685
      • View Profile
      • Email
    Re:Sound Variable
    « Reply #5 on: 08/23/03, 16:49 »
    Hi,

    I recall someone playing around with a midi player written in flash .... so it had all notes as individual sounds and would trigger them as needed. In case importing sound from an external library worls, you would have one "movie" which just hosts sounds, and others that encode the actual performance

    Musicman