Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Flv And Seek Problems



ive come across a weird problem that is a little hard to explain...

i made a video player that has rewind and fast forward buttons. both buttons wont behave the way i want them too. i simply want them to skip ahead or back .5 seconds from the current position. here is my code for those two buttons.

CODE//fast forwarding
var seekPos = stream.time + .5;
stream.seek(seekPos);

//rewinding
var seekPos = stream.time - .5;
stream.seek(seekPos);



Tek-Tips > Adobe(Macromedia): Flash Forum
Posted on: 4 May 06 18:03


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

FLVPlayback.seek() Fails For Longer Seek Times
I'm loading an flv from an rtmp server, and I can't successfully seek beyond 20s into the video. The AS is shown below. The audio portion of the flv seems to advance just fine; the video does not work properly. Any suggestions??!! Many thanks in advance. --Brett







Attach Code

//Debug
file = "rtmp://on24.fcod.llnwd.net/a376/o2/cust/tlc/stern20060102-02.flv";
xml = "0973.dfxp.xml";
begin = "0:00:30.0"

// SWF params
var flvFile:String = file;// The flv file from the file param
var xmlFile:String = xml;// The associated xml file from the xml param
var beginTime:String = begin;// The time the user has requested to start playing the video

flvPb.skin = "MojaveExternalAll.swf";
flvPb.autoPlay = false;
flvPb.contentPath = file;
flvPb.seekSeconds(30);

























Edited: 01/22/2008 at 11:21:46 AM by Brettorama

Netstream.seek + Progress / Seek Bar
Hi there,

Does anyone know how to create a progress / seek bar for use with Net Stream. I can create a fast fwd and Rewind button using

myNetStream.seek(0) etc . . .

however I can see how to convert this into a progress / seek bar.

Does anyone have any advice or any links to some good tutorials. I have searched the flash help files and google and I get a mixture of answers; so was wondering whether someone could clear this up for me?

Regards

Jon

AS For Seek Icon Instead Of Progress/seek Bar
Anybody got a tip for connecting just a little icon instead of having the seek/progress bar. I want to replace the normal _xscale property with just an _x coordinate to move the icon as the progress bar would. I'm almost there but...








Attach Code

var handlePos:Number = (_root._xmouse-loadBar._x);

function videoUpdate () {
handle._x = (ns.time/ns.duration) *100-handlePos;
}

okay, there, it's moving

but the scrub is kiling me... can't get the formula right to keep the cursor and the handle together when you drag and seek.

