A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: whomever said the stop (); functions still works properly is WRONG!

  1. #1
    |animation|queen|
    Join Date
    Aug 2003
    Location
    Funkytown
    Posts
    73

    whomever said the stop (); functions still works properly is WRONG!

    unless i am doing something drastically wrong...

    but i'm pretty sure i'm not.

    here's the deal... i have this VERY simple header. 2 layers... one layer is a logo. doesn't do anything... just sits there static.

    the other layer has an embedded video in it. that is it.

    all i want is for it to play once, and stop. i have put the AS in the last frame... and what happens? the thing just continually loops. i don't get any kind of compiler error... it just doesn't work.

    i have googled this to death... no solution. there are no symbols, or movies clips. i have no other code at all...
    In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move.
    -Douglas Adams

  2. #2
    Musical chair sumwungye's Avatar
    Join Date
    Jan 2008
    Location
    Planet Earth, third planet from the Sun
    Posts
    287
    What is the instance name of your video?
    --SumWunGye

  3. #3
    |animation|queen|
    Join Date
    Aug 2003
    Location
    Funkytown
    Posts
    73
    it's just an .avi file.. does it need to have an instance name applied to it?
    In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move.
    -Douglas Adams

  4. #4
    Musical chair sumwungye's Avatar
    Join Date
    Jan 2008
    Location
    Planet Earth, third planet from the Sun
    Posts
    287
    Does it have that option? If so, change it to "instance" because that's all I can think of right now and change your code to this...

    Code:
    on(release){_root.stop();_root.instance.stop();}
    --SumWunGye

  5. #5
    |animation|queen|
    Join Date
    Aug 2003
    Location
    Funkytown
    Posts
    73
    thank you for trying, but that didn't work...

    problem not solved.

    SOMEONE?! ANYONE?!


    BUELLER?
    In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move.
    -Douglas Adams

  6. #6
    |animation|queen|
    Join Date
    Aug 2003
    Location
    Funkytown
    Posts
    73
    this problem still hasn't been solved.

    if it's a simple fix, can someone just throw me a bone here?

    or does nobody really not know...
    In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move.
    -Douglas Adams

  7. #7
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    The video has it's own timeline (sort of)...so if you don't have an instance name how can you target it to stop it? Calling stop() flat out on the timeline will stop that timeline but it doesnt effect any of the children (as I remember since AS1).

    Additionally, most video sits in a wrapper (either Video or FLVPlayback) and you need to use different methods for stopping those.

  8. #8
    Senior Member
    Join Date
    Apr 2008
    Location
    Nottingham, UK
    Posts
    348
    are you using an embedded video, or have you imported it using the flvplayback component, or are you bringing it in using actionscript?

    as far as I can remember, the default behaviour for a video brought in using AS or the FLVplayback component is not to loop.

    alternatively, you could always check the exceptionally useful help section in the flash cs3 IDE.

    Dan

    *EDIT* Just read your original post properly . Any reason you've decided to use embedded video? If not, I strongly suggest using the video/netstream object. You get much more control that way.
    Last edited by dan_hin; 06-18-2008 at 01:59 PM.

  9. #9
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    You'd really have to post your .fla to have someone say what's wrong. I just duplicated what you described and stop(); works just fine. Is your embedded video really embedded? Is it in a movie clip?

  10. #10
    |animation|queen|
    Join Date
    Aug 2003
    Location
    Funkytown
    Posts
    73
    i can't really post my .fla... the client is sensitive. i suppose i could post a similar file, but i don't really have time to create one.

    i'll do my best to explain what i did.

    i created an animation in After Effects and exported that as an .flv.

    i brought that into Flash. so i have 2 layers: video & logo. the logo just sits over top of the video layer.

    i want the playhead to stop on the last frame of the video. the video itself does not loop, it's Flash that keeps looping it. (i made absolute sure of this.)

    i'm using an embedded video because it is so short... like less then 5 seconds long. i don't need it to stream. but if you have a good way to stop this from looping that requires the video to stream, i'm open to suggestions.
    In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move.
    -Douglas Adams

  11. #11
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    In the end creating a sample is probably going to save time rather than continuing to describe the problem here, but I'll take another shot...

    Is your .swf file longer than the video? Is the video on the timeline the whole time? In other words, do you have say, a 30 second .swf and you want the video to play for the first 5 seconds and then stay on the last frame for the next 25 seconds?

    If you have a setup something like this, then yes, your video will loop. To get around this you could put the embedded video into a movie clip and put a stop action on the last frame of the movie clip.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center