A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: Controlling SWF Loaded in Sprite...is it possible?

  1. #1
    Senior Member
    Join Date
    Aug 2000
    Location
    Desert Southwest
    Posts
    367
    Hi All ---

    I am seeking some assistance. I have a sprite that is loading an external swf(avi converted to an swf). I would like to be able to pause the external swf and then have it resume playing when a button is pressed. Is this possible?

    Right off the bat, my guess is no, but I am curious to see if any of the creative minds here have found a work around.

    Thanks for any and all responses.

    Cheers.
    SDL

  2. #2
    Senior Member Cadence's Avatar
    Join Date
    Aug 2000
    Location
    Columbus, Ohio
    Posts
    3,428
    Have you tried using Tell-Target ?

    For example ... Make your Pause and Play buttons, and add these actions :

    Pause

    OnRelease
    --- Tell-Target "/spritename"
    ------ STOP

    Play

    OnRelease
    --- Tell-Target "/spritename"
    ------ PLAY


    That should work, of course it depends on how the AVI was converted ...

    Just a suggestion ,

    Peaces,
    Cadence

  3. #3
    Flashkit historian Frets's Avatar
    Join Date
    Oct 2000
    Location
    flashkit
    Posts
    8,797
    Sure.

    load your movie into a sprite
    You know that one already
    Name your sprite
    myavi

    Now for the controls

    Stop

    On event
    Tell target>"/myavi"
    stop

    To make it resume
    Same as above.
    except play.

    happy swishing.



  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Desert Southwest
    Posts
    367
    Originally posted by Cadence
    Have you tried using Tell-Target ?

    For example ... Make your Pause and Play buttons, and add these actions :

    Pause

    OnRelease
    --- Tell-Target "/spritename"
    ------ STOP

    Play

    OnRelease
    --- Tell-Target "/spritename"
    ------ PLAY


    That should work, of course it depends on how the AVI was converted ...

    Just a suggestion ,

    Peaces,
    Cadence
    THAT'S IT! So simple, don't I feel dumb! Thanks for your help!!!!!

  5. #5
    Don't pick at that...
    Join Date
    Oct 2002
    Location
    Ellicott City, Maryland, USA
    Posts
    74
    I know this is an old thread, but it had bearing on my current problem,so I thought I'd revive it.

    My question is this: will this also work to target a specific frame in an externally loaded movie, or a specific sprite in the external movie?

    I have a web site that has an arbalest (catapult) roll into the scene and stop. At the press of a button, it fires the catapult and transitions to the appropriate page: My page - WIP

    At first, I tried to load the entire 500+ KB file after the main movie loaded, but I was unable to control the external movie at a particular frame, or target a particular sprite.
    So I split it into 2 movies, one that rolls in and one that fires. The one that rolls in is external, and the one that fires is preloaded with the main movie, making it almost 550kb.
    I'd really like to reduce that.

    Thanks in advance.

  6. #6
    Senior Member Lys12's Avatar
    Join Date
    Feb 2001
    Location
    Munich, Germany
    Posts
    5,237
    hi,

    simply add a / to address the main timeline of the loaded movie, or a /spritename to address a sprite.
    e.g.:

    OnRelease
    --- Tell-Target "/spritename/"
    ------ go to frame X

    or

    OnRelease
    --- Tell-Target "/spritename/spritename2"
    ------ go to frame X

  7. #7
    Don't pick at that...
    Join Date
    Oct 2002
    Location
    Ellicott City, Maryland, USA
    Posts
    74
    Originally posted by Lys12
    hi,

    simply add a / to address the main timeline of the loaded movie, or a /spritename to address a sprite.
    e.g.:

    OnRelease
    --- Tell-Target "/spritename/"
    ------ go to frame X

    or

    OnRelease
    --- Tell-Target "/spritename/spritename2"
    ------ go to frame X
    Thanks so much Lys.
    I'm gonna go try that now... but you've never steered me wrong before, so I have every confidence it will work.

    Cheers!

  8. #8
    Don't pick at that...
    Join Date
    Oct 2002
    Location
    Ellicott City, Maryland, USA
    Posts
    74
    Sorry...still not getting it.

    I have a sprite in my main movie called "background".
    At frame 1, it loads "vectopult_window.swf" into the sprite.
    Inside the "vectopult_window.swf" are 2 sprites called "SirNicodemys" and "vecto_fire_small".
    There are stop effects in each of these sprites, as well as a stop at frame 20 of "vectopult_window".
    I have tell target actions at frame 22 of vectopult_window, to tell the 2 sprites when to advance to the second half of the animation.


    So the button is pressed, the preloader shows up and then the catapult rolls in and stops. That works fine.
    Now I need to have an action (on press)to tell the external movie to go to frame 22... where the tell target actions are.

    I tried this:
    ---Tell-Target"/background/vectopult_window"
    ---go to frame 22


    I also tried:
    ---Tell-Target"/background/"
    ---go to frame 22


    I even tried
    ---Tell-Target"/background/vecto_fire_small"
    ---go to frame "x"
    (I forget which frame now)

    Can you tell me, based on this barely articulate explanation, how I need to do this?
    Or do I need to upload my swi files to make any sense of this?
    It seemed so simple from your explanation that I suspect I am doing something really stupid

    Thanks.

  9. #9
    Senior Member Lys12's Avatar
    Join Date
    Feb 2001
    Location
    Munich, Germany
    Posts
    5,237
    hmmm... this one should work:

    I also tried:
    ---Tell-Target"/background/"
    ---go to frame 22
    i've attached a file that's set up the way i understood your description. see if it helps:
    Attached Files Attached Files

  10. #10
    Don't pick at that...
    Join Date
    Oct 2002
    Location
    Ellicott City, Maryland, USA
    Posts
    74
    Thank you for the example file you posted.
    I downloaded it, and it appears to be formatted the way my movie is formatted (although it's in SwishMax, not Swish v2.01).
    I didn't have an opportunity to work yesterday, but I'll play around with it today ans see if I can find my error.

    Could my problem stem from the fact that my external swf has a preloader? Does the "go to frame" action need to adressed to frame 22 in Scene 1 in order to work?

    Thanks again, Lys.

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