-
Originally Posted by fu-meng
our client didn't have the proper server setup to support such a bandwidth hog such as this site (plus all the traffic that went to it). so when it first launched it broke. then we had to help our client set up with a content delivery network.
the site was built for those with a very fast connection. there's a large upfront load and we had to recompress the videos again with a lower data rate (much to my shagrin). that'll be up in a few days. but overall people are happy with it and i am sometimes happy with it. it'll be up for a year then it's down.
Very impressive work. Yes, very slow to load up and get running, and I have a 4 mbit dsl connection.
You say you are using the media display component?
I have a simple (newbie) single-frame mediaDisplay associated with a custom-skinned mediaController, and it works well in a single-frame.
But, when I try to use a frame 1 & 2 preloader (with Publish Settings for frame 3 classes), with a frame 3 setup, and a frame 5 gotoAndPlay(4) loop... Everything works, but the mp3 media does not load.
The controller pops down on rollover of the playbar, and you can click on the thumb slider (but not drag because no loaded mp3), and the time says NaN:NaN:...
I am stumped. All the callbacks seem to be working, but I can't get the mp3 media to load up.
Any ideas?
Thanks
-
on what frame are you loading the mp3? it will be helpful if you paste what code you have on what frame.
but if what you really want to do is track the progress of the mp3 loading then you should look at the getBytesLoaded() and getBytesTotal() methods associated with the media display component.
you can calculate those (and the percentage) by being a listener for the 'progress' event that is automatically broadcast by the media display.
hope that helps.
-
Originally Posted by fu-meng
on what frame are you loading the mp3? it will be helpful if you paste what code you have on what frame.
but if what you really want to do is track the progress of the mp3 loading then you should look at the getBytesLoaded() and getBytesTotal() methods associated with the media display component.
you can calculate those (and the percentage) by being a listener for the 'progress' event that is automatically broadcast by the media display.
hope that helps.
Yes, but the mediaController has a nice loader bar that works fine.
I have tried 25 different versions of this stupid thing, and the only ones that work have NOTHING before the frames that include the mediaController and the associated mediaDisplay...
-
Here's what I have done...
1) Open new Flash document. Drag mediaDisplay and mediaController components onto stage (frame 1).
2) Name mediaController: myController
3) Name mediaDisplay: myDisplay
4) Select controller, Assign: Behaviour > Media > Associate Display ----> myDisplay
5) Set myDisplay Component Inspector:
6) ... MP3 (not FLV)
7) ... URL: test1.mp3
8) Test your movie, runs fine. Music loads and plays.
(The only code anywhere is the Behaviour we assigned to the controller)
-
oh, i see. well, in that case just use the progress event to see if it's trying to load at all. s/thing like:
Code:
myMedia_md.progress = function()
{
trace( "s/thing's loading at some time" );
};
i don't know why the mp3 wouldn't get loaded if the media display is on the timeline and the playhead eventually reaches it.
also try throwing an instance of the media display and controller offstage, on frame 1.
Last edited by fu-meng; 02-21-2006 at 11:09 PM.
-
So, try that series of step. Fine.
Now, extend frame 1 out to frames 1-5.
Test movie. Plays fine, with the movie looping from frames 1 - 5.
Now try moving the media stuff out to frame 3 - 5, and putting a preloader bar of some sort on frames 1 & 2.
Last edited by Donelson; 02-21-2006 at 11:38 PM.
-
code: // Frame 1 --
if (_root._framesloaded >= _root._totalframes) {
gotoAndPlay(5);
}
// Frame 2 ---
gotoAndPlay(1);
// Frame 5 ---
gotoAndPlay(4);
Then you want to use Publish Settings so that your preloader runs in frames 1-2, but you don't load the media classes until frame 3.
(Dialup lines are slow, so you need to show your visitors a pre-loader of some sort while the media controller & display -- 77k -- load up).
Now test your movie.
Ka-boom. Controller goes wild with weird graphics.
Okay, that was expected because the media stuff is still in frames 1-5.
So, move them so that they are only in frames 3 - 5.
ALSO, put a "Loading" static text into frames 1 - 2 on the stage.
Run test movie.
Doesn't work for me. Weird controller graphics etc.
What am I doing wrong. It must be something to do with the publish classes in frame 3...
Last edited by Donelson; 02-21-2006 at 11:37 PM.
-
hmm...
not quite sure what is happening.
why not leave your preloader loop as is on frames 1 and 2 and when it's finished loading sending them to frame 3 where your media display is preloading your mp3. then use the 'progress' event to show another preloader, if need be, while the mp3 continues to load.
this way you're only using 3 frames.
hth.
-
Originally Posted by fu-meng
when it's finished loading sending them to frame 3 where your media display is preloading your mp3. then use the 'progress' event to show another preloader, if need be
The first preloader in frames 1-2 is there to allow the Classes for the mediaController & mediaDisplay to load (77KB), then it jumps to frame 3 where they are initialized.
I don't need any other preloader, since that part is built into the mediaController component "associated" with the mediaDisplay component.
Once the contentPath is set for the mediaDisplay (autoPlay=true) and the script in frame 3 is complete, Flash moves on to frame 4 (no code) and frame 5 (jump back to frame 4).
This seems pretty simple to me, but clearly there's something wrong somewhere.
-
Originally Posted by Donelson
The first preloader in frames 1-2 is there to allow the Classes for the mediaController & mediaDisplay to load (77KB, Publish Settings loads them in frame 3), then it jumps to frame 3 where they are initialized.
I don't need any other preloader, since that part is built into the mediaController component "associated" with the mediaDisplay component.
Once the contentPath is set for the mediaDisplay (autoPlay=true) and the script in frame 3 is complete, Flash moves on to frame 4 (no code) and frame 5 (jump back to frame 4).
This seems pretty simple to me, but clearly there's something wrong somewhere.
-
After more experimenting, I can only get the media stuff to work if they are placed in frame 1 - 5. If I don't have them in frame 1, they don't work. If I do have them in frame 1, then the preloader doesn't work and you wait for the 77k to be loaded before you see anything at all.
What gets me is that if you Test Movie, then View > Simulated Download to make it run again, it DOES work fine. This, to me, indicates some sort of binding/presence problem.
Last edited by Donelson; 02-22-2006 at 12:10 PM.
-
-
my project latest
hi fu-meng,
here's the latest on my video project
Sorry to redirect you to my blog, but I don't want to write it out twice.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|