function vidScrub() {
var distance:Number = (_root._xmouse-loadBar._x)/loadBar._width;
ns.seek(Math.floor(ns.duration*distance));
handle._x = (ns.time/ns.duration) *100-handlePos;

thanks for any help

jg

























Edited: 03/01/2007 at 03:03:41 AM by veverica

Seek On Dynamic Video Only Seek 1st Video Played
Hey guys:

Ok I have put togeather a tottaly custome video player, and I am just finishing up the final touches.

I got the seek bar to work, but it only works for the first video that plays. When I load a secound video in, the bar just sits at the begging. When I try to drag the seek bar it just stops the video.

Any help on what I am missing in my code? Thanks for any help


Code:
//Seek bar

function nsMetaData(metaData:Object):Void {
// duration is set in the meta data of the FLV file. If not, you must set it manually.
this.duration = metaData.duration;
}

function monitorStream(stream:NetStream):Void {
var progress = stream.time/stream["duration"]*100;
mcProgressBar._xscale = progress;
mcPosition._x = mcProgressBar._width + mcPosition["zeroPos"];
stream_time.text = stream.time;
}


function seekMove() {
this.seekTo = video_ns["duration"] * (this._x-this["zeroPos"])/this["maxWidth"];
}


mcPosition.onPress = function() {
clearInterval($monitorStream);
mcPosition.startDrag(false, this["zeroPos"], this._y, this["zeroPos"] + this["maxWidth"], this._y);
this.onMouseMove = seekMove;
}

mcPosition.onRelease = mcPosition.onReleaseOutside = function() {
mcPosition.stopDrag();
this.onMouseMove = undefined;
video_ns.seek(this.seekTo);
$monitorStream = setInterval(monitorStream, 10, video_ns);
}


// Pause/play button
this.playpauseButton.onRelease = function() {
this.play()
video_ns.pause()
}

Ns.seek();
ok, here is my question..

ns.seek seems to be a very weak feature of the NetStream.. and I understand that when you seek through a FLV video.. it is seeking through keyframes and causes somewhat of a delay while it is trying to seek to your desired position in the video..

Is there any ways to avoid this or correct this.. I know that google and youtube obviously use something to fix this because I don't see a delay when you try to click to a different position in a video..

Is there some different way of buffering the video so that it makes it be able to seek instantly?

Seek Bar For SWF
hi friends,
i try to assign to one seekBar for the loading swf and MP3 player.
whether i use external movie clips or use slider component?.
how i will do?..

Thanks and Regards
Karthick Raj.S

Seek Bar
The seek bar on the FLVplayback component doesn't work well. Does anyone have a way to get a more responsive seek bar for movie clips. I am linking to movie clips, so they aren't part of the .fla file. I am using flash8 professional. Thanks!

Need A FLV Seek Bar
I'm looking to put a seek bar with display in my FLV video player. Any suggestions, tutorials, etc?

Seek Bar HELP
hello guys! im new here. i have a complicating question.

ive been trying to get seek bar component in customize video player using flash, to work.

i have extracted a seek bar symbol and code it in the action script like as follow-

myVideoDisplay.seekBar=_mySeekBar;

but when i tried playing it, the seek bar doesnt work.
is there anything i should add? or did i code it wrongly?

please help guys.

Thanks in advance.

Need A FLV Seek Bar
I'm looking to put a seek bar with display in my FLV video player. Any suggestions, tutorials, etc?

NetStream.seek()
I am trying to get the seek function to work with the netstream but it has been doing funny things. In this example the video is 4.75 seconds long.

If I call my_ns.seek(1) the stream goes to 2 seconds.
If I call my_ns.seek(2) the stream goes to 2 seconds.
If I call my_ns.seek(3) the stream goes to 4 seconds.

Attach the .flv file code:


Code:
my_nc = new NetConnection();
my_nc.connect(null);
my_ns = new NetStream(my_nc);
my_ns.play("cyclers.flv");
vid_stream.attachVideo(my_ns);

function onDisconnect() {
my_ns.close();
}
Button code to call the seek method:


Code:
on(click)
{
_parent.my_ns.seek(2);
_parent.my_ns.pause();
}
Does anyone know why this is happening or a way of making the seek function go to the correct position in the stream. Are there any unwritten rules about this?

NetStream.seek() Help
Howdy,
I am working on a tutorial I found at:
http://www.devarticles.com/c/a/Flas...deo-and-Sound/8

I can get my .flv to stream through an embedded video instance with no problem.

I cannot get NetStream.seek() to work. When I enter a seek number and push my seek button... the video stops. No matter how much video has played and what number I type in. However, when I seek to 0,NetStream.seek(0), it rewinds the video and plays from the start like it should.

I have an embedded video with an instance name: flashVid_video.

I have a seek button with an instance name: seek_btn.

I have an inputText with an instance name: seek_txt

I have a .flv at the same level as the .fla named: part3.flv

The code on the first, and only frame is:

//Make NetConnection
var makeConn_nc:NetConnection = new NetConnection(); makeConn_nc.connect(null);
//New NetStream
var netWork_ns:NetStream = new NetStream(makeConn_nc);
//Connect to Video instance
flashVid_video.attachVideo(netWork_ns);
netWork_ns.play("part3.flv");
var seekHear:Object = new Object();
seekHear.click = function() {
var seeker:Number = parseFloat(seek_txt.text);
netWork_ns.seek(seeker);
};
seek_btn.addEventListener("click", seekHear);

Could someone tell me what I am doing wrong and why it will not seek to any other time but 0?

Thanks,
computerpain

I Seek Some Information Please
Can you please tell me, what programs are used to build these templates???

template 1 | template 2 | template 3 | template 4

very grateful

xark

Seek Failed
I spent all day on this fla file. Nearing completion, my screen froze. Luckily (I thought) , I've been saving the file all along.
I force quit Flash and restarted the computer, and when trying to reopen the fla file, I get a message saying "seek for. fla failed".
I looked in the folder on my desktop, and the file is there.
I've tried clicking on the icon to start it, I've retried restarting the computer and the file is there, yet Flash still says the "seek for .fla failed".
Anyone know if this file is doomed? I hope not. I spent a whole lot of time on it.

[F8] Seek Failed On ....
ok, this is very odd, I have been working on a banner. I go to open it up today, and i get an error "Seek Failed on (location of item)". What in the world is this? I try moving the file, same error, yet i can open all my other flash items that are in that folder, what has happend here?


ps: i did do a search and found a few topics on this, most people saying, "ive never heard of this before" so.... *sigh* if noone knows what to do, thank god i have a backup on my laptop....

Beginner Seek Help
Hi there,

Could any expert tell me how to make a page with type-in box , when i enter specify words, then it will linked to specific frame or scene?

e.g. type "cat" in the box will link to frame 5;
type" dog" in the box link to frame 10;
neither cat or dog link to frame 15.

or either link to certain scene?

Thanks a lot if someone could help.

New Seek Bar For Each Cuepiont
Does anyone know of a way to create a new seekbar/progress bar for each cuepoint. I am trying to have a progress bar play and when it reaches the next cuepoint it resets ands shows the progress of the next cuepoint. Any help or hints would be appreciated.
Thanks

Seek Bar And Cue Point
hi all

i've a video presentation. i have a video and its seek bar. in the video i've several cue points embedded. as i drag around the seekbar i would like to have it jumped to the next nearest cue point when released.
so that the content keeps synchronized with the video.

thanks for any help.

FLV Seek Question
Hopefully somebody can help me here.

I've figured out how to control elements of an flv

seek_mc.onPress = function() {
my_FLVPlybk.seek(8);
my_FLVPlybk.play();
}

This says on press button, seek 8

How do ask the flv to trigger an event like this at 8 seconds (without a button press)?

Theoretical
When my_FLVPlybk.reaches8seconds(gotoAndPlay("8second_c ue");

I'm trying to trigger events in accordance with varying buffer times.
For example, at second 8. I need to play a vector animation.

Any help would be greatly appreciated.

Seek Bar For Swf File
Hi,

I have developed trying to present a SWF with a embeded Movie clip. (that mean the movie clip is included in the SWF file, and not need to be loaded like FLV from an outside source.)
I want to add a SEEK BAR and a VOLUME BAR.
is there any ready instance for this or should I start to program it in action script.

Thanks in Advance

Gilco123

SWF Playback Seek Bar
Please forgive me for a topic that may have been repeated over and over, but I have searched the forums and all over the web and Flash books for the following subject and can not seem to find an answer. Perhaps my search skills, as well as my Flash skills, are lacking?

Basically all we want is a seek bar that the user can use to scroll back and forth in the timeline of a published .swf. I can find tutorials on buttons for stop and start and the occasional FF and REW (one frame at a time,) but no seek bars for .swf control. It would be nice if when the user grabbed the seek bar that the timeline would pause, and when they release the
timeline would begin playing at the spot where the user has released.

TIA.

Seek Bar And Buffering Bar?
what is the difference between seek and buffering bar for video in flash 8 component?? I want to have it say loading before the video starts to load and preloads the whole video - which should I use?

FLV Seek Bar Problems
I have a swf that displays 4 flvs, each in its own keyframe along the timeline. After one finishes and the next one starts, the pointer from the previous player(s) is still visible, so there are 2 pointers when the 2nd clip plays and 3 when the 3rd one plays.

All instances of both flv player and seek bar are named differently. Everything else works ok.

Any suggestions as to how i solve this problem?

Help appreciated

Flash Seek Bar
Hello there,

Does anybody know how I can create a seek bar for a video. The seekBar in the Components of Flash Professional CS3 looks very 'off-putting' personally. Does anybody know how I custom make one or know of any tutorials.

Many thanks,

Kristopher (UK).

Help With NetStream Seek()
Hi all,

Try to find help for Flash I first searched Flash group on Google and found this group, I posted several times but got no answer. Today I log on the forum and could not find any of my posts, so I guess my posts can't be seen if they are posted from outside of the forum. Anyway below is my question, hope I can get quick answer this time. Thanks.


I use NetStream seek() function to jump to certain point of a flash
video file(flv).
If I only use
ns.seek(5);
it doesn't work.

But if use
ns.play();
ns.seek(5);
it works.

I know ns.play() shouldn't be there, but don't know how to fix it.
Please help.

Thanks in advance.

Seek MVC Menu
Seems like the MVC pattern would be a natural fit for a menuing system that has to keep track of things like logged user various button states and actions. I'm looking for a sample of AS2 code being used to build a menuing system.

anything out there?

thnkx
--steve...

Seek Event
When using the FLVPlayback methods seek or seekPercent the seek event is not triggered.

I'm using seekPercent to change positions in the FLVPlayback control, and want to know when the method has completed. The documentation says to use the seek event, but its not working.

I'm running Flash 8 on XP. Any help appreciated.

Netstream Seek Bug
Hey guys. I'm currently using a NetStream object to stream an external FLV for this media player I'm working on. The seek works well and so does the play/pause button, but not when using them consecutively. If I seek to anywhere in my movie, using NetStream.seek(Number); and then do a NetStream.pause(true); and then a NetStream.pause(false), my movie continues playback, but does so as it fast-forwards. Sometimes it does it for only a few seconds and sometimes it will skip through 5 minutes of video in 20 seconds. If I then do a pause/play again after it's done fast-forwarding and all "caught up", it works fine. The only time I can do a seek, followed by a pause/play without getting this bug is when I rewind to the begining with a seek(0);. I'm currently running Flash 8.

Has anyone run into this bug before or does anyone know how to fix it?

NetStream.seek()
Hi,

I am having problems with using seek, I'll describe my problem, maybe someone can help.

I have a 45 second FLV, when I receive the Meta Data it confirms this and returns 45 seconds for the duration.

However if I seek to 40 seconds I get an NetStream.Seek.InvalidTime error, the message details indicates a maximum seek time of 33 seconds.

Additionaly If I seek from 1 to 9 seconds, I get forced to start playback at 10 seconds. This can't be the intended behaviour, what can be going wrong?

Many Thanks,
Ady





























Edited: 06/29/2007 at 10:26:47 AM by Ady Eaton

Seek Bar Inaccuracies
Hey all,

I have placed a FLV Playback in my movie which has actionscript added cue points and triggers events on the stage. If I strictly play the FLV it cues everything properly. However if I use a seek bar, or the seek method the playhead jumps one to three seconds ahead.

I have tried:
-increasing the keyframe rate from 15 to 30 when encoding my FLV
-using both the seek bar and the seek method

Any help you can provide is greatly appreciated!
Carly

FLVPlayback Seek Bar
I am having trouble getting the seek bar to work with cue points on the FLVplayback component. I was able to set up slide cue points using the following code and the slides change when the video plays. But when I drag the seek bar forward or backward the slides do not change.

var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
_level0.currentSlideName = eventObject.info.name;
_level0.Presentation.gotoSlide(eval(_level0.curren tSlideName));
_level0.Presentation.eval(_level0.currentSlideName ).gotoAndPlay(1);
}
display.addEventListener("cuePoint", listenerObject);

Also is there some way to get the FLVplayback component to work with slide cue points without using the above addEventListener code? Previously I used the Flash 7 MediaDisplay and MediaPlayback components and only needed to add the following code on loading of the component but it does not work with the flash 8 FLVplayback component: mx.controls.streamingmedia.behaviors.SlideCuePoint Listener.initializeListener(this, this._parent);

Seek Bar For An MP3 Player In AS3
Can any one help me find a seek bar which I can use with an MP3 Player or help me create a custom one or maybe tell me how to modify the one that comes with the FLV if possible to use it in my project. I also need find out how to make it trace the play head, how to drag the thumb so that the play head moves forward and backward. I also want the user to be able to click on the track and be able to update the play head this way too. In short, I want to create or find a component that works as both, as a progress bar and a draggable and clickable seek bar.

I would really appreciate any help with this project.

Thanks

Seek Bar For Music
Hi!
I know flash has seek bar component for flv videos but I'm streaming music from net. I have a code for loading entire song but is it possible to add a seek bar to show what part of song is playing







Attach Code

import fl.controls.ProgressBar;
import flash.events.ProgressEvent;
import flash.events.IOErrorEvent;

var aSound:Sound = new Sound();
aPb.source = aSound;

var request:URLRequest = new URLRequest("http://www.fileden.com/files/2006/11/26/423543/B100-loq.mp3");

aPb.addEventListener(ProgressEvent.PROGRESS, progressHandler);
aPb.addEventListener(Event.COMPLETE, completeHandler);
aSound.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
loadButton.addEventListener(MouseEvent.CLICK, clickHandler);

function progressHandler(event:ProgressEvent):void {
progLabel.text = ("Sound loading ... " + aPb.percentComplete);
}

function completeHandler(event:Event):void {
progLabel.text = "Loaded!";

aSound.play();
aSound.close();
}

function clickHandler(event:MouseEvent) {
aSound.load(request);
loadButton.enabled = false;
}

function ioErrorHandler(event:IOErrorEvent):void {
trace("Load failed due to: " + event.text);
}

Mp3 Seek Option
Well I am in the process of making an mp3 player, or at least trying to. I have the basic position, duration and progress bar currently working but need to create the seek feature. So far everything that I have tried to do has not gotten it to work out correctly (probably because I am trying the wrong functions or something like that) but if someone could help me to get a working seek bar that would be great.

NetStream.seek(); Help
Hi all, I am trying to convert my AS2 flv player to AS3 for a school project. The problem is when scrub to the last few seconds of the movie using the scrub bar I made it gives me the error "Error #2044: Unhandled NetStatusEvent:. level=error, code=NetStream.Seek.InvalidTime
at player_fla::MainTimeline/player_fla::frame1()". Ive tried tracing out the time being sent to seek from the scrubber and tracing out the duration and both seem to be fine. If anyone could help me out it would be very much appreciated.

P.S I've included the site and the files below.

Site:
http://www.int-interactive.com/andrew/nigelTube/

Files:
http://www.int-interactive.com/andre.../nigelTube.rar


Andrew

Clicking FLV Seek Bar?
Does anyone know if Flash can listen for a click/drag on the seek bar playhead from the FLV player controls? I'm attempting to perform an action when a user drags the playhead through the video.

MP3 Audio Seek Bar
Hey all... I'm a HUGE beginner here... I created an MP3 Player via the tutorial and I was trying to create a loader / seek bar... The loader works but the seek bar does not... Remember... this is Audio NOT Video... I have no idea what to put in the scrubit function since this is an MP3 loaded from a URL rather than a FLV file.

Any Ideas? Here is the code:

Code:

//Audio Loader scrubber
var audioInterval = setInterval(audioStatus,100);
var amountLoaded:Number;


function audioStatus()
{
   amountLoaded = s.getBytesLoaded() / s.getBytesTotal()
   loader.loadbar._width = amountLoaded * 202
   loader.scrub._x = s.position/s.duration * 202
}

var scrubInterval;

loader.scrub.onPress = function()
{
   clearInterval(audioInterval);
   scrubInterval = setInterval(scrubit,10);
   this.startDrag(false,0,this._y,202,this._y);
   
}

loader.scrub.onRelease = loader.scrub.onReleaseOutside = function ()
{
   clearInterval(scrubInterval);
   audioInterval = setInterval(audioStatus,100);
   this.stopDrag();
}

//No Idea What Should Go In The scrubit funtion
function scrubit()
{
   ns.seek(Math.floor((loader.scrub._x/202) * s.duration));
}

Seek() Not Really Working
So I'm redoing my portfolio site.
I am incorporating video from after effects into it. I've tried to do this about 1,000 ways and there's problems with each of them.

The files are a mess, but I figured it would be easier to just show you what I'm trying to do.
1)This example has the flv embedded into it and I'm just jumping back and forth using frame labels to switch between slides.
The Problem: it skips while it flips to the next one. It doens't do it when you go in order, just when you skip from say 1 to 5 then it hesitates for a second....I don't want it to do that.

