A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 23

Thread: interaction

  1. #1
    Senior Member
    Join Date
    Jan 2004
    Location
    North Queensland Australia
    Posts
    111

    interaction

    There is probably a tutorial on the matter but where? what I want to do is: ie: a birthday present wrapped and when the viewer clicks on it he sees what is inside; easy you may say, it can be done with a button, trouble is with a button when you move the mouse away from it it reverts to the first image; I want it to stay open then do other presents the same way until they are all showing the contents. Is it that difficult?
    Claudine.

  2. #2
    Goodbye...
    Join Date
    Aug 2003
    Posts
    661
    Take a look at the file. It's not pretty, but it gets the point across.

    - wizard34
    Attached Files Attached Files

  3. #3
    Member
    Join Date
    Apr 2004
    Location
    china
    Posts
    42
    the point is doing your work with MovieClip ,not Button

    MovieClip.onRlease=function(){};

    and add "stop()" on the correct frame
    we don't know whether tomorrow is
    good or bad ,
    but good tomorrow will come sooner
    or later...
    my blog:http://www.xfykzz.com

  4. #4
    Senior Member
    Join Date
    Jan 2004
    Location
    North Queensland Australia
    Posts
    111
    Well it seems I am doing something very wrong, this movie clip thing; in your example Wizard, in the library the movie clip has a little arrow and when you click on it it shows what the movie clip is; mine doesn't so I probably didn't make the movie clip properly; just as well it rains a lot here, because learning Flash takes ages!
    Attached Files Attached Files
    Claudine.

  5. #5
    Goodbye...
    Join Date
    Aug 2003
    Posts
    661
    Actually now that I think about it, xfykzz is right. Using Movie Clips instead of buttons is the quicker and easier way to go. I've created a new file.

    - wizard34
    Attached Files Attached Files
    Last edited by wizard34; 04-26-2004 at 04:13 PM.

  6. #6
    Goodbye...
    Join Date
    Aug 2003
    Posts
    661
    I think I should've told you to do it that way in the first place.

    - wizard34

  7. #7
    Senior Member
    Join Date
    Jan 2004
    Location
    North Queensland Australia
    Posts
    111
    Fine this movie clip, if... I could do it! I don't know how; What I am doing:
    1.File/ new
    2.import - box (present) -
    3. the box is in the left corner of the stage, so I put it in the middle.
    4. with it selected, I do: Insert/convert to symbol, name: box, tick movie clip,
    5. edit/edit document.
    So it is in the library as a movie clip, that is the pic with a little circle in the middle. no little arrow.
    Also how do you get your "present" to split in four? I think that is cool.
    Claudine.

  8. #8
    Goodbye...
    Join Date
    Aug 2003
    Posts
    661
    I just did a simple Shape Tween. You create a Shape Tween the same way you would create a Motion Tween. Except you change it from Motion to Shape in the Properties Panel. I rarely use Shape Tweens and I don't want to give you the wrong information. As far as the steps you listed, everything seems to be right. You create the animation (present opening, etc.) inside the Movie clip and then you give a Frame Label wherever the animation will begin and you use it in the AS.
    code:
    on (press){
    this.gotoAndPlay("frameLabel");
    }


    My animation (box splitting) was a crappy example. If you take the time, you can create something 10x better whether it's frame by frame or a clever usage of Motion/Shape tweens. Good Luck!

    - wizard34

  9. #9
    Senior Member
    Join Date
    Jan 2004
    Location
    North Queensland Australia
    Posts
    111
    Forget about the box splitting for the moment; one thing at a time; I still don't understand how to create the animation inside the movie clip; Frame label? I have looked at your example more than once and I can't understand how it is done. You have nothing written in your frame label, and there appears to be only one frame in the timeline; could you please explain step by step how to this, present/surprise; I am sorry to be such a nuisance.
    Perseverance is my only virtue.
    Claudine.

  10. #10
    Goodbye...
    Join Date
    Aug 2003
    Posts
    661
    No, you're not a nuisance. You're just eager to learn I guess.
    Double click on one of the boxes, so you'll be in symbol editing mode. There you'll see everything, the frame label, the animation. I can't give you too much of an explanation right now, but I will as soon as I get home.

    - wizard34

  11. #11
    Member
    Join Date
    Nov 2003
    Location
    In the Valley, Ca.
    Posts
    78

    My 2 cents

    Here's an example that uses what you already know(even if you don't realize it.

    it's very basic but, is also very entertaining.

    1st when you want to make a movieclip (MC). create it right on the "stage". then select it, right click on it and choose "convert to symbol" choose movie clip, and name it. now you have the MC already on the stage.

    Now, right click your MC and choose "edit in place". you'll notice that you get a new timeline. that timeline is for your MC and the 1st key frame is already exposed with the art work you created on the stage.

    this method is a way good seeing your MC and the stage at the same time. you can always just "edit" the MC by itself by choosing "edit" instead of "edit in place". your MC was automatically placed in your library when you 1st created it.

    the example I gave you is a MC with a button inside of it. the "bow" is a button and the "up state" is the bow you see. now the "over state" is just a MC within the button. click the "over" keyframe. and then "rt. click/editin place" you can see the timeline and the animation. that is what makes it pull.

    the "present MC" (the one you see on the stage) has a stop action on the 1st frame that stops the MC from playing until you click the button. but the button still is active and that's why when the mouse rolls over it. it plays the MC that I placed in the button.

    when the button is released. the buttons actionscript say "on release go to and play "OPEN" it goes to the next frame of the "present MC". I labeled the frame "OPEN" and used that label in the buttons action script.) when the button was released the MC plays till the end were I have a keyframe that has actionscript telling the MC to stop playing and hold on the last frame.

    down load this and then click on the MC and right click over the MC and start looking at and breaking down what I did. It will start to make more sense.

    any questions just ask.
    Attached Files Attached Files
    Last edited by Sanchini; 04-27-2004 at 05:22 PM.

  12. #12
    Senior Member
    Join Date
    Jan 2004
    Location
    North Queensland Australia
    Posts
    111
    This present thing is getting more exciting by the minute! I will be glued to my computer, and pestering you all at Flashkit until I can do it. It all started when I received an e-card and wondered how it was done; and I want to do better!
    Perseverance etc!
    Claudine.

  13. #13
    Member
    Join Date
    Nov 2003
    Location
    In the Valley, Ca.
    Posts
    78

    Claudine

    I looked back on some of the posts in this thread. here is the answer to some of your questions.

    frame label?
    if you open the properties panel and then click on a frame. there is a window in the panel that looks like this,
    <frame label>. what you can do is click that window and give that frame a name. in this case I called my frame "OPEN". then when you use buttons to go to a frame. instead of trying to remember, what scene, what frame (counting those little squares on the timeline is a pain). you can give the frame a name and then when you want to have Flash to go to it. you can just tell it by it's name. more friendly.

    As far as seeing just 1 frame in the "scenes" timeline. (note that MC's have timelines of their own). that is so you can have a held backround while you have MC's running. kind of like going to a 3 ring circus and even though you're under one tent, something is going on in all three rings at the same time.
    Last edited by Sanchini; 04-27-2004 at 07:18 PM.

  14. #14
    Goodbye...
    Join Date
    Aug 2003
    Posts
    661
    kind of like going to a 3 ring circus and even though your under one tent, something is going on in all thre rings at the same time.
    Good example lol. Hehe... I'm just messing with you.

    - wizard34

  15. #15
    Member
    Join Date
    Nov 2003
    Location
    In the Valley, Ca.
    Posts
    78

    Wizard

    Are you trying to make me look bad while I'm talking to an Aussie babe.

    we're both SoCal boys, LOL.

  16. #16
    Goodbye...
    Join Date
    Aug 2003
    Posts
    661
    Ohh man, what the hell was I thinking?

    - wizard34

  17. #17
    Senior Member
    Join Date
    Jan 2004
    Location
    North Queensland Australia
    Posts
    111
    Well I have been paddling with this thing for days; it's working but it isn't right; I have all this stuff in the timeline, when all you have is one miserable keyframe; and that is for one present, when I do my Xmas card I want lots of presents all different; so can you, please, have a look and tell me what is wrong? thanks,
    Attached Files Attached Files
    Claudine.

  18. #18
    Goodbye...
    Join Date
    Aug 2003
    Posts
    661
    Here you go. You forgot to put in the frame label.
    Attached Files Attached Files

  19. #19
    Senior Member
    Join Date
    Jan 2004
    Location
    North Queensland Australia
    Posts
    111
    It still doesn't tell me why I have 3 layers on the main timeline when in yours to see what goes on I have to right click; also in your example I can copy and paste one of the boxes and it works whereas I can't in mine; what's more Sanchini's example works in the same way as yours Wizard; is it going to create problems when I put lots of different presents on the stage? I want all the presents to be present! at the beginning and then for the viewer to open them one at a time with a click.
    Claudine.

  20. #20
    Goodbye...
    Join Date
    Aug 2003
    Posts
    661
    Ohhh, that's because in my file they where in Movie Clips. That's why you would only see one frame. All the frames where inside the Movie Clip itself. You say that in my file you can copy them, that's because you're really just copying the movie clip. It won't create problems and actually it'll make it easier to make them all present at the first frame. The way you where doing it you would've had to add many layers to be able to see em' all.

    Take the present, prior to any animation, and make it a Movie Clip Symbol. Then you can do the animation inside the MC.

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