Loading mp3 dynamically using FlashVars

I was wondering if anyone knew how to get an mp3 to load
dynamically using FlashVars. I know how to do the html coding for
the <object> and <embed> tag so that each time I want
to change the audio file, I can do that in the html file rather
than the flash.
The thing I'm having problem with is once I create the shared
object, I don't know how to get it to reference the html file. I've
been looking online for help on this as far as a full on tutorial
on how to set up things like that and I just don't get it.

xxaimsxx,
> I was wondering if anyone knew how to get an mp3 to load
> dynamically using FlashVars.
Sure thing.
> I know how to do the html coding for the <object>
and <embed>
> tag so that each time I want to change the audio file, I
can do
> that in the html file rather than the flash.
Well, that's how to load an MP3 from FlashVars. ;) Now I'm
confused.
> The thing I'm having problem with is once I create the
shared
> object, I don't know how to get it to reference the html
file.
The SharedObject class, in principle, has nothing to do with
FlashVars,
so I'm not sure what you're asking, here. The SharedObject
class gives you
a way to store information on the user's hard drive -- think
if it like the
Flash equivalent of browser cookies -- while FlashVars is a
way to set
variables in the movie's root from the outside.
Can you be more specific on how you're trying to combine
these?
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design."

Similar Messages

  • Loading data dynamically to XML file

    Hi ,
    1) in my project i need an xml file that loads data
    dynamically,i will get data using HttpService,
    How to do this ?Please Help me its urgent.
    2)Can i create an xml file that loads data dynamically using
    Flex???

    Just need to clarify if you mean to load your data FROM an
    XML file, which is relatively straightforward, or if you're saying
    you want to WRITE an XML file based on something that's happened in
    your application and store it on a server somewhere.

  • Using Flashvars to load external mp3 files

    I am trying to find a very good step by step tutorial on using "Flashvars" to load external mp3 files, I have been searching on google and the many I have found fall short in some way or another. From what I have been able to gather, I have tried using the code in red (commented out), which works, and modify it to use "Flashvars". The code that works, the mp3 file is hard coded, but my goal is to use "Flashvars" which I am attempting to do in the code following the code in red. I am also including the html code. Any help will be greatly appreciated.
    Thanks,
    David
    var soundReq:URLRequest = new URLRequest("mardi_gras2.mp3");
    var sound:Sound = new Sound();
    sound.load(soundReq);
    sound.addEventListener(Event.COMPLETE, onComplete);
    function onComplete(event:Event):void
        sound.play();
    var soundReq:URLRequest = new URLRequest(root.loaderInfo.parameters.audio);
    var sound:Sound = new Sound();
    sound.load(soundReq);
    sound.addEventListener(Event.COMPLETE, onComplete);
    function onComplete(event:Event):void
        sound.play();
    HTML CODE
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="550" height="400" id="mySoundvars" align="middle">
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="allowFullScreen" value="false" />
        <param name="movie" value="mySoundvars.swf" />
       <param name="FlashVars" value="audio=mardi_gras2.mp3" />
        <param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />    <embed src="mySoundvars.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="mySoundvars" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" FlashVars="audio=mardi_gras2.mp3" />

    Ok waterlovinguy,
    I went back to my original code, and I got things to work... I think my whole issue was with the HTML CODE. So I decided to use the "SWFObject generator". I had never used it before, frankly I had never heard of it until I started my searches on "Flashvars".
    Thank you very much for all your assistance, PEACE,
    David
    Final Codes below
    var my_var:String = new String();
    my_var = root.loaderInfo.parameters.myflashvar;
    myText.text = my_var;
    var soundReq:URLRequest = new URLRequest(root.loaderInfo.parameters.audio);
    var sound:Sound = new Sound();
    var soundControl:SoundChannel = new SoundChannel;
    sound.load(soundReq);
    play_btn.addEventListener(MouseEvent.CLICK, playSound);
    stop_btn.addEventListener(MouseEvent.CLICK, stopSound);
    function playSound(event:MouseEvent):void
        SoundMixer.stopAll();
        soundControl = sound.play();
    function stopSound(event:MouseEvent):void
        soundControl.stop();
    HTML Code
                    <!>>
                    <!<![endif]>
                        http://www.adobe.com/go/getflashplayer
                        </a>
                    <!>>
                    </object>
                    <!<![endif]>
                </object

  • How can I convert my music, and CDs to MP3, for use in my vehicle's AM/FM/ Stereo? I have a 16 GB SDHC Card, that I would like to load up with some of my music.

    How can I convert my music, and CDs to MP3, for use in my vehicle's AM/FM/ Stereo? I have a 16 GB SDHC Card, that I would like to load up with some of my music.
    Thanks for any help you can furnish.
    Ed

    Well, this question really belongs in the iTunes forum, which is where you will get fast answers.
    Just go to iTunes Preferences.  Click on the General icon.  Set When you insert a CD to Ask to Import CD.  Click on Import Settings.  Set Import to MP3 decoder.  Make sure you're using Good Quality.
    This should deal with your CD's.
    With your current music, as long as it does not have DRM restrictions (older iTunes Music did), select the song, right click on the song (or group of songs), pull down to Create MP3 version. 

  • Dynamic Load Plan creation using scripting

    Hello All,
                   We have a requirement to create load plans dynamically i.e using script groovy. Idea is that we will store interface scenarios in a table and then script will read these scenarios an create dynamic load plans. Now following are my question.
                   1) Is it possible to create load plans through script ? (different blogs on net claims that you can do anything or everything whatever ODI studio can do)
                    2) Any pointer what API to use for this task ? I am very new to scripting and have zero idea about how to go about it . if possible please suggest sample script to create load plans (I can see some sample to create interface,folder etc on net.)
    Thanks in advance for your reply.
    Thanks & Regards

    ODI SDK apis allows dynamic creation of Loadplans. Oracle Fusion Middleware Java API Reference for Oracle Data Integrator
    Studio too uses these APIs for LP related operations so you should be able to do using these whatever studio allows.
    You can find SDK samples at Oracle Data Integration Sample Code

  • Table to load dynamically using sqlloader.

    how to specify which table to load dynamically using sqlloader. We are using sqlldr in a script as given below...
    sqlldr user/pass control=/control/loader.ctl log=/log/logger.log bad=/bad/badrec.bad data=/data/d1.txt

    Hello, you'd need to build the necessary control files through a shell script, here is an example:
    # Write sqlplus commands to control_file.sql
    echo "set head off
    set feedback off
    set pagesize 0
    set termout off" > control_file.sql
    # read table and column list from table.dat
    more table.dat |awk '{print $1}' |
    while read TAB
    do
            echo "Table ${TAB}"
            read COLUMNS
            STR="nothing"
            if test "$TABLE_LIST" = "empty"
            then
                    TABLE_LIST="'$TAB'"
            else
                    TABLE_LIST="$TABLE_LIST,'$TAB'"
            fi
    # construct select to load data - creating SQL*Loader control files
            echo "set head off\n
            set feedback off\n
            set pagesize 0\n
            select column_name||' '||
            decode(data_type,'VARCHAR2',' char ('||DATA_LENGTH||')',
            'CHAR',' char ('||DATA_LENGTH||')','DATE',' date (20) \"DD-MON-YYYY HH24:MI:SS\"','')
            from user_tab_columns
            where table_name ='$TAB'
            order by 1;\n" | $ORACLE_HOME/bin/sqlplus -s $USR | awk '{print $1" "$2" "$3" "$4" "$5}' |
    # read the columns in and concatenate them together to form the control file select
            while read COLUM
            do
                    if test "$STR" = "nothing"
                    then
                            STR="\nspool $TAB.CTL\nselect 'LOAD DATA\nINFILE \"$TAB.DMP\"\nBADFILE \"$TAB.BAD\""
                            STR="$STR\nDISCARDFILE \"$TAB.DIS\"\nDISCARDMAX 99\nTRUNCATE"
                            STR="$STR\nCONTINUEIF LAST != \"$FIELD_ENCLOSURE2\"\nINTO TABLE $TAB"
                            #STR="$STR INTO TABLE $TAB"
                            STR="$STR\nFIELDS TERMINATED BY \"$FIELD_DELIMITER\""
                            STR="$STR ENCLOSED BY \"$FIELD_ENCLOSURE\" AND \"$FIELD_ENCLOSURE2\""
                            STR="$STR\n TRAILING NULLCOLS"
                            STR="$STR\n($COLUM"
                    else
                            STR="$STR,\n$COLUM"
                    fi
            done
            STR=" $STR)'\nFROM DUAL;\nspool off\n"
            echo "$STR" >> control_file.sql
    done

  • How to use FlashVars to initialize a Flex component?

    Hi all,
    I am trying to pass arguments dynamically from a JSP to an embedded Flex app using FlashVars. The values are being passed correctly, but when my Flex app is first initialized, the FlashVars have not been assigned yet. I need to use one of the FlashVars to set a property of one of my Flex components, but the FlashVars are null when the component is created. How can I do this? Do I have to wait until the Flex app has loaded before setting the attribute? How would I accomplish that? Thanks in advance for your help.

    I was able to resolve this, so I thought I 'd share the answer in case someone else has a similar problem. Instead of declaring the component (which is also a DisplayObject) in MXML, I create it in the ActionScript method that gets called on the application's creationComplete method and set the property using the FlashVar at that point. Here's a quick example, using a custom class called MyDisplayObject and a FlashVar called myName:
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initVars()">
    <mx:Script>
              <![CDATA[
                        private function initVars():void {
                             myName = Application.application.parameters.myName;
                             myDisplayObject:MyDisplayObject = new MyDisplayObject();
                             myDisplayObject.name = myName;
                             addChild(myDisplayObject);
                   ]]>
    </mx:Script>

  • Why Must I put in Credit / Debit Card Info, To Load mp3 songs on my iPhone?

    I am curious as to why I "MUST" put in my
    Credit Card / Debit Card information if I want
    to download some basic games, use iTunes on
    my PC-Computer to copy mp3 files to my 'new-used'
    iPhone 3G phone, and when I validate more
    information it comes back to "Please Provide
    Credit Card / Debit Card Information" ect.. There is
    no alternative means to simply load mp3 songs to
    your iPhone w/out having to put in sensitive debit
    card / credit card information?
    iTunes can't have a feature, where you pick the songs
    you want to load on your iPhone from your PC or
    Mac Book, for FREE? I guess.. I'll do without..
    as this seriously hurts my feelings. *SIGH*
    It would be nice and wonderful, iTunes can allow you
    to load as many songs as possible from your PC-Desktop,
    to your iPhone for FREE, without providing any sensitive
    credit card / debit card information, without the FEAR of
    being charged, and disputing with Credit Card Companies,
    and disputing with Apple billing ect.
    I think I'll stick to my old phone for my music files.
    Or I hope I find some wealthy Jewish sugar mamas, or
    Jewish sugar cougars that own 90% corporate stock into
    Apple, Microsoft, and other music sharing software that
    scans for viruses and malware ect. To help pay the prices
    or Apple charge my debit / credit card for loading songs
    onto my prepaid, brand-new-used, 3G iPhone.
    I am not making sense, because the terms of agreements
    I read don't really make sense to me?
    Shalom Y'all
    Michael D. Lucas
    76531

    If you download anything from the iTunes & App Store, with your existing Apple ID, you need to link a valid credit card info to your Apple ID.
    You won't be charged for free games or syncing your music from computer.
    If you do not want to put your credit card info in, use iTunes Gift cards which you can buy nearly everywhere.

  • Acrobat 10.1.7 crash by loading plugin with using clr

    Hi,
    I have develop some plugins using Acrobat SDK with CLR, specified /clr option.
    But these plugins causes application crash of Acrobat X, 10.1.7, when trying to close the application.
    Simply plugin with /clr option, not loading CLR dynamically, also causes crash of Acrobat.
    Please tell me how to avoid this problem.
    Regards.

    Some people seem to have succeeded with this approach, but it seems unnatural and prone to difficult to solve problems. I believe plug-in programmers need to grasp the nettle and learn how to make native UIs (i.e. using C or C++ or a native widget toolkit). Yes, this is a large and complex diversion, but there are times to give up trying to put in nails with a screwdriver, and buy a hammer.

  • Acrobat 10.1.7 crash by loading plugin which using CLR

    Hi,
    I have develop some plugins using Acrobat SDK with CLR, specified /clr option.
    But these plugins causes application crash of Acrobat X, 10.1.7, when trying to close the application.
    Simply plugin with /clr option, not loading CLR dynamically, also causes crash of Acrobat.
    It is IMPORTANT problem for plugin developper like me.
    Please tell me how to avoid this problem.
    Regards.

    I have the same issue.  Were you able to find a solution?  This worked just fine in Acrobat 9, started breaking in 10 and 11.

  • Load balancing with use of router 881.

    Hello,
    I have two MPLS line and i want load balancing with the help of CISCO router 881. is it necessary that i require two router on both location.? if one location have firewall and one location have cisco router 881 then can i do a load balancing or i require two router each on both location ? What are the basic requirement that i need.
    Thanks,
    Kuntal

    Disclaimer
    The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
    Liability Disclaimer
    In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
    Posting
    An 881 should be able to load share across multiple ports.  Many routing protocol support ECMP, including BGP, but you need "special" hidden/secret commands to enable.  EIGRP also supports unequal cost load sharing.
    If an 881 supports OER or PfR, those too will do unequal load sharing, dynamically.

  • Load Multiple Images using link in Crystal Report

    Hi Guys,
    I am currently in need of developing a new requirement for our company's client. We have to load multiple images using just link in Crystal Report. Let's say that the images are stored in a folder (e.g., C:\Datafolder\Images\) and i have to fetch two images to show in crystal report (say, C:\Datafolder\Images\imageval1 and C:\Datafolder\Images\imageval2). These are actually dynamically created and therefore the number of images are not known and so i have to iterate through the list of image links.
    Is it possible using merely crystal report and how?. Please take note that we're also using C# in developing our software applications.
    Thanks and best regards.
    ---CHITO--

    Hi Chito,
    You cannot load multiple images dynamically. Using the 'graphic location' formula for the OLE Object, you can only point to a location that can load one image.
    For the second image, you'll need to manually insert another OLE Object and point the formula to the next image's location.
    You can try posting to the SAP Crystal Reports, version for Visual Studio space to find out whether this can be done using CR SDK.
    -Abhilash

  • Loading JARs dynamically

    Hi,
    I have 4 jar archives with the same gif files in different resolution. Now I want the user to choose which of the graphics he wants to install (small download with poor graphics or long download with high quality graphics).
    So I declared the jars as "lazy" in the JNLP file and tryed to download them dynamically using the DownloadService. But Java Web Start loads the other archives anyway. As I read in the JNLP specification it is allowed to do so.
    Is there a way to avoid that Java Web Start downloads these archives? Thanks in advance for your help.
    Markus

    So I declared the jars as "lazy" in the JNLP file and
    tryed to download them dynamically using the
    DownloadService. But Java Web Start loads the other
    archives anyway. As I read in the JNLP specification
    it is allowed to do so.
    Is there a way to avoid that Java Web Start downloads
    these archives? Thanks in advance for your help.Nope, cache management is business of the client.
    It eagerly loads the first 10 or 20 jars anyway, declared
    lazy or not.
    If you really, really want to avoid uncessary downloads, you are free to download the files yourself from the web server and store them on some place on the user's computer. However you are responible for updating and selecting that location.
    Regards,
    Marc

  • Load font dynamically

    Hi,
      I need to load font dynamically in my application 
    The swf size is 2.34 MB (which contains the 20 embeded fonts)
    My application size is 1.92 MB
    SDK 4.0
    OS is windows XP
    It takes 1 min to load 20 fonts in list. But i wants to load more than 200 fonts dynamically 
    Please suggest me the way to reduce the loading time.
    I have used the following code in application's creation complete event to load the swf,
    var cssEventDispatcher:IEventDispatcher=styleManager.loadStyleDeclarations("assets/style/Prop ertyFonts1.swf")
                                            cssEventDispatcher.addEventListener(StyleEvent.COMPLETE, onComplete);
    Thanks in Advance
    Siva

    you want to load font or text??

  • Using firefox 14.0.1. Loading a link using right-click and "Open Link In New Window", results in new window opening but address bar does not show URL..

    Using firefox 14.0.1. Loading a link using right-click and "Open Link In New Window", results in new window opening but address bar does not show URL. However, if I right click on a link and select "Open Link In New Tab", the Tab shows URL in address bar. So it's working when it's a New Tab but not a New Window.

    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

Maybe you are looking for