2)This version uses a netstream object, and is trying to seek to a different second dending on which button you use.... in this FLV each transition is broken into it's own second, so when you're at button number 2, it passes the number two, to the NS object.
The Problem: the timing is off. It's seeking off of the current time I guess, it's not seeking in full seconds from the start of the stream.
What I need is a way to transition from a slide to any other slide in the timeline, without skipping or hesitating as it goes to the next slide.

Anyone have any suggestions for either version that would allow me to jump *right* to the slide i need without it hesitating?

here's the link to the files:

http://www.ira-soup.com/site.zip

I've been pulling my hair out for close to 3 weeks trying to get this right, any help would be appreciated.

Play, Stop And Seek
Hi
I have a flash movie that is a preloader and a movie, i want to beable to control this movie by including stop and play buttons, and a seek bar. How would i make these?
Thanks

Seek Import Development...
How can I get a flash app to allow a user to browser for, and import an image file of there choice, and get it to be displayed in a little tumbnail ??

I did a web searche for importing flash and all I get is the actual 'import' option within flash library itself which isn't what I want.

If anyone can point me to a tutorial that covers this I'd appreciate it!

Thks,
z3ph!

Possible To NetStream.seek() Locally?
Hello,
I am trying to use NetStream.seek() to jump to various parts of my .flv. When I attempt to jump (seek) to any part of the .flv, the .flv stops. The only exception is when I seek to 0, seek(0), then it rewinds and starts to play from the beggining.

