6 Replies Latest reply on Nov 23, 2017 8:01 AM by kglad

    A few new codes to help please.

    garethghards.co.za Level 1

      I drew up a delivery note in fireworks and saved it as a jpeg and imported to my stage. It looks really great and need it to scroll, firstly and secondly over the places where pens are used in the printed version, ill use a component with my adobe suite 5.5,

      i saw on the net and tried it but didnt get it right, using action script 2 for the complete site im building to make the filled in component reflect elsewhere once submitted.

       

      i saw and tried

      abc = efg ; That did not work please help me to display the content in another component in my library, and to clear the content where its filled in after pressing the submit button,and to keep the info stored in the component, my concern is that the next person to write info and press the submit button overwrites the components info previously given by the previous submit button press,

       

      can you show me a way to duplicate empty components for info storing and so that they are only used once, or cleared and info stored elsewhere.?

       

      such info would need to be retrieved if an edit needs to be done, such as a delivery note or user account details. the first copy must remain, and any updates or changes aswell, making several copies of components filled with info with a date of each store of info.

        • 1. Re: A few new codes to help please.
          kglad Adobe Community Professional & MVP

          anything you want to control with actionscript needs to be converted an object.  right click the note>convert to symbol>movieclip and assign its registration point to the top left.  in the properties panel assign an instance name, eg note_mc.

           

          then add a mask (converted to a movieclip with top-left reg point and assign an instance name, eg mask_mc) to the stage that masks note_mc and displays what the viewer to see.

           

          you can then use:

           

          paramF(mask_mc,0,mask_mc._y,mask_mc._height,mask_mc._y+mask_mc._height-note_mc._height);

          mask_mc.onRollOver = overF;

          mask_mc.onRollOut = outF;

           

          function overF():Void{

          this.onEnterFrame=scrollF;

          }

          function outF():Void{

          delete this.onEnterFrame;

          }

          function scrollF():Void{

          note_mc._y=this._yMouse*this.m+this.b; // or note_mc._y=.5*note_mc._y+.5*(this._yMouse*this.m+this.b);  for easing

          }

          function paramF(mc:MovieClip,x1:Number,y1:Number,x2:Number,y2:Number):Void{

          mc.m=(y1-y2)/(x1-x2);

          mc.b=y1-mc.m*x1;

          }

           

          // and i don't understand anything you stated about components.

          1 person found this helpful
          • 2. Re: A few new codes to help please.
            garethghards.co.za Level 1

            So the mask has two faces, rollon and the roll off, hiding the document under it, mask is to my knowledge never visible because its a mask that allows the bottom to be seen to its masks dimension, now you saying mask has two faces, when on document is seen to the dimensions when off its seen without the dimensions, im worried now why have a mask then if the object can be drawn to thatt dimension, but in my case it defeating my object, which is to add a scrollbar to the document to be seen in a mask.

             

            I think i cant read code proberbly and need your reply back to tell me that coding is sometimes not as its written,

            • 3. Re: A few new codes to help please.
              kglad Adobe Community Professional & MVP

              that code uses the mouse position to scroll note-mc, not a scrollbar.

              • 4. Re: A few new codes to help please.
                garethghards.co.za Level 1

                cool thank you.

                • 5. Re: A few new codes to help please.
                  garethghards.co.za Level 1

                  scrolling helps, but component info shifting, and creating a table of components thats can keep being used and a storage for new component copies, in a page i can scroll yes i like that idea.

                  • 6. Re: A few new codes to help please.
                    kglad Adobe Community Professional & MVP

                    you're welcome.