How can i apply gradient...

I have a rectangular shape movie Clip (Size :130px X40 px). I
want to apply linear gradient on it using action script. Can
anybody help me how can I apply gradient on it.
Note: This movie clip is made manually. Not by using
createEmptyMovieClip method.

i already checked this -
MAKE A OVAL ON YOUR STAGE AND GIVE THIS INSTANCE NAME 'ovl'
(withought single quote) and use the code under
here i am creating two movie clips on stage --
1st is 'ovl' and 2nd one is 'mc'
But to apply gradient on ovl i have to use setMask method
like this _root.mc.setMask(_root.ovl)
i do not want to use SetMask... I want to apply gradient
directly on 'ovl'
How can i do ??????????????
// create emtpy movieclip
mc = createEmptyMovieClip("mc",1);
// set the constants for the gradient fill
// the colors
col = [0x000066,0x0033FF];
// the alphas
alp = [100,30];
// the ratios
rat = [100,255];
//this.onMouseMove = function () {
// we will make a radial gradient
// and make it move with the mouse
// first we clear the previous gradient fill
mc.clear();
// get the mouse-position
// the x-coordinate
x = _xmouse-200;
// the y-coordinate
y = _ymouse-200;
// set the matrix for the transformation
matrix = { matrixType:"box",x:x,y:y,w:400,h:400,r:0 }
// now make the new gradient fill
mc.beginGradientFill("linear",col,alp,rat,matrix);
// now make the shape to fill
mc.lineTo(400,0);
mc.lineTo(400,400);
mc.lineTo(0,400);
// end the fill
mc.endFill();
_root.mc.setMask(_root.ovl)
Text
Text