I have tried streaming the movie from the internet, instead of locally on the same machine. The same problem occurs. Do you need to use FlashCom for NetStream.seek() to work? Is it possible to NetStream.seek() locally? (Having the .swf that calls the .flv in the same folder)

Thanks,
computerpain
Flash MX 2004

Seek Advanced Coders
I have been using flashkit.com for over a year, but as you develope your own skills, you realise that the questions on the board is very much the same as for one year ago.

I wanna ask, if some of you guys would like to team up and make a homepage with advanced tutorials for the real issues about flash. (Instead of "How do I make my man walk?")

What ya say, guys?

Building A Slider/ Seek Bar
In audio slideshows seen on a lot of news sites their is slider/ seek bar at the bottom of the slideshow. You can drag it back and forth to go through the images if you don't want to wait for it to play out. A lot of times it is accompanied by a play/pause option.

Having a tough time finding any "how to" tutorials. Can anybody provide for some direction on this one? Would like to build my own, but not sure where to start.

Creatng Seek Bar For Videos ?
Hi,
I want to load a WMV/AVI video on my flash movie, now i have almost done with the controls of it by using behaviours. Now i can stop, pause, and play the selected video. But i need to know that how can i control the video by using the SEEK BAR. Or in other words how can i make the SEEK BAR as Window Media Player have or Quick Time Player has ??


