Movies controlling movies!

Ask a Question related to Macromedia Flash Sitedesign, Design and Development.

  1. #1

    Default Movies controlling movies!

    I need to know if it is possible to control a movie from another movie - let me explain.

    On the main screen I have four movies which are acting as buttons, i.e. when the viewer rolls over them they move about and turn into a button. The problem I have is that is it is possible to get all four buttons into their button state when I actually only want one at a time.

    In need something like this:

    On rollover
    Gotoandplay frame 3
    Set all other movies back to frame 1

    This way if the user rolls over this button, all the others are reset to their initial positions.

    I hope I have explained this sufficiently, thank you for you help.



    bjambean webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. Controlling quicktime movies
      Hi, I am really new to Director so this may seem like a daft question. Is it possible to have a quicktime movie as a cast member but to only play...
    2. controlling outside movies
      I have a button in one movie and I need it to tell another movie (that's in another HTML frame) to play specific frame number. Can some one help me...
    3. controlling a sprite in various movies
      I want to control the behavior of a sprite that occurs in 3 separate movies. I want the lingo to use If logic that "If the user goes to a specific...
    4. controlling loaded movies
      this is some of the script of my homepage: _root.containerLargeIMG.startDrag() loadMovie(nameLargeImage,_root.mask.containerLargeIMG);...
    5. Controlling different SWF Movies
      Sup guys, I'm pretty new to Flash and all the actionscripts, and I just found out I was in trouble. Actually, I have already posted a message...
  3. #2

    Default Re:Movies controlling movies!

    Yes. You need tell targets. Instead of buttons on the stage make them movie clips and name the clips via the property toolbox. So.. the first frame in each of these clips will be blank with a stop command on it.
    Then on rollover of the movie clip something like:

    on rollover
    tell target "my clip on stage"
    Go to an play frame 2

    on rollout
    tell targer "my clip on stage"
    Go to and stop frame 1


    tell targets are located in the depreciated menu in the action script library.

    Hope this helps.
    -John


    Mr. Brownstone webforumsuser@macromedia.com Guest

  4. #3

    Default Re:Movies controlling movies!

    Debugging errors!!

    Here is the code I put in;

    on (rollOver) {
    gotoAndPlay(3);
    tellTarget ("aButtonMainMov") {
    gotoAndPlay(1);
    }
    tellTarget ("BButtonMainMov") {
    gotoAndPlay(1);
    }
    tellTarget ("jButtonMainMov") {
    gotoAndPlay(1);
    }
    }


    Target not found: Target="aButtonMainMov" Base="_level0.instance1"
    Target not found: Target="BButtonMainMov" Base="_level0.instance1"
    Target not found: Target="jButtonMainMov" Base="_level0.instance1"

    Obviously the XButtonMainMov's are my other movies that are acting as buttons on the scene.

    This error comes up, and obviously the desired effect isn't achieved regardless of whether I put the code inside the movie or attach it to the movie in the scene.

    Also making the target enclosed by or with quotations marks makes not difference, surely there is a rudimentary mistake in my code?


    bjambean webforumsuser@macromedia.com Guest

  5. #4

    Default Re:Movies controlling movies!

    On the main timeline put
    btn1.onRollOver = function(){
    this.gotoAndStop("rollOver")
    btn2.gotoAndStop(1)
    btn3.gotoAndStop(1)
    btn4.gotoAndStop(1)
    }

    //i have labelled the frame rollover



    stwingy webforumsuser@macromedia.com Guest

  6. #5

    Default Re:Movies controlling movies!

    Argh! This is really annoying, it is still not working!

    Is used the code you suggested, and replaced the buttons for the ones that I am actually using but no luck, I placed the code in the frame which contained the button on the main scene, then in the button on the main scene and finally inside the button itself, all to no avail! But no errors this time, so I guess that is something.

    Why don't you have a quick look at what I am doing, maybe I am not explaining it well enough:

    www15.brinkster.com/bjambean/helpme/main.html

    I want all the buttons to be in there initial positions until there are rolled over and then I want them to come out as they are rolled over, but only one at a time. (Ignore the fact that the M does not return, I've not bothered to put in the simple line that tells it to do so)


    All help is gratuitously received!!!


    bjambean webforumsuser@macromedia.com Guest

  7. #6

    Default Re:Movies controlling movies!

    well i`ve just quickly made a button thing which may help you a little.

    [url]http://webforums.macromedia.com/attachments/buttons1111.zip[/url]



    stwingy webforumsuser@macromedia.com Guest

  8. #7

    Default Re:Movies controlling movies!

    That has been of great assistance! Thank you.

    I only have one little problem now; the buttons are acting irratically again. Would you mind having a look and suggesting sometthing, I have uploaded the version with the new code to the same location as above

    Thank you


    bjambean webforumsuser@macromedia.com Guest

  9. #8

    Default Re:Movies controlling movies!

    if you want to send me the .fla,i`ll have a look but its difficult from the web page.
    [email]fatcontroller@gifsrus.com[/email]


    stwingy webforumsuser@macromedia.com Guest

  10. #9

    Default Re:Movies controlling movies!

    Amazing! It works great now!

    It is funny how we all learn in different ways and get different methods to produce the same results for us.


    One thing, and I will stop bugging you all, I am already kind of embarassed that this has turned into a newbie session.

    I need some quick pointers on Variables, you guys who have seen my buttons will be able to understand what I am trying to do.

    When a user clicks on one of the four buttons I want a value sent to a variable, storing which button they clicked. Then all the buttons will move to the corner, from the center, of the stage and the selected page will open. Before getting into 'newbie' mode I would have had four separate tweens for each different button press, now I want to use a variable that kicks in after the tween.

    So here is my code so far:

    mm.onRelease = function() {
    pressed = "m";
    gotoAndPlay(65);

    That takes the play head to 65 where my movie starts, and apparently this sets my new variable called "pressed" as m, as this is button pressed.

    Then after the tween I have this code to pull out the variable:

    if (pressed = "m") {
    gotoAndPlay("make");
    } else if (pressed = "b") {
    gotoAndPlay("bus");
    } else if (pressed = "j") {
    gotoAndPlay("justin");
    } else if (pressed = "a") {
    gotoAndPlay("about");
    }

    This allows for all 4 different "presses", but obviously, as I am writing my code in here, it does not work!

    Would you guys with the superior experience, cast a knowledgeful eye over this code and spot the blatent mistake?

    Again, I can not say enough that your assistance is greatly appreciated.



    bjambean webforumsuser@macromedia.com Guest

  11. #10

    Default Re: Re:Movies controlling movies!

    One equal sign sets the value. Two equals signs checks for value...
    if(pressed = "m") // value of pressed becomes "m" always
    if(pressed == "m") // is the value of pressed equal to "m"?
    tf

    "bjambean" <webforumsuser@macromedia.com> wrote in message
    news:bhsu3u$koq$1@forums.macromedia.com...
    > Amazing! It works great now!
    >
    > It is funny how we all learn in different ways and get different methods
    to produce the same results for us.
    >
    >
    > One thing, and I will stop bugging you all, I am already kind of
    embarassed that this has turned into a newbie session.
    >
    > I need some quick pointers on Variables, you guys who have seen my buttons
    will be able to understand what I am trying to do.
    >
    > When a user clicks on one of the four buttons I want a value sent to a
    variable, storing which button they clicked. Then all the buttons will move
    to the corner, from the center, of the stage and the selected page will
    open. Before getting into 'newbie' mode I would have had four separate
    tweens for each different button press, now I want to use a variable that
    kicks in after the tween.
    >
    > So here is my code so far:
    >
    > mm.onRelease = function() {
    > pressed = "m";
    > gotoAndPlay(65);
    >
    > That takes the play head to 65 where my movie starts, and apparently this
    sets my new variable called "pressed" as m, as this is button pressed.
    >
    > Then after the tween I have this code to pull out the variable:
    >
    > if (pressed = "m") {
    > gotoAndPlay("make");
    > } else if (pressed = "b") {
    > gotoAndPlay("bus");
    > } else if (pressed = "j") {
    > gotoAndPlay("justin");
    > } else if (pressed = "a") {
    > gotoAndPlay("about");
    > }
    >
    > This allows for all 4 different "presses", but obviously, as I am writing
    my code in here, it does not work!
    >
    > Would you guys with the superior experience, cast a knowledgeful eye over
    this code and spot the blatent mistake?
    >
    > Again, I can not say enough that your assistance is greatly appreciated.
    >
    >

    tralfaz Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139