14 Replies Latest reply on Jun 26, 2009 2:23 PM by melody965

    on click - appear on stage

    melody965

      there is a website designed

      there is one button (suppose: button_btn);

      there is a mc containing contact form (suppose: contact_mc)

      (1) i want, on clicking this button there should be appear contact form (or mc containing contact form) on the page (stage) on the top of all content.

      (2) by clicking on the page (on the region other than that contact_mc / or contact form) that should be disappear.

       

      plz advise how should setup...

      thanks in advance.

        • 1. Re: on click - appear on stage
          Ned Murphy Adobe Community Professional & MVP

          Create the contact form as a movieclip, place it on the stage, and give it an instance name... maybe something like contactForm

           

          For whatever version of actionscript you are using, make that movieclip invisible at the start and have the button make it visible using the _visible (AS2) / visible (AS3) property of the movieclip.

           

          You will be better off putting a button in the contact form with a "CLOSE FORM" label to use to make it invisible again, both from a design perspective, and a user-friendly perspective.

          • 2. Re: on click - appear on stage
            melody965 Level 1

            thanks ned,

            the same thing can i do in dreamweaver

            of course currently i m working for a site in flash

            but its imp. to know about dreamweaver also as in future may be i need...

             

            thanks in advance

             

            (may be u ask question that y i not set my mind to build all sites in flash; u told someone in past that: its easy to build whole site in flash instead of using swf's peaces in site ... something like this

            because... see if someone sends the site for adsence program (google ads) i heard that in their test our text content unable to get found by them in flash sites... thats y we cannot submit our falsh site for adsence program...

             

            may be some other reason y people not doing full site in flash...)

            • 3. Re: on click - appear on stage
              Ned Murphy Adobe Community Professional & MVP

              The only real reason most people object to full Flash sites is because of the potential detriment to SEO.  Since I don't know SEO very well, I have to believe that concern is valid, though search engine are starting to capture Flash content in their listings.  So having a site that mixes Flash and regular html content is a better SEO candidate than a full Flash site design.

               

              There are a few stubborn die-hards that won't budge from believing that Flash doesn't have a home in web design--in general, they don't know how to use it.. so it ends up being a case of 'that which is not understood is condemned'.

              1 person found this helpful
              • 4. Re: on click - appear on stage
                melody965 Level 1

                thanks ned,

                you didnt ans. my 1st part ...

                 

                "how could i do in dreamweaver" i mean this: on click visible - invisible contact form as u explain in flash...

                • 5. Re: on click - appear on stage
                  Ned Murphy Adobe Community Professional & MVP

                  You would need to use something in the way of DHTML or CSS to create a div that you can hide and show.  I'm not the guy to ask though.  You should take this question to the Dreamweaver forum.

                  1 person found this helpful
                  • 6. Re: on click - appear on stage
                    melody965 Level 1

                    yes right,

                    just thought i should ask because u r champ guy...

                    • 7. Re: on click - appear on stage
                      melody965 Level 1

                      thanks a lot ned

                      • 8. Re: on click - appear on stage
                        melody965 Level 1

                        ned, as u exp.

                         

                        i have a mc which i set invisible at starting

                        and on click a button - visible

                         

                        now the question is

                        if i placed some motion tween (sliding from left to right / from bottom to top - off course with stop() at last frame) in that mc, which not able to see after clicking button (as on click that button we set mc visible)

                        i want - on clicing button mc should appear with that motion (means mc should play all the frames inside that)

                        any idea for this?

                         

                        thanks in advance.

                         

                        • 9. Re: on click - appear on stage
                          Ned Murphy Adobe Community Professional & MVP

                          I'm not really clear on what you just tried to describe.  Be sure to give the mc it's instance name at every keyframe.  If the first keyframe does not have the name, the next keyframe inherits that first's name ( or lack of one).

                          • 10. Re: on click - appear on stage
                            melody965 Level 1

                            ned,

                            just consider, as we already discussed,

                            there is mc with instance name[contact_mc] containing contact form, and a button [contact_btn]

                            and inside contact_mc i made some motion tween [for the purpose - when one click contact_btn; that contact form should appear sliding from left to right]

                            (motion tween is inside the contact_mc; not on main timeline)

                            as, at starting that contact_mc is insivible (_visible=false) and on clicing contact_btn i set contact_mc visible=true

                            but when it - visible; (because of stop() at last fame inside contact_mc) we cannot see that motion from left to right.

                             

                            i want such situation that on click contact_btn; contact_mc should play all the frames;

                            so that we can see the contact form sliding from left to right;

                            thank for your time...

                            • 11. Re: on click - appear on stage
                              Ned Murphy Adobe Community Professional & MVP

                              I think I might understand now... put a stop(); in the first frame of the animation of the contact_mc.  In the code for the contact_btn, along with the visible = true, include: contact_mc.play();  right after it.

                              • 12. Re: on click - appear on stage
                                melody965 Level 1

                                thanks ned,

                                lol, hope that this will be the last post of this topic.

                                (1) I placed contact_mc at one corner of the stage; and on clicking contact_btn the contact form appears from right (out of the stage) to left (on the stage area)

                                In the published html file, also showing the stuff out of the stage! May be because it is a part of movie clip (contact_mc); never mind I can mask only the region I have to show.

                                But the question is I placed ready made button (from components) for submit, reset and close inside contact_mc. One funny thing: these buttons appear for a while (first frame inside contact_mc) and disappear during the sliding (i.e. in between frame 2 to second last) and finally appear at last (on the last frame inside contact_mc). What’s the matter???

                                What should do that they appear always for start to end of the motion tween.

                                 

                                (2) I placed stop() on first as well as last frame inside contact_mc

                                Now the question is: on clicking contact_btn; contact_mc make visible.

                                But if I click again on contact_btn the timeline inside contact_mc goes and stop at frame1. actually it shouldn’t happened. What to do for this?

                                 

                                (3) if I do not put motion tween (for sliding view); everything is ok

                                After doing sliding (motion tween)

                                Close button (button for closing contact form, inside contact_mc; on click close button contact_mc._visible = false;)

                                Not working!!!

                                 

                                 

                                • 13. Re: on click - appear on stage
                                  Ned Murphy Adobe Community Professional & MVP

                                  You should take time to think thru these issues.  That's how you will learn.  When you are constantly handed answers you become dependent on being handed answers.  When you struggle to find them yourself, you learn how to solve things for yourself.

                                   

                                  1) The buttons should be a part of the movieclip that you are tweening

                                   

                                  2) Don't click the button again... hide it while the form is visible

                                   

                                  3) If the button is part of the contact_mc, then it should target "this" rather than "contact_mc"

                                  • 14. Re: on click - appear on stage
                                    melody965 Level 1

                                    thanks ned,

                                    also, i know this is excellent opinion...