Any Idea, any comment will be appreciated.



Thanks.

Please Help To Create Progress/Seek Bar
so, let's say i have a Flash movie that has progress bar showing where you
are in the movie... and let's say that i now want that progress bar or tab to
be something a user can grab and use to quickly scroll to another
point in the movie, like a link below...

http://www.irvingisd.net/blackboard/...nouncement.swf

Please help or direct to a fla samle or good tutorial
thank you all

I Can't Get This To Work, I Seek Assistance.
I'm trying to modify this image pan tutorial a bit...but it isn't working.

http://www.kirupa.com/developer/flas..._image_pan.htm

there are two things that I need to change. The way it currently is...the function is operating on any mousemove. So in other words, whenever you move around the mouse, the strip moves left and right.

I want to have it so that it is constrained to when you are rolling over a certain MC of thumbnails.

The other issue, which is related is that the code is using the width of the stage to calculate the move, but because my strip of thumbnails is an MC that is less than the width of the stage,.....how can I modify the code to base it's absolute left and right settings on the thumbnail MC instead of the whole stage.


If you can help me with this, I will be happy.






this.onMouseMove = function() {
constrainedMove(bg_mc, 4, 1);
};
function constrainedMove(target:MovieClip, speed:Number, dir:Number) {
var mousePercent:Number = _xmouse/Stage.width;
var mSpeed:Number;
if (dir == 1) {
mSpeed = 1-mousePercent;
} else {
mSpeed = mousePercent;
}
target.destX = Math.round(-((target._width-Stage.width)*mSpeed));
target.onEnterFrame = function() {
if (target._x == target.destX) {
delete target.onEnterFrame;
} else {
target._x += Math.ceil((target.destX-target._x)*(speed/100));
}
};
}

