I have a preloader, but...

I have an mp3 file in a Flash movie using Flash MX.
The movie purely consists of the mp3 file and a stop and play
button.
I would like the music (or movie) to play when 50% loaded and
I am searching the net to find a way.
I already have a preloader which works perfectly using the
following actionscript...but I'd like to know what to tweak in
order to make the music (movie) play when 50% loaded. My current
action script is as follows...
lBytes = _root.getBytesLoaded();
tBytes = _root.getBytesTotal();
percentLoaded = Math.floor((lBytes/tBytes)*100);
loader.bar._xscale = percentLoaded;
loader.percent.text = percentLoaded + "% of " +
Math.floor(tBytes/1024) + "K loaded.";
if (lBytes>=tBytes && tBytes>0) {
if (count>=12) {
gotoAndStop("main");
} else {
count++;
gotoAndPlay("preload");
} else {
gotoAndPlay("preload");
....I know that there are other ways of playing mp3 on Flash
(ie. Media Playback Component and a multitude of templates on the
net) however I find that the Flash players that load the mp3
externally play at different speeds in different browers, so
becuase of this I choose to have the mp3 located within the flash
movie to avoid any inconsistancies amongst browsers. All I require
is actionscript that makes the music (or movie) play when 50%
loaded.
I'm gonna continue to search for an answer, and if I find a
solution I will update my post.
Thanks!
You can see the swf file in the following htm page...
http://www.plobs.com/theme_song.htm

Thanks for the info.
I tried the action script provided, but it didn't
work...maybe I inserted it in the wrong place.
Anyhow, I am currently trying out your other suggestion. I'm
in the process of creating the mp3 with 44HZ.
If that doesn't work (fingers crossed it will), I will have
another play around with the action script.

Similar Messages

  • Using Preloader But Content Not Loading

    Hi.
    Here's the Cliffs Notes version:
    I've a 2 frame movie: Frame 1 is the preloader; Frame 2 a movie clip (web site).
    Both work fine individualy, but the dynamic content I want pre-loaded is not loaded into the movie clip (web site) after the preloader animations.
    Verbose version:
    I'm have a preloader on frame 1 of the timeline. Here's the code:
    stop ();
    this.loaderInfo.addEventListener (ProgressEvent.PROGRESS, onLoading);
    this.loaderInfo.addEventListener (Event.COMPLETE, onComplete);
    function onLoading (evt:ProgressEvent):void
              var loaded:Number = evt.bytesLoaded / evt.bytesTotal;
              percent_txt.text = (loaded * 100).toFixed(0) + "%";
              var counter = (loaded * 100) * 3.6;
              masked_mc.mask = masking_mc;
              masked_mc.rotation = counter;
    //          trace (masked_mc.rotation);
              if (masked_mc.rotation < 0)
                        masked_mc.mask = null;
    function onComplete (event:Event):void
              this.loaderInfo.removeEventListener (ProgressEvent.PROGRESS, onLoading);
              this.loaderInfo.removeEventListener (Event.COMPLETE, onComplete);
              gotoAndStop (2);
    On frame 2 is only a movie clip (a web site).
    In this movie clip on frame 1, I have a dynamic text field into which gets loaded some external text, styled with HTML and CSS.
    At the moment, when a visitor comes to the site for the first time, he can actually see the text load, then see the CSS styles get applied. I would like to use my preloader so that this text loading and styling is completed before they get to see the home page.
    Trouble is the, while the preloader itself works, the HTML and CSS still does not get loaded until after the preloader. This makes sense as the code for calling and loading the HTML/CSS is in the movie clip.
    So I thought, put the code....
    //NEWS --------------------------
    // Load the external .swf "navidNews.swf".
    var navidNewsSWF:String = "assets/fla/navidNews.swf";
    var navidNewsURLRequest:URLRequest = new URLRequest(navidNewsSWF);
    var navidNewsLoader:Loader = new Loader();
    navidNewsLoader.load(navidNewsURLRequest);
    //Put "navidNews.swf" on the stage.;
    newsContainer_mc.addChild(navidNewsLoader);
    into frame 1, same as that for the code for the preloader. But because the empty movie clip into which navidNews.swf is loaded is not in the same frame as the preloader there are errors.
    Okay, move empty movie clip newsContainer_mc into frame 1 with preloader, which will hide the news container.
    What am I missing? Should I not put a movie clip of my web site on frame 2, but instead move the preloader into the web site movie clip, putting it on frame 1?
    I've been playing musical frames with this thing for two days now.......

    load the text and css in frame one (they need not be be used until frame 2) and incorporate those into your preloader.

  • LoadClip preload, but not a "preloader"

    I am trying to find a way to use LoadClip to load an external
    SWF into a main SWF, but not actually attach the loaded SWF to an
    instance til later in the timeline.
    Example:
    On Frame 5 of the main timeline, I want to use LoadClip to
    load the external SWF in to memory, but I don't want to initiate
    the loaded SWF til frame 50.
    Why, you may ask. Well, I'm making the flash EXE for a CD.
    The external SWF is small and loads fine, only problem is that when
    running from a CD, the loading of the external SWF causes a two
    second pause. Not enough time for a preloader, but enough to annoy
    me (also, the loading of the SWF causes audio in the main EXE to
    pause as well). I'm hoping that preloading the SWF earlier in the
    timeline will resolve this problem.
    Any help is appreciated!
    -dave

    I use the 'timeout' handler quite often...
    on prepareMovie
    set the timeoutlength to 10 * 60 --10 is the number of
    seconds
    end
    on timeOut
    --do your thing here...
    alert "I've just timed out!!"
    end
    The timeout resets to 0 everytime there is a mouse click or a
    keypress (note
    that moving the mouse does not reset this though)
    Obviously, within 'on timeOut' you could do other things - I
    usually have
    the movie jump to a 'screensaver' marker. This marker could
    have say a flash
    animation urging the user to click or press a key. then use
    'on mouseDown'
    or 'on KeyDown' to go to the main menu.
    A simple option, but may be worth doing a search in the help
    for 'timeout'
    Tim.
    Bateman" <[email protected]> wrote in message
    news:edr3nv$fkg$[email protected]..
    > Morning all,
    >
    > I'm currently in the process of producing a touch-screen
    kiosk with
    > Director -- the client has requested that they would
    like the presentation
    > to automatically go back to the main menu after a period
    of inactivity,
    > ie. the viewer has left the kiosk and its current
    position is within one
    > of the sub-sections.
    >
    > Together with this the client would also like a logo
    animation to occur
    > after a further period of inactivity; almost acting as a
    screen saver but
    > used in the hope that the movement would attract further
    viewers.
    >
    > So this incurs to states of inactivity; how difficult is
    this to achieve
    > as I've no real experience of "time outs", etc.?
    >
    > Many thanks in advance.
    >
    > Regards, Mark.
    >
    >

  • I found My iPhone contacts on my friends Iphone we both have 4s! But we use the same apple ID and ICloud ID! How can undo what happened? all my private stuff is now on his phone!!! help me plz!!?

    I found My iPhone contacts on my friends Iphone we both have 4s! But we use the same apple ID and ICloud ID! How can undo what happened? all my private stuff is now on his phone!!! help me plz!!?

    Of course if you are both connected to the same iCloud account you have the same contacts - what did you expect?. The contacts live on the server and are read from there by the devices; so as you've both managed to sync your contacts up to iCloud they are now inextricably mixed. You can only delete your contacts by deleting individual ones, and doing that will delete them from your phone as well.
    You can only unravel this by
    1. In the iCloud contacts page at http://icloud.com, select all the contacts, click on the cogwheel icon at bottom left and choose 'Export vCard'.
    2. Sign out of System Preferences>iCloud
    3. Create a new Apple ID and open a new iCloud account with it for your own use.
    4. Import the vCard back into the iCloud contacts page.
    5. Go to http://icloud.com and sign in with the original ID. This is now his ID. Work through the contacts individually deleting the ones you don't want him to have. When done sign out and advise him to change his password.
    6. Go to the new iCloud account and delete his contacts individually.
    Of course if you have also been syncing calendars and using the same email address there are problems with doing this.

  • I have a game but it only for one apple id and one divece but someone i dont know id play that game and using my apple id and i want to know if u can block them from using ur apple id and also erase all the games they downlode with the apple id

    I have a game but it only for one apple id and one divece but someone i dont know id play that game and using my apple id and i want to know if u can block them from using ur apple id and also erase all the games they downlode with the apple id

    There probably is, but it requires that you be able to use punctuation and write in sentences so that we can understand exactly what you want.
    You can block others from using your Apple ID by changing your password.  There is no way to erase what was already downloaded on to someone else's device, for obvious reasons,

  • ITunes for Windows freezes when importing a library. I have a large but not huge library of mostly iTunes purchased music on two authorized computers and would like to sync the files, export the library as a playlist, and import it on the other computer.

    I am running iTunes for Windows 10.2.2 on Windows 7 Home. I have my iTunes library on both this computer and another authorized machine running Windows 7 Professional. I have a large but not enormous library, as I'm one of those people who doesn't pirate, use torrents, borrow from a dozen friends, or whatever other shades of gray you might imagine. It's mostly iTunes purchases with my old CD collection imported. I have started using the following technique to sync my libraries between my two authorized computers, an ability which you can probably all agree should one day be added to iTunes -- that would be different from Home Sharing, because the music would be stored locally and thus available on the road. With the added benefit of the entire library being backed up on the other machine in real-time. Anyway, when I switch from my desktop to laptop and vice versa, I use the following technique:
    Connect both machines to the home network. One machine is the "Active" machine, which has most recently been used for iTunes media, purchases, ratings, etc.
    On the "Active" machine, File-->Library-->Export. Save the file as "Library.xml" on the shared drive of the other machine.
    Right-click "Library.xml" where it's been saved, and open another file that has two lines in it: The root path of the iTunes library on one machine and the root path of the iTunes library on the other machine.
    Do a find/replace all in Notepad to make the library XML file point to where the files will be saved on the "Inactive" machine.
    Run Microsoft SyncToy to synchronize the files between both music libraries; the most recent files win. This avoids copying the entire multi-gigabyte library over the network.
    Open iTunes on the "Inactive" machine.
    Go to Music, Select All, Delete. Keep files.
    Do the same for Movies, Music Videos.
    Go down to Playlists, select the top one, hold down the delete button until they're all gone.
    File-->Library-->Import Playlist. Choose the "Library.xml" file you saved.
    First a status bar comes up that says, "Importing library." It has the continually-scrolling progress bar, not the one that starts on the left and steadily creeps right. Then after about 30 seconds, that clears out. Wait. Typically a few minutes. Eventually a status bar will pop up saying something like, "Evaluating gapless playback information," or something like that.
    The "Inactive" computer is now the "Active" computer. I can now play my library, it has all my playlists and metadata from the other machine.
    Delete all the duplicate playlists named "Music," "Genius," "Purchased," and "iTunes DJ."
    Well, I just upgraded to iTunes 10.2.2 a few days ago and tried to do this again like I've done it dozens of times before. Now, iTunes just goes unresponsive after the library import. It got through the "Importing library" bar to the long wait and stopped. I can still multiprocess and use other programs, but iTunes is hovering back there not responding to clicks. Task Manager doesn't seem to think iTunes is using my CPU, and I don't see my hard drive rattling. Any thoughts on why iTunes might hang up when importing a large library?
    ... Also, please help lobby Apple to come up with a network sync tool built into iTunes for a user with multiple authorized computers. Something different than Home Sharing so I can pull my laptop off the network and still have the synced library with me. And all my metadata changes will sync. The technique I use seems a little kludgey, don't you think?

    iTunes isn't an editor. You need an app that's intended for editing audio files, like Adobe Audition (http://www.adobe.com/products/audition.html) or Audacity (free in the App Store).

  • TS1814 Most of the songs on my iPod Classic no longer dshow up on iTunes on my laptop.  I deleted iTunes & installed the latest version but this did not change anything.  For example on 1 playlist I have 66 songs but only 1 shows on the iTunes screen.  Th

    Most of the songs on my iPod Classic no longer show up on iTunes on my laptop.  I deleted iTunes & installed the latest version but this did not change anything.  For example on 1 playlist I have 66 songs but only 1 shows on the iTunes screen.  Thanks you for any help.

    See Empty/corrupt iTunes library after upgrade/crash or
    Recover your iTunes library from your iPod or iOS device.
    tt2

  • I got new hard driver for my MacBook I don't have the cd but I do have flash drive that has the software I need help because when I turn on my laptop it shows me a file with question mark how can I install the software from the flash driver?

    I got new hard driver for my MacBook I don't have the cd but I do have flash drive that has the software I need help because when I turn on my laptop it shows me a file with question mark how can I install the software from the flash driver?

    Hold down the Option key while you boot your Mac. Then, it should show you a selection of devices. Click your flash drive and it will boot from that.

  • I purchased and in-app download and have a receipt but it is still not showing, so where is it?

    I purchased an in-app download for Little generals and have a receipt, but it is still not showing up. Ive tried all the usual sign in then back out...shutting on and off but none of this works. The file just seems that it does not exist even though they have already charged my credit card. So, WHAT GIVES???
    PS: And the people on the other end of the phone line seem to be completly clueless about their own products..

    If you don't have the Firefox button, you're using the classic view. To restore the new view of Firefox (Changed in Version 4):
    * View > Toolbars > Menubar [Uncheck]
    In Firefox 6 you can use this to clear your history/other offline content:
    Click on the Firefox button on top left part of your browser:
    * History > Clear Recent History
    There you can select what you want to clear.
    If you want to see the menu bar you can press alt on your keyboard so you can see file/view/...
    Also for activating it to always be there follow this (Classic view of Firefox):
    * Firefox > Options > Menu Bar
    Don't forget to hit the 'Solved it' button if this solved your problem so the topic will be closed.

  • Using Adobe Photoshop CS2 version 9 and have updated it, but when stacking photos, it comes up with PSD, whereas I want Jpeg, and I change the format to Jpeg and the box then comes up with cannot save as there is a program error. Be very grateful for help

    Using Adobe Photoshop CS2 version 9 and have updated it, but when stacking photos, it comes up with PSD, whereas I want Jpeg, and I change the format to Jpeg and the box then comes up with cannot save as there is a program error. Be very grateful for help with this, please.

    jpg does not support Layers.
    Just to make sure, what exactly do you mean by "stacking photos" and what do you want to achieve thereby?

  • How can I unfreeze my Macbook Air?  I have tried restarting but it simply opens on the frozen email page.  Any suggestions?

    How can I unfreeze my Macbook Air? I have tried restarting but it simply opens on the frozen email page.
    I have tried a few multople key combinations.  I would be very grateful if someone could post one that might ensure that any applications quit before re-starting.

    Try Force Quit.
    Press   command + option + esc  keyboard keys together at the same time.
    Wait.
    When Force Quit window appears, select Mail if not already.
    Press Force Quit button at the bottom of the window.
    Wait.
    Mail will quit.

  • App store keeps telling me I have an update but I don't.

    The app store on my iPad had an update for an app the other day but rather than updating I chose to delete the app as it was of no use. However the app store keeps telling me I have an update but when I open the app store none are listed.
    Anyone experienced this?
    Also the iPad keeps telling me my mail settings are incorrect and that I should check them yet I can still send and receive my mail.
    Anyone experienced this?

    A couple of thoughts.
    Once you purchase an app, you will continue to get the update notification even if you delet the app. the notification is based on your purchase history and I don't think there is anything you can do to stop the update notices.
    As for the email alert - no clue - but this is what I would do. Restart your iPad. Hold down on the sleep button until the red slider appears and then slide to shut down. To start up again, hold down on the sleep button until the Apple logo appears on the screen. Maybe the email alert will go away.

  • I want to upgrade from 3.6 to 5, I have downloaded 5 , but it won't show up as my default, why? How do I get 5 to be my default?

    I am running windows xp. I have been using Firefox 3.6 or something like that. I want to upgrade to Firefox 5. I have downloaded it, but it will not replace my 3.6 and come up or default with Firefox 5.
    What do I do.
    Second: You should have what version number of Firefox on all your emblems that show up on a person's computer.

    For the link below click the Still Need Help? option in the blue area at the bottom and choose the chat option...
    Serial number and activation chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service1.html ( http://adobe.ly/1aYjbSC )

  • I have itunes credit but it wont let me use it, and keeps asking me to put in credit card information. How do I get it to just use my iTunes credit?

    I have Itunes credit but it wont let me use it and keeps asking me for credit card information like it does if you dont have enough credit to pay for what you are buying. I tryed just clicking none but it wont let me, how do you get it to just take money from your itunes credit, not off a credit card?

    I would contact iTunes:
    Contact iTunes

  • I just downloaded AOL Desktop 1.7 for Mac and I can't get my email to work. It welcomes me but I know I have new email but it doesn't recognize that I have ANY mail at all. HELPPPPPPPP Please

    i just downloaded AOL Desktop 1.7 for Mac and I can't get my email to work. It welcomes me but I know I have new email but it doesn't recognize that I have ANY mail at all. HELPPPPPPPP Please

    Hey I've been all over and can't get any help. I'm well aware its not an Apple product but its an app for Mac OS so I thought I'd try here. I bought 2 new iMacs yesterday for my parents (5K) and I'm just trying to get them some help as there in their 70's and AOL is all they know.
    But hey thanks for your help,

Maybe you are looking for

  • Have tried to uninstall but still Safari quit unexpectedly while using the librooksbas.dylib plug-in.

    Process:         Safari [226] Path:            /Applications/Safari.app/Contents/MacOS/Safari Identifier:      com.apple.Safari Version:         6.0.5 (8536.30.1) Build Info:      WebBrowser-7536030001000000~6 Code Type:       X86-64 (Native) Parent

  • Changed network and internet doesn't work

    hi, i got my phone on orange and i have now unblocked it and put it onto o2 however evry thing works exept the internet because it is set up to orange, is there any way that i can get the phone set up to o2? thanks, maxblade93

  • Change query in Ad-hoc Query Designer

    Hello All, We are using Ad-hoc Query Designer for users to run their reports. now we want them to do their modifications there itself and save as the query. But SAVE and SAVE AS buttons are Inactive.  One more problem with using Ad-hoc Query Designer

  • HP2600n print quality

    The results after executing the print quality page from the HP Toolbox show that the magenta is fading from light to dark to light from the left margin to the right margin ... this condition is not discussed in the print quality diagnostic ... I am a

  • Ejbs - Included AQ libraries

    I'm trying to deploy an ejb using JDeveloper 3.1.1.2 into Oracle 8.16 which uses the following packages: oracle.aurora.jndi.sess_iiop.*; oracle.jms.*; oracle.AQ.*; I get ClassNotResolved exceptions at the "Generating EJBHome and EJBObject on the serv