Similar Messages

  • How can i apply this glowing effect in logo with illustrator?

    How can i apply this glowing effect in logo | ThemeForest Community Forums

    I would make several copies of the original artwork.  On each copy, section the individual areas to be gradients. It looks like you have at least four gradients, both linear and radial.  It's just a matter of building each section and then reassembling each.  Not too complex, yet nice piece of artwork.

  • How can i apply adobe bridge in my ipad 2?

    how can i apply adobe bridge in my ipad 2?

    As when installing an app on a computer, there must be a version for the app that is compatible with the computer and the OS running the computer.
    Is there an Adobe Bridge app for the iPad available via the iTunes app store?

  • How can I apply my CS Photoshop membership to a second computer?

    how can I apply my CS Photoshop membership to a second computer?

    Thank You!
    I felt like I was wandering through mazes to get that question to the right
    venue.
    Thanks again,
    Gayatri

  • How can I apply text position attributes (e.g. lower third) to more than one title at a time?

    How can I apply text position attributes (e.g. lower third) to more than one title at a time?

    jhb3243
    What version of Premiere Elements are you using and on what computer operating system is it running?
    In the case of this theoretical lower third to be applied to more than one title at a time
    a. Is there text in the lower third besides a graphic of some kind?
    b. Are all the titles to which this lower third is to be applied all together on the Timeline or scattered?
    If no text in lower third and titles all together, then, with text titles on Video 1 and lower third on Video 2, drag out the lower third to cover the length of the text titles on Video 1.
    I do not find "lower third" title files to be in the same category as certain effects where the Copy and "Paste Attributes" or "Paste Effects and Adjustments" lend themselves so well.
    Let us see what others have to say about all this. I will continue to experiment with what you seek and how you would prefer to get there. I am not optimistic but I will try.
    Thanks.
    ATR

  • How can i apply different color for each cell in jlist component?

    hi guys i need your help and sorry if my english is very bad..guys how can i apply different colors for each cell in jlist component? for example for the first cell i want to apply color blue, for the second cell i want red, etc... i need your answer guys tnx..
    Edited by: ryrene on Mar 21, 2010 12:13 AM

    ryrene wrote:
    hi guys i need your help and sorry if my english is very bad.
    ..guys how can i apply different colors for each cell in jlist component? for example for the first cell i want to apply color blue, for the second cell i want red, etc... i need your answer guys tnx..I'll see your tnx, and raise you dve bmbrs & nplm.

  • How can i  apply this  java program for  a jsp page?

    import java.io.*;
    import java.util.*;
    public class FileProcessing
      //create a vector container  for the input variables
         Vector variables = new Vector();
      //create a vector container for the constants
         Vector constants = new Vector();
      /*create a string expression container for the equation
         as read from the file */
         String expression = " ";
      //create double result container for the final result
         double result = 0;
         public boolean processFile(String filename,String delim)
          //index for values vector
              int num_values = 0;
          //index for constants vector
              int num_constants = 0;
          //current line being read from the external file.
              String curline = " ";
          //start reading from the external file
              try
                   FileReader fr = new FileReader(filename);
                   BufferedReader br = new BufferedReader(fr);
                   while(true)
                        curline = br.readLine();
                        if(curline == null)
                             break;
                    //determine the type of current interaction
                        boolean variable = curline.startsWith("input");
                        boolean constant = curline.startsWith("constant");
                        boolean equation = curline.startsWith("equation");
                        boolean output = curline.startsWith("result");
                   //on input variables
                        if(variable)
                          StringTokenizer st = new StringTokenizer(curline,delim);
                          int num = st.countTokens();
                          int count=0;
                          while(st.hasMoreTokens())
                               String temp = st.nextToken();
                               if(count==1)
                                    byte b[]= new byte[100];
                                    System.out.println(temp);
                                    System.in.read(b);
                                    String inputval = (new String(b)).trim();
                                    variables.add(num_values,inputval);
                                    num_values++;
                               count++;
                        // on constant values
                        if(constant)
                             StringTokenizer st = new StringTokenizer(curline,delim);
                             int num = st.countTokens();
                             int count = 0;
                             while(st.hasMoreTokens())
                                  String temp = st.nextToken();
                                  if(count==1)
                                       byte b[]= new byte[100];
                                       System.out.println(temp);
                                       System.in.read(b);
                                       String cons = (new String(b)).trim();
                                       constants.add(num_constants,cons);
                                       num_constants++;
                                  count++;
                        // on equation
                        if(equation)
                             StringTokenizer st = new StringTokenizer(curline,delim);
                             int num = st.countTokens();
                             int count = 0;
                             while(st.hasMoreTokens())
                                  String temp = st.nextToken();
                                  if(count==2)
                                       this.expression = temp;
                                  count++;
              // now we are ready to evaluate the expression
                       if(output)
                          org.nfunk.jep.JEP  myparser= new org.nfunk.jep.JEP();
                          myparser.setAllowAssignment(true);
                          for(int i=1;i<variables.size()+1;i++)
                             String name = "arg"+Integer.toString(i);
                             myparser.addVariable(name,new Double(variables.get(i-1)
                                                .toString()).doubleValue());
                          for(int i=1;i<constants.size()+1;i++)
                               String name = "arg" +Integer.
                                         toString(i+variables.size());
                               myparser.addConstant(name,new Double(constants.get(i-1).toString()));
                   //output is obtained as follows
                          myparser.parseExpression(expression);
                          result = myparser.getValue();
                          System.out.println("Assay value: "+result);
              catch(Exception e)
                   System.out.println(e.toString());
              return true;
         public static void main(String[] args)
              FileProcessing fp = new FileProcessing();
              fp.processFile("input.eqn",":");
    }//my text file name is: "input.eqn" (given below)
    input:Enter Value1:arg1
    input:Enter Value2:arg2
    input:Enter Value3:arg3
    constant:arg4
    constant:arg5
    Equation:arg1+arg2+arg3
    result:

    how can i apply this java program for a jsp pagewhy do you want to do this ?
    Your program reads from a file on the disk and formats based on a patterm.
    Jsp is not intended for such stuff.
    ram.

  • How can I apply drop shadow effects to graphics and pictures? It was very easy in previous versions and I can't find it. Thanks

    How can I apply drop shadow effects to graphics and pictures? It was very easy in previous versions of Final Cut and I can’t find it. Thanks

    Try this one, works marvelous:
    http://www.rippletraining.com/using-the-rt-drop-shadow-in-final-cut-pro-x.html
    Regards
    Nolan

  • How can i apply border for fluid grid layout div

    How can i apply border for fluid grid layout div

    <!doctype html>
    <!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
    <!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->
    <!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->
    <!--[if gt IE 8]><!-->
    <html class="">
    <!--<![endif]-->
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Untitled Document</title>
    <link href="boilerplate.css" rel="stylesheet" type="text/css">
    <link href="CSS/Layout.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="flexslider.css" type="text/css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
    <script src="jquery.flexslider.js"></script>
    <!-- Place in the <head>, after the three links -->
    <script type="text/javascript" charset="utf-8">
      $(window).load(function() {
        $('.flexslider').flexslider();
    </script>
    <!--
    To learn more about the conditional comments around the html tags at the top of the file:
    paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
    Do the following if you're using your customized build of modernizr (http://www.modernizr.com/):
    * insert the link to your js here
    * remove the link below to the html5shiv
    * add the "no-js" class to the html tags at the top
    * you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build
    -->
    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="respond.min.js"></script>
    </head>
    <body>
    <div class="gridContainer clearfix">
      <div id="LayoutDiv1"><img src="SJV-Images/Banners/Dark-green-curved-header.png"/></div>
      <div id="LayoutDiv2">
      <div class="flex-container">
      <div class="flexslider">
        <ul class="slides">
          <li>
            <img src="SJV-Images/Stud1.jpg"/>
          </li>
          <li>
            <img src="SJV-Images/Stud2.jpg" />
          </li>
          <li>
            <img src="SJV-Images/Stud3.jpg" />
          </li>
        </ul>
      </div>
    </div> </div>
      <div id="Nav">This is the content for Layout Div Tag "Nav"</div>
      <div id="Special_Features"><h3 align="center">SPECIAL FEATURES</h3>
      <ul>
      <li>
      It is one of the oldest school.</li>
      <li>It was first started as an orphanage for the children of British soldiers, and later moved to its current location.</li>
       <li>Rich in Anglo-Indian tradition dating back to three centuries.</li>
      <li>The campus now has separate buildings within the campus for year 1 to  year 8 (Junior and Sub Junior block) and year 9 to year 12 (Senior and   Super Senior block).</li>
      <li>The school has montessori facilities in a separate building.</li>
      <li>The School also has boarding facilities for students from distant places.</li>
      </ul></div>
      <div id="History"><img src="SJV-Images/His_Image.png" alt="Hisimage" class="floatleft">
      <h3>HISTORY OF OUR SCHOOL</h3><P>In 1750 – a very long time ago,a missionary and a teacher, Christian Frederick Schwartz came to India to work in the Danish Mission at Tranquebar.Due to his own personal charm, genius and integrity, soon he became a trusted envoy to the court of Princes ,both hostile and friendly. He even helped in the training and education of Serfogee Rajah, the adopted son of the Tanjore Raja Tuljagee.</P></div>
    <div id="Photo_Gall"><center>
        <strong>PHOTO GALLERY</strong>
    </center>
      <p><img src="SJV-Images/Photogall.png" width="174" height="70" class="floatright"/></p>
    </div>
      <div id="News_Events"><center>
        <strong>NEWS & EVENTS</strong>
      </center><center>Annual Day<br><center>
        Alumni Meet<br>
        Exam Time Table<br>Parents-Teacher's Meet</center>
      </center>
      <br></div>
      <div id="footer">This is the content for Layout Div Tag "footer"</div>
    </div>
    </body>
    </html>

  • How Can I Apply Color into my Datagrif

    I Have a Datagrid and the data provider is from database. the
    format is :
    [No] [JobID] [TargetTime]
    How can i apply a color into Datagrid if the TargetTime is
    Overdue, can you help me.

    May I suggest:  Layer - New Adjustment Layer - Black & White, then use the Tint facility.
    Personally, I often find it more handy (and providing more control) to use a Curves adjustment layer above all the others.  Grab the curves of individual color channels and pull them this way and that to alter the color of what's underneath.  It's not hard to keep whites white, blacks black, and give the stuff in between believable coloration.
    -Noel

  • How can i apply maxlength constraint on TextField Through JavaScript ?

    How can i apply maxlength constraint on TextField Through JavaScript ,
    when i am adding the row dynamically & adding the textfield dynamically into it . I can set its attributes like name, size, focus & else, But why its not setting maxlength attribute through javascript ?
    If any body is fammiliar with this problem Please answer the question.

    Hi Ashoka,
    here is the code to get the length of the test field. then you can set your own textfield restriction. I hope this what you are searching. or else you can set the max length of the text field in HTML tag itself it is very easy.
    HTML : <input name="textfield" type="text" maxlength="25">
    JAVASCRIPT:
    <html>
    <head>
    <title>mAX tEXT <title>
    <script>
    function maX()
         var data = document.form1.textfield.value
         len = data.length
         alert("Max Value "+len);
         return true;
    </script>
    </head>
    <body>
    <form name="form1" method="post" action="">
    <input name="textfield" type="text">
    <input type="button" name="but" onClick="return maX()">
    </form>
    </body>
    </html>

  • How Can i Apply my BBM Pin Code

    How Can i Apply my BBM Pin Code for my Blackberry z10, i am live in pakistan please help.

    Hi and Welcome to the Community!
    Sorry, but even with all of the years of experience I have with BB, I cannot understand what you are asking for. Can you try again please? Perhaps describe the exact steps you are attempting, and exactly what happens at each step.
    Thanks and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How can we apply OSS notes in BW or BI.

    Dear Friends , how are you all.
    Could anyone please tell the process about How can we apply OSS notes in BW or BI.
    What is the difference between LO extractors and FI extractors.
    It would be helpful to me.
    Thanks in Advance,
    Kalyan

    Hi,
    Using T Code SNOTE we can apply the OSS notes.
    Also
    OSS is Online support system runs by SAP to support the customers.
    You can access this by entering OSS1 transaction or visit Service.SAP.Com and access it by providing the user name and password.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/fe8dbb80-0c01-0010-fe84-b76d0d07db34
    SAP Notes
    IN BW T.Code SNOTE, here you can see all the notes which has been applied.. also u can apply a new note in this T.Code.
    http://service.sap.com/notes
    Whenever there is a short dump, in section 'How to correct the error' keywords are given so that you can search relevant OSS
    Notes.
    Best way is to search with the Note Number if you know one. Else, you can search with restriction by giving proper version,
    application area, priority, release status etc along with keywords.
    Thanks,
    JituK

  • How can I apply patch 6728000?

    I have to upgrade EBS to 12.0.6, so I have to apply the patch 6728000 which comes splitted in 4 files. How can I apply a patch that comes in this way?
    I have just applied patches that comes in 1 file.
    Thanks in advance
    Edited by: user626152 on 09-mar-2009 10:38

    Hi,
    You just need to download all the patch parts in one directory and extract it there. You should have one directory which contains all the patch files in one place (as any other patch).
    Make sure you follow all the steps in the following note when applying this patch.
    Note: 743368.1 - Oracle E-Business Suite Release Update Pack Readme, Release 12.0.6
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=743368.1
    Regards,
    Hussein

  • How can I apply overheads for expense nature items ?

    hi,
    would someone please suggest how can I apply overheads for expense nature items.
    I am unable to apply overheads from cost management SLA -> Cost Update.

    would somebody please help me...

Maybe you are looking for