I Can't Get This To Work, I Seek Assistance.
I'm trying to modify this image pan tutorial a bit...but it isn't working.

http://www.kirupa.com/developer/flas..._image_pan.htm

there are two things that I need to change. The way it currently is...the function is operating on any mousemove. So in other words, whenever you move around the mouse, the strip moves left and right.

I want to have it so that it is constrained to when you are rolling over a certain MC of thumbnails.

The other issue, which is related is that the code is using the width of the stage to calculate the move, but because my strip of thumbnails is an MC that is less than the width of the stage,.....how can I modify the code to base it's absolute left and right settings on the thumbnail MC instead of the whole stage.


If you can help me with this, I will be happy.






this.onMouseMove = function() {
constrainedMove(bg_mc, 4, 1);
};
function constrainedMove(target:MovieClip, speed:Number, dir:Number) {
var mousePercent:Number = _xmouse/Stage.width;
var mSpeed:Number;
if (dir == 1) {
mSpeed = 1-mousePercent;
} else {
mSpeed = mousePercent;
}
target.destX = Math.round(-((target._width-Stage.width)*mSpeed));
target.onEnterFrame = function() {
if (target._x == target.destX) {
delete target.onEnterFrame;
} else {
target._x += Math.ceil((target.destX-target._x)*(speed/100));
}
};
}

