dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Help with how to control external swf

  1. #1
    Member
    Join Date
    Nov 2005
    Posts
    94

    Help with how to control external swf

    Hello everybody.

    Can anyone help me with this?

    I have a main swf which loads, inside an empty movieclip called "container", 3 external swf (external1.swf, external2.swf, external3.swf) at different time.
    On the main.swf I have a play & pause buttons and I want to tell them that when on press, stop/pause the current movie that is inside the "container"

    How can I do this?

    Thanks in advance

  2. #2
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    In AS2 you refer to the loaded clip via the instance name of the clip you have loaded the clip into. So in your case you should be able to issue commands to container and it will effect the loaded clip.
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


  3. #3
    Senior Member
    Join Date
    Apr 2006
    Posts
    431
    play button
    PHP Code:
    play_btn.onPress = function () {
    container.play()

    pause button
    PHP Code:
    pause_btn.onPress = function () {
    container.stop()

    stop button (stops and takes you to the beginning of the movie)
    "begin" is the frame label from wich the animation starts
    PHP Code:
    stop_btn.onPress = function () {
    container.gotoAndStop("begin")

    you can also control levels, if you don't want to load the movies into another movieclip. The code is similar, only insted of container write _level1 or _level45 or whatever level you want to control (the level you load a movie into must be the level number that stands after _level)
    Last edited by cristi_b_1; 05-26-2008 at 06:56 AM.

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