Help With Mp3 Player Seek Control
I have an mp3 player that loads an external mp3. I'm only having troubles getting the calculation for the playback head to work correctly when the user drags and releases it. When the user first presses play the playback head begins to progress just fine here is the code that works.

scrub.onEnterFrame = function() {
scrub.playhead._x = (my_sound.position/my_sound.duration)*95.2; //95.2 being the length of the playback line

The problem I'm having is with getting the x position of the playhead onRelease to correspond to a percentage of the duration of my_sound. Any help with this would be awesome! Thanks
Here is the part I'm having trouble with:

var newLoc = scrub.playhead._x+(my_sound.position/my_sound.duration)*95.2;
my_sound.start(newLoc, 0);

btw, I know there is a media controller component and flash 8 has a better way of handling this. I have to publish this as flash 7

NetStream.seek Not Precise?
Hey all,
has anyone encountered an issue with Netstream.seek(#seconds) not always hitting the mark?
I've got a new site up that 99% of the time handles looping of a video correctly, but every so often it's like when we say seek(5) meaning go to the keyframe at 5 seconds into the video, it seems to leap to one or two frames too early. This seems like it might be happening when the video was a little slow to load in the first place. Is this possible? Some kind of slippage? A bug in the player? Has anyone found a way around it?
Thanks!
Josh

Copyright © 2005-08 www.BigResource.com, All rights reserved