Snow falling: pls help with actionscript

Hallo,
I made a flash movie with snow  falling from the sky in Flash 8 (actionscript 2.0)
However, the snow I made differs  from the original.
The original is here:
http://www.kirupa.com/developer/mx/snow.htm
I  put mine here:
http://toetssite.webs.com/
You  will notice that my snow only falls downward: there is no randomness  for the flakes to go left or right. there is no movement.
WHere  in the script below can I change that so that there's more movement for  the flakes? Thank you
I use  the following script for the snow itself:
onClipEvent (load) {
     //specifies the size of the movie stage
     movieWidth = 300;
     movieHeight = 200;
     //variables that will modify the falling snow
     i = 1+Math.random()*2;
     k = -Math.PI+Math.random()*Math.PI;
     //giving each snowflake unique characteristics
     this._xscale = this._yscale=50+Math.random()*100;
     this._alpha = 75+Math.random()*100;
     this._x = -10+Math.random()*movieWidth;
     this._y = -10+Math.random()*movieHeight;
onClipEvent (enterFrame) {
     //putting it all together
     rad += (k/180)*Math.PI;
     this._x -= Math.cos(rad);
     this._y += i;
     if (this._y>=movieHeight) {
         this._y = -5;
     if ((this._x>=movieWidth) || (this._x<=0)) {
         this._x = -10+Math.random()*movieWidth;
         this._y = -5;
and on the first frame of my movie I put the following:
for (k=0; k<50; k++) {
    duplicateMovieClip(this.snow,  "snow"+k, k);
Thank  you!

Just initialize the rad variable. I added following line to your code and it works fine.
     rad = 0; //line I inserted.
No other change required. It is advised to initialize all your variables before you use them.
Anyways, below I am providing the whole script for the snow after modification
onClipEvent (load) {
//specifies the size of the movie stage
movieWidth = 300;
movieHeight = 200;
rad = 0; //line I inserted.
//variables that will modify the falling snow
i = 1+Math.random()*2;
k = -Math.PI+Math.random()*Math.PI;
//giving each snowflake unique characteristics
this._xscale = this._yscale=50+Math.random()*100;
this._alpha = 75+Math.random()*100;
this._x = -10+Math.random()*movieWidth;
this._y = -10+Math.random()*movieHeight;
onClipEvent (enterFrame) {
//putting it all together
rad += (k/180)*Math.PI;
this._x -= Math.cos(rad);
this._y += i;
if (this._y>=movieHeight) {
this._y = -5;
if ((this._x>=movieWidth) || (this._x<=0)) {
this._x = -10+Math.random()*movieWidth;
this._y = -5;

Similar Messages

  • HT201299 HOW TO INSERT MICRO SIM IN I PAD MODEL- A1416? Pls help with a picture...

    HOW TO INSERT MICRO SIM IN I PAD MODEL- A1416? Pls help with a picture...

    My Ipad doesnt have the space to pin out the sim card tray...?
    I think i have been gifted the Ipad which doesnt support sim card. Is it so?
    My model no is- A1416....?

  • Pls Help with this

    Hi,
    I need a help to resolve my problem.Actually i have a JSP page with a list box. When i select some value in the list box, appropriate values must list out according to the selected value.And i have a submit button to process that jsp page.
    I wrote a validation as all the fields must be entered to submit a page.
    But when i tried with the following code,it's just moving to processing page when i select a values from the list box.This is happening when i cheked the validation.
    Pls help with this code.This is very urgent.
    Code is as follows
    "Example1.jsp"
    <%
    String str1 = request.getParameter("Modem");
    %>
    <html>
    <head>
    <script language = "JavaScript">
    function Validate()
    if(document.UpdateFiosAccounts.Modem.value == "Select One")
    alert("Please select the value")
    document.UpdateFiosAccounts.Modem.focus()
    return false
    if(document.UpdateFiosAccounts.text1.value == "")
    alert("Please type some text")
    document.UpdateFiosAccounts.text1.focus()
    return false
    return true
    </script>
    </head>
    <body>
    <form name = "UpdateFiosAccounts" action="./Example1.jsp" method ="post" onSubmit= "return Validate()">
    Pls select One:<select name="Modem" size="1" onChange="document.UpdateFiosAccounts.submit()">
    <%
    if(str1 == null)
    %>
         <option value="Select One">Select One</option>
         <option value="One">One</option>
         <option value="Two">Two</option>
         <option value="Three">Three</option>
         <option value="Four">Four</option>
    <%
    else
    %>
         <option value="<%=str1%>"><%=str1%></option>
    <%
    %>
    </select><br>
    Pls type something: <input type ="text" name="text1">
    <input type ="submit" value="submit" onClick="document.UpdateFiosAccounts.action='./Accounts.jsp'">
    </form>
    </body>
    </html>

    Hi! The reason is that in the onChange property you are doing the submit, so, when you select something, it goes automatically and never pases through your validation function. So, remove that onChange. Next, the button is a submit buton, so, no matter what your validation does, the page will go. You need to change the submit type of the button to just button (<input type="button" onclick="function to validate">) and then you will get what you want. By the way, this is NOT a Java question, is more JavaScript question.
    Hope this helps.

  • Pls help with a program

    I'm making a quiz, and i store the questions in a textfile. The user can choose from 3 quizes, either Plate Tectonics, Rivers or Rocks. I managed to call the questions from Java. Each quiz has a set of 10 questions. In the code below i only included the answers to the Plate Tectonics Quiz, which i stored in an array. What i'm having problem with is, that its not working correctly, since it is displaying, after answering all the questions correctly that i have answered 0 questions from 1 question. First of all it should say out of 10 questions because i have 10 questions, and its not really working because even if i answer them all corrctly it still says 0 out of 1 question. Can someone pls help me find the error? Thanks a lot.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.io.*;
    import java.util.Scanner;
    import java.util.Arrays;
    public class GeographyQuiz extends JFrame implements ActionListener {
      private static final int FRAME_WIDTH = 140;
      private static final int FRAME_HEIGHT = 160;
      private static final int FRAME_X_ORIGIN = 70;
      private static final int FRAME_Y_ORIGIN = 50;
       AnswerStore answerStore = new AnswerStore();
      public static void main (String[] args) {
        JFrame jFrame;
        jFrame = new JFrame();
        JOptionPane.showMessageDialog(jFrame, "This is a Geography Quiz");
        JOptionPane.showMessageDialog(null, "Good Luck");
        char choice;
        int i, choice1, Password;
        String yourChoice, passString;
        passString = JOptionPane.showInputDialog("Enter the Password");
        //Password = passString.nextInt();
        Password = Integer.parseInt(passString);
        if (Password == 123) {
         JOptionPane.showMessageDialog(null, "Valid. You typed the right password. Now choose from the following menu");
         GeographyQuiz frame = new GeographyQuiz();
          frame.setVisible(true);
        } else {
          JOptionPane.showMessageDialog(null, "Invalid Password. Try Again");
      public GeographyQuiz() {
        Container contentPane;
        JButton button1, button2, button3, button4, button5;
        setSize (FRAME_WIDTH, FRAME_HEIGHT);
        setTitle("Geography Quiz");
        setLocation(FRAME_X_ORIGIN, FRAME_Y_ORIGIN);
        contentPane = getContentPane();
        contentPane.setBackground(Color.pink);
        contentPane.setLayout(new FlowLayout());
        button1 = new JButton("Plate Tectonics");
        button2 = new JButton("Rivers");
        button3 = new JButton("Rocks");
        button4 = new JButton("Quit");
        contentPane.add(button1);
        contentPane.add(button2);
        contentPane.add(button3);
        contentPane.add(button4);
        button1.addActionListener(this);
        button1.setActionCommand("b1");
        button2.addActionListener(this);
        button2.setActionCommand("b2");
        button3.addActionListener(this);
        button3.setActionCommand("b3");
        button4.addActionListener(this);
        button4.setActionCommand("b4");
        setDefaultCloseOperation(EXIT_ON_CLOSE);
       public void actionPerformed(ActionEvent e) {
    String ac = e.getActionCommand();
            String[] questions = null;
             try {
            if (ac.equals("b1")) {
                questions = readFile("plate_tectonics.txt");
            } else if(ac.equals("b2")) {
                questions = readFile("rivers.txt");
            } else if(ac.equals("b3")) {
                questions = readFile("rocks.txt");
            } else if (ac.equals("b4")) {
                System.exit(0);
            askQuestions(questions);
         catch (java.io.FileNotFoundException f)
            JOptionPane.showMessageDialog(null, "File not found.");
        private String[] readFile(String path)throws FileNotFoundException {
            Scanner s = null;
            StringBuilder sb = new StringBuilder();
            String separator = "\n";
            try {
                s = new Scanner(new BufferedReader(new FileReader(path)));
                s.useDelimiter(",\\s*");
                while (s.hasNext()) {
                   JOptionPane.showInputDialog(null,s.nextLine());
            finally {
                if (s != null)
                    s.close();
            return sb.toString().split("\\s");
        private void askQuestions(String[] questions) {
            int count = 0;
            for(int j = 10; j < questions.length; j++) {
                 String input = JOptionPane.showInputDialog(null, questions[j]);
                 // Use reference to AnswerStore instance to access data in it.
                 if(answerStore.answer[j].equals(input))
                 count++;
            JOptionPane.showMessageDialog(null, "You answered " + count +
                                          " out of " + questions.length +
                                          " questions correctly.");
    class AnswerStore  {
    String[] answer = {
            "Hellenic", "constructive", "100km", "Italy", "Wegner",
            "constructive", "100km", "Italy", "destroyed", "Meditteranean"
    }Edited by: saytri on Dec 23, 2007 2:07 AM
    Edited by: saytri on Dec 23, 2007 2:29 AM

    stripped to bare bones, it works OK for me
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class GeographyQuiz extends JFrame implements ActionListener {
      AnswerStore answerStore = new AnswerStore();
      public static void main (String[] args) {
        JOptionPane.showMessageDialog(null, "This is a Geography Quiz\n\nGood Luck");
        char choice;
        int i, choice1, Password;
        String yourChoice;
        GeographyQuiz frame = new GeographyQuiz();
        frame.setVisible(true);
      public GeographyQuiz() {
        Container contentPane;
        JButton button1;
        setSize (140, 160);
        setTitle("Geography Quiz");
        setLocationRelativeTo(null);
        contentPane = getContentPane();
        contentPane.setBackground(Color.pink);
        contentPane.setLayout(new FlowLayout());
        button1 = new JButton("Plate Tectonics");
        contentPane.add(button1);
        button1.addActionListener(this);
        button1.setActionCommand("b1");
        setDefaultCloseOperation(EXIT_ON_CLOSE);
      public void actionPerformed(ActionEvent e) {
        String ac = e.getActionCommand();
        String[] questions = null;
        if (ac.equals("b1")) {
          questions = new String[]{"what is 1+1","what is 2+2"};
          askQuestions(questions);
      private void askQuestions(String[] questions) {
          int count = 0;
          for(int j = 0; j < questions.length; j++) {
            String input = JOptionPane.showInputDialog(null, questions[j]);
            if(answerStore.answer[j].equals(input)) count++;
          JOptionPane.showMessageDialog(null, "You answered " + count +
                                        " out of " + questions.length +
                                        " questions correctly.");
    class AnswerStore  {
    String[] answer = {"2", "4"};
    }either the problem is in the file, or the posted code is not what you're using

  • Pls help with extracting dates

    I wish to produce the output in table customer1 based on the customer table DOP field.
    The values in DOP (0030500) indicates wed and fri, (0000007) indicates sunday.
    how can i extract all the dates for wed and fri (0030500) between the period ST_DT and ED_DT (23/02/2005) to (20/03/2005).
    SQL> select * from customer;
    CUSTOMER_ID ST_DT ED_DT DOP
    429100 23/02/2005 20/03/2005 0030500
    428950 14/03/2005 02/04/2005 0000007
    SQL> select * from customer1;
    CUSTOMER_ID ST_DT ED_DT DOP DT
    429100 23/02/2005 20/03/2005 0030500 23/02/2005
    429100 23/02/2005 20/03/2005 0030500 25/02/2005
    429100 23/02/2005 20/03/2005 0030500 02/03/2005
    429100 23/02/2005 20/03/2005 0030500 04/03/2005
    429100 23/02/2005 20/03/2005 0030500 09/03/2005
    429100 23/02/2005 20/03/2005 0030500 11/03/2005
    429100 23/02/2005 20/03/2005 0030500 16/03/2005
    429100 23/02/2005 20/03/2005 0030500 18/03/2005
    428950 14/03/2005 02/04/2005 0000007 20/03/2005
    428950 14/03/2005 02/04/2005 0000007 27/03/2005
    pls help, thanks.

    SQL> select * from customer;
    CUSTOMER_ID ST_DT     END_DT    DOP
         429100 23-FEB-05 20-MAR-05 0030500
         428950 14-MAR-05 02-APR-05 0000007
    SQL> select a.customer_id,a.st_dt,a.end_dt,a.dop,a.st_dt+b.tita
      2  from customer a,(select rownum-1 tita from user_objects) b
      3  where a.st_dt+b.tita <= a.end_dt
      4  and instr(a.dop,decode(to_char(a.st_dt+b.tita,'d')-1,0,7,to_char(a.st_dt+b.tita,'d')-1))>0
      5  order by a.customer_id,a.st_dt+b.tita;
    CUSTOMER_ID ST_DT     END_DT    DOP     A.ST_DT+B
         428950 14-MAR-05 02-APR-05 0000007 20-MAR-05
         428950 14-MAR-05 02-APR-05 0000007 27-MAR-05
         429100 23-FEB-05 20-MAR-05 0030500 23-FEB-05
         429100 23-FEB-05 20-MAR-05 0030500 25-FEB-05
         429100 23-FEB-05 20-MAR-05 0030500 02-MAR-05
         429100 23-FEB-05 20-MAR-05 0030500 04-MAR-05
         429100 23-FEB-05 20-MAR-05 0030500 09-MAR-05
         429100 23-FEB-05 20-MAR-05 0030500 11-MAR-05
         429100 23-FEB-05 20-MAR-05 0030500 16-MAR-05
         429100 23-FEB-05 20-MAR-05 0030500 18-MAR-05
    10 rows selected.
    SQL> Assuming the date range does not exceed the number of user objects :-)

  • Pls view SWF and help with Actionscript

    I am trying to get my thumbnails (Which are individual
    buttons) to show in the box to the right when you click on them but
    I don't know the code to put on the buttons to make that happen.
    Can someone please help me.
    http://www.geocities.com/demetriusmcclain/

    there are weekend course offered from time to time i large
    cities. but i think it would be less expensive to look at your
    local community college(s) and see if they have anything offered.
    you could search google for actionscript classes.
    i looked at your project and i really don't see an easy way
    to accomplish what you want. there are reasons i say that but all
    of them are solvable but one.
    the one that can't be resolved is that you cannot change the
    parentage of a duplicated movieclip.
    so, each of your elephant thumbnail duplications, for
    example, is going to be a child of panel. and panel is masked. so,
    all your duplicated elephants are going to be masked and therefore
    cannot be positioned over your canvas and still be visible. there
    is not work-around with your current set-up.
    the only way i can see to resolve the issue is to assign a
    linkage id to each of your panel buttons, use shared library assets
    and attach the corresponding button to the _level0 swf.

  • Need Help with ACTIONSCRIPT for Interactive Music Video

    I am trying to create an interactive music video in After Effects and Flash.
    The concept is that while the music video is taking place the user can  decorate the hair of the woman with any of the objects they select.   There will be predetermined animations and destination spots but the  user can choose whatever objects they select to be delivered to the  predetermined spot.  I need to figure out how to let the user to select  an object that will become part of the animation.  I created a PDF  Roughly explaining what I am trying to do.  If anyone can help me I'd be  very grateful as I am more versed in After Effects, I don't know  ActionScript well enough to execute what I am trying to do.
    Below is a rough example of what I am trying to do.  There will be a music video of an animated woman singing.  As she is singing the user will be able to click any of the objects , below the numbers 1-10.  Below it is illustrated that the user wants to press the blue number 2.  If the user presses the 2 the 2 will animate in the mouth of a bird to a predetermined pre-animated spot.  I assume I need to send a movieclip to a blank  holder on the timeline and use a gotoAndPlay() action ???  I am not well versed in ActionScript so any advice would help
    Now whatever number (movieclip) the user chooses next needs to be placed in another blank spot in the timeline? Below the user selcts the Pink 5.
    If the user just wanted to Place two "Blue 2's" then the "Blue 2's" would follow the same animated path and end up at the same predetermined space.
    If the user selected just 5's and 7's they would go to the predetermined preanimated paths
    How would I go about writing the Actionscript for this?

    Look, I hope you don't have false expectation that by knowing one piece of AS capabilities you will be able to accomplish your task.
    If I say that the code for placing one MovieClip into another is:
    clip1.addChild(clip2);
    will it make any difference in terms of implementation?
    Also, you say "select." This may mean a lot of thing: click, drag and drop, mouse down, etc. I am saying that implementation tightly depends of definitions that you give.
    I don't know the extend of your AS skills, so it is not easy to figure where to start helping. Also, forum, perhaps, is not the medium where someone will write a lot of code for you. It is good for getting answers to very specific questions and solutions. This is when you have some code in place already.
    What I would suggest is to start developing a very rough concept - no video, no birds, no numbers - just a static background image of the person you have in your first post. If you advance to an application that will allow user to select a square, place the square into another one - it will be a good start.

  • Need help with actionscript for media controller

    I seem to be having a slight problem. I've been looking
    around and everything I see is for .flv playback. Anyways, here's
    my problem.
    Client wants a video that's interactive. When a transition
    occurs a simple tex button shows up which links to certain web
    pages. Deploying this as a .swf would be no problem, but they want
    a controlbar with it so a user can scrub back and forth in the
    video. So the best way to do this would be progressive or
    streaming.
    I created a source file that utilizes the "loader component"
    and inserted the "media controller component". I'm not very good
    when it comes to actionscript and can't seem to find the proper
    script which utilizes the media controller so the user can scrub
    back and forth. Everything else seems to work fine with the loader
    as it loads an external .swf file.
    Just need to get the controller working properly. Total
    frames of the swf is a little over 3,000 and dividing the total
    frames by 30 was 107.7 seconds. So I round that to 108 seconds. The
    online docs seem to be fragmented and not always consistant
    especially when i'm not using the flvplayback or display.
    Does anybody know the actionscript for this? Or where I can
    find the information on this? I've associated the loader with the
    controller and vice versa in the behaviors panel as well if that's
    any help. Any help is much appreciated thanks.

    Look, I hope you don't have false expectation that by knowing one piece of AS capabilities you will be able to accomplish your task.
    If I say that the code for placing one MovieClip into another is:
    clip1.addChild(clip2);
    will it make any difference in terms of implementation?
    Also, you say "select." This may mean a lot of thing: click, drag and drop, mouse down, etc. I am saying that implementation tightly depends of definitions that you give.
    I don't know the extend of your AS skills, so it is not easy to figure where to start helping. Also, forum, perhaps, is not the medium where someone will write a lot of code for you. It is good for getting answers to very specific questions and solutions. This is when you have some code in place already.
    What I would suggest is to start developing a very rough concept - no video, no birds, no numbers - just a static background image of the person you have in your first post. If you advance to an application that will allow user to select a square, place the square into another one - it will be a good start.

  • Pls. help with JMS monitor

    I need all the help I can get from each of you.
    I have to implement a GUI for system admin to interact with JMS activities and I have no clues what kind of activities I should display on the GUI in term of JMS. Pls. advice if you have done something like/similar to this or have some ideas.
    Thanks in advance!

    Check out Hermes JMS Explorer (http://hermesjms.sourceforge.net) - it can do just about all you can do without actually using server libraries and hooking into preexisting JMS server code.
    It allows you to browse JMS destinations (queues, topics) as well as monitor, consume and produce (put) messages.
    Hope this helps,
    -Scott

  • Help with ActionScript/PHP email form

    Hey guys, hope someone can help me out with this!
    Haven't programmed in a while, but a friend asked me to look
    at this and figure out why it isn't working. It's a simple form,
    with the text boxes labeled inTxt_1, inTxt_2 ..... inTxt_13.
    The ActionScript looks like this ...
    Code:
    submit.onRelease = function () {
    var loadv = new LoadVars();
    loadv._level0.mc1.inTxt_1 = _level0.mc1.inTxt_1.text;
    loadv._level0.mc1.inTxt_2 = _level0.mc1.inTxt_2.text;
    loadv._level0.mc1.inTxt_3 = _level0.mc1.inTxt_3.text;
    loadv._level0.mc1.inTxt_4 = _level0.mc1.inTxt_4.text;
    loadv._level0.mc1.inTxt_5 = _level0.mc1.inTxt_5.text;
    loadv._level0.mc1.inTxt_6 = _level0.mc1.inTxt_6.text;
    loadv._level0.mc1.inTxt_7 = _level0.mc1.inTxt_7.text;
    loadv._level0.mc1.inTxt_8 = _level0.mc1.inTxt_8.text;
    loadv._level0.mc1.inTxt_9 = _level0.mc1.inTxt_9.text;
    loadv._level0.mc1.inTxt_10 = _level0.mc1.inTxt_10.text;
    loadv._level0.mc1.inTxt_11 = _level0.mc1.inTxt_11.text;
    loadv.send("email.php",loadv,"POST");
    (Quick question ... why is the _level0.mc1 part needed? Or is
    it even required?)
    Here's the PHP ...
    Code:
    <?php
    $To = "[email protected]";
    $subject = "site reply";
    $Name = $_POST["inTxt_1"];
    $Email = $_POST["inTxt_2"];
    $Company = $_POST["inTxt_3"];
    $Position = $_POST["inTxt_4"];
    $Address = $_POST["inTxt_5"];
    $Address1 = $_POST["inTxt_6"];
    $Address2 = $_POST["inTxt_7"];
    $ZipCode = $_POST["inTxt_8"];
    $Country = $_POST["inTxt_9"];
    $Tel = $_POST["inTxt_10"];
    $Enquiry = $_POST["enquiry"];
    $Comments = $_POST["inTxt_11"];
    \$headers = "From: " . $_POST["inTxt_1"]. "<" .
    $_POST["inTxt_2"] .">\r\n";
    $headers .= "Reply-To: " . $_POST["inTxt_2"] . "\r\n";
    $headers .= "Return-path: " . $_POST["inTxt_2"];
    $message = "Name: $Name\n";
    $message .= "Position: $Position\n";
    $message .= "Company: $Company\n";
    $message .= "Email: $Email\n";
    $message .= "Address: $Address\n";
    $message .= "Address1: $Address1\n";
    $message .= "Address2: $Address2\n";
    $message .= "Zip Code: $ZipCode\n";
    $message .= "Country: $Country\n";
    $message .= "Enquiry: $Enquiry\n";
    $message .= "Phone: $Tel\n";
    $message .= "Comments: $Comments\n";
    mail($To, $subject, $message, $headers);
    Print "Your mail has been sent";
    ?>
    (Another question - why does the one $headers line have a /
    infront of it? Should it be there?)
    Now when I submit it, "Your mail has been sent" appears on
    the screen, but I don't receive an e-mail. Can anyone help me??
    Thanks so much!!
    ~Ganj

    all those loadv._level0.mc1.whatever variables are incorrect.
    they should be:

  • Pls Help with a query

    Problem Scope:
    Two tables with different set of columns,
    Only common column being "emplid"--employee id.
    table1 has 2 columns "emplid" and "effdt"- effective date.
    table2 has 3 columns "emplid", "start date" and "end date".
    So structure of the tables will be:
    1. table1: emplid, effdt
    2. table2: emplid, start_date, end_date
    Need to find out all the records from table2, where
    "table2.start_date" falls between 2 "table1.effdt" rows for the same employee.
    For example for an emplid "G1234",
    table 1 data: emplid, effdt
    G1234, 01/01/1990
    G1234, 01/01/1994
    table 2 data: emplid, start date
    G1234, 01/01/1993
    G1234, 01/01/2001
    For the above scenario, query should return the row: G1234, 01/01/1993 from table 2 as it(start date) falls between two effdt from table 1.
    Pls advice,
    Thanks

    Seems to be my day for LAG and LEAD.
    Does this work for you?
    SQL> SELECT * FROM t1;
         EMPID EFF_DT
          1234 01-jan-1990
          1234 01-jan-1994
    SQL> SELECT * FROM t2;
         EMPID START_DT    END_DT
          1234 01-jan-1993 31-dec-2000
          1234 01-jan-2001
    SQL> SELECT t2.empid, t2.start_dt, t2.end_dt
      2  FROM t2,
      3       (SELECT empid, eff_dt,
      4               LEAD(eff_dt) OVER (PARTITION BY empid
      5                                  ORDER BY eff_dt) next_eff
      6        FROM t1) t1
      7  WHERE t2.empid = t1.empid and
      8        t2.start_dt BETWEEN t1.eff_dt and t1.next_eff;
         EMPID START_DT    END_DT
          1234 01-jan-1993 31-dec-2000John

  • Help with ActionScript 2.0 and XML

    Here  I am trying  to use actionscript to load my content with is an XML file with html formatting. I have the actionscript on only 1 Scene  and i have links that switch between scences. The problem(s) is(are) that when I click the link  for the scene that has the actionscipt all it says is "null" where it should have the text i want to display from the XML file. Here is the code for the AS and XML:
    xml = new XML();
    xml.ignoreWhite = true;
    xml.load("contenido.xml");
    xml.onLoad = function () {
        txt = createTextField("txt",getNextHighestDepth(), 30, 300, 300, 100);
        txt.html = true;
        txt.htmlText = xml.firstChild.nodeValue;
    <?xml version="1.0" encoding="UTF-8"?>
    <htmlData><![CDATA[   Here is my <br/> html text   ]]></htmlData>
    any help is greatly appreciated

    Try...
    xml.onLoad = function () {
         txt = createTextField("txt",getNextHighestDepth(), 30, 300, 300, 100);
         txt.multiline = true;
         txt.html = true;
         txt.htmlText = xml.firstChild.childNodes[0].nodeValue;

  • Can you pls help with theis OIM issue

    1. How can I assign as APPROVER dynamically without using the OIM defaul approval process. Is there any way to use custom process?
    Any Code/Help will be hioghly appreciated.

    There are two ways you can do this (actually three if you want to use process determination rules and route the object to a completely different approval process - those are developed in the role designer and placed in the "process determination rules" tab on the Resource Object).
    The easiest way to do it is to build a couple of task assignment rules (also in the rule designer). Assuming you want to use some value in the object form to determine which approver is assigned, you just make sure you build the rule with the type = Task Assignment, subtype = user provisioning and the object and process fields filled in (process should be the approval process). Then you will be able to build a role using the object form data.
    example: Object form field A == "value A".
    Build as many of these as you need and place them in the task assignment tab of the approval task, selecting the proper approver for each rule.
    Note that you can also write the rule to route based on user data, only be aware that some versions of oim (actually all that I have tried, but it may be fixed in 9.1, not sure) will not process this correctly if there is a request submitted for multiple users. Rather than route each correctly it will assign all of them to approver determined for the last user submitted (this also holds true if you are assigning to user's manager). Oracle added an option in 9.0.3.1.6 to restrict requests to one user to get around this issue.
    The other alternative is to write a task assignment adapter in the adapter factory. I've done this in cases where I need to lookup the approver in an external data source. Write the adapter to take in any user or object form data it needs to make the assignment. These adapters return two parameters (which do not need to be mapped in the task assignment tab where you map the input parameters). One return value is a string containing the Target Type ("User", "Group", etc) and the other containing either the user key or group key the approval is being routed to.
    Note that for some reason you cannot just set the target type string in the adapter with a "Set Variable" adapter task, you actually have to call java code that returns the string you want to set this to.

  • Pls Help with date format picture ends ......error

    Hi Everyone,
       I am getting the following error when I run my crystal report.
    Failed to retrieve data from the database.
    Details: HY000:[DataDirect][ODBC Oracle driver][Oracle]ORA-01830: date format picture ends before converting entire input string
    [Database Vendor Code: 1830]
       I am using SQL Command for my report and in the command  my date fields are of "Date" datatype.
       I am using Crystal Reports XI R2,driver - CR Oracle ODBC Driver 5.1
       Any help is greatly appreciated.
    Thanks in advance
    My SQL Command is as follows:
    <
    with MAXNEWSTAT as
    (select
    /--Added by HAN--/
    HRHISTORY.COMPANY,
    HRHISTORY.EMPLOYEE,
    MAX(HRHISTORY.ACT_OBJ_ID) ACT_OBJ_ID
    FROM
    LAWSON.HRHISTORY
    WHERE
    HRHISTORY.FLD_NBR=20
    and TO_DATE(HRHISTORY.DATE_STAMP)
        >= TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,-1)),'YYYY/MM')||'/01'),'YYYY/MM/DD') 
        AND  TO_DATE(HRHISTORY.DATE_STAMP) <= (TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,0)),'YYYY/MM')||'/01'),'YYYY/MM/DD'))-1
    /--Added by HAN--/
        GROUP BY COMPANY,
        EMPLOYEE),
    NEWSTAT AS
    (SELECT
    /--Added by HAN--/
    HRHISTORY.COMPANY,
    HRHISTORY.EMPLOYEE,
    HRHISTORY.A_VALUE,
    HRHISTORY.DATE_STAMP,
    HRHISTORY.BEG_DATE,
    HRHISTORY.ACT_OBJ_ID NS_OBJ_ID,
    HRHISTORY.SEQ_NBR
    FROM
    LAWSON.HRHISTORY
    INNER JOIN LAWSON.MAXNEWSTAT
    ON
    /--Added by HAN--/
    HRHISTORY.COMPANY = MAXNEWSTAT.COMPANY
    /--Added by KAM--/
    AND HRHISTORY.EMPLOYEE = MAXNEWSTAT.EMPLOYEE
    AND HRHISTORY.ACT_OBJ_ID = MAXNEWSTAT.ACT_OBJ_ID
    WHERE
    HRHISTORY.FLD_NBR=20
    and TO_DATE(HRHISTORY.DATE_STAMP)
        >= TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,-1)),'YYYY/MM')||'/01'),'YYYY/MM/DD') 
        AND  TO_DATE(HRHISTORY.DATE_STAMP) <= (TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,0)),'YYYY/MM')||'/01'),'YYYY/MM/DD'))-1
    PREVSTATID AS
    (SELECT
    /--Added by HAN--/
    HRHISTORY.COMPANY,
    HRHISTORY.EMPLOYEE,
    MAX(HRHISTORY.ACT_OBJ_ID)OBJ_ID
    FROM
    LAWSON.HRHISTORY
        INNER JOIN LAWSON.NEWSTAT
    /--Added by HAN--/
        ON HRHISTORY.COMPANY = NEWSTAT.COMPANY
        AND HRHISTORY.EMPLOYEE = NEWSTAT.EMPLOYEE
    WHERE
    HRHISTORY.FLD_NBR=20
    AND TO_DATE(HRHISTORY.BEG_DATE)
    < to_date(NEWSTAT.BEG_DATE)
    GROUP BY
    /--Added by HAN--/
    HRHISTORY.COMPANY,
    HRHISTORY.EMPLOYEE
    PREVSTAT AS
    (SELECT
    /--Added by HAN--/
    HRHISTORY.COMPANY,
    HRHISTORY.EMPLOYEE,
    HRHISTORY.A_VALUE A_VALUE,
    HRHISTORY.DATE_STAMP DATE_STAMP,
    HRHISTORY.BEG_DATE BEG_DATE,
    HRHISTORY.ACT_OBJ_ID OBJ_ID,
    HRHISTORY.SEQ_NBR SEQ_NBR
    FROM
    LAWSON.HRHISTORY
        INNER JOIN LAWSON.PREVSTATID
    /--Added by HAN--/
        ON HRHISTORY.COMPANY = PREVSTATID.COMPANY
        AND HRHISTORY.EMPLOYEE = PREVSTATID.EMPLOYEE
    WHERE
    HRHISTORY.FLD_NBR=20 AND
    HRHISTORY.ACT_OBJ_ID = PREVSTATID.OBJ_ID
    MAXPERSACTHST AS
    (SELECT
    PERSACTHST.EMPLOYEE,
    /--Added by KAM--/
    PERSACTHST.COMPANY,
    MAX(PERSACTHST.DATE_STAMP)DATE_STAMP
    FROM
    LAWSON.PERSACTHST
    WHERE
    (PERSACTHST.ACTION_CODE='LOASTATUS' OR PERSACTHST.ACTION_CODE='STATUS')
    AND TO_DATE(PERSACTHST.DATE_STAMP)
        >= TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,-1)),'YYYY/MM')||'/01'),'YYYY/MM/DD') 
        AND  TO_DATE(PERSACTHST.DATE_STAMP) <= (TO_DATE((TO_CHAR((ADD_MONTHS(SYSDATE,0)),'YYYY/MM')||'/01'),'YYYY/MM/DD'))-1
    GROUP BY PERSACTHST.EMPLOYEE,
    /--Added by KAM--/
    PERSACTHST.COMPANY
    CHANGELIST AS   
    (SELECT
    PERSACTHST.EMPLOYEE,
    /--Added by KAM--/
    PERSACTHST.COMPANY,
    PERSACTHST.ACTION_CODE,
    PERSACTHST.REASON_01,
    PERSACTHST.DATE_STAMP,
    PERSACTHST.EFFECT_DATE,
    PERSACTHST.REASON_02,
    PREVSTAT.A_VALUE PS_A_VALUE,
    PREVSTAT.DATE_STAMP PS_HR_DATE_STAMP,
    PREVSTAT.BEG_DATE PS_HR_BEG_DATE,
    PREVSTAT.OBJ_ID PS_HR_OBJ_ID,
    PREVSTAT.SEQ_NBR PS_HR_SEQ_ID,
    NEWSTAT.A_VALUE NS_A_VALUE,
    NEWSTAT.DATE_STAMP NS_DATE_STAMP,
    NEWSTAT.BEG_DATE NS_BEG_DATE,
    NEWSTAT.NS_OBJ_ID,
    NEWSTAT.SEQ_NBR NS_SEQ_NBR
    FROM
    LAWSON.PERSACTHST PERSACTHST
                        INNER JOIN LAWSON.PREVSTAT
                       ON PERSACTHST.EMPLOYEE=PREVSTAT.EMPLOYEE
                       /--Added by KAM--/
                       AND PERSACTHST.COMPANY = PREVSTAT.COMPANY
                       INNER JOIN LAWSON.NEWSTAT
                       ON PERSACTHST.EMPLOYEE = NEWSTAT.EMPLOYEE
                      /--Added by KAM--/
                       AND PERSACTHST.COMPANY = NEWSTAT.COMPANY
                       INNER JOIN LAWSON.MAXPERSACTHST
                       ON PERSACTHST.EMPLOYEE = MAXPERSACTHST.EMPLOYEE
                      /--Added by KAM--/
                         AND PERSACTHST.COMPANY = MAXPERSACTHST.COMPANY
    WHERE
    (PERSACTHST.ACTION_CODE='LOASTATUS' OR PERSACTHST.ACTION_CODE='STATUS')
    AND NEWSTAT.A_VALUE <> PREVSTAT.A_VALUE
    AND MAXPERSACTHST.DATE_STAMP = PERSACTHST.DATE_STAMP
    PAEMPPOSENDDATE AS
    (SELECT
      PAEMPPOS.EMPLOYEE,
      PAEMPPOS.COMPANY,
      CASE
      WHEN PAEMPPOS.END_DATE = TO_DATE('1700,01,01','YYYY,MM,DD')
             THEN to_date(SYSDATE + 1,'YYYY,MM,DD')
           ELSE PAEMPPOS.END_DATE 
      END END_DATE,
      PAEMPPOS.EFFECT_DATE
      FROM LAWSON.PAEMPPOS),
    CURRFTE AS
    (SELECT
      PAEMPPOS.EMPLOYEE,
    /--Added by KAM--/
      PAEMPPOS.COMPANY,
      PAEMPPOS.FTE CURR_FTE,
      PAEMPPOS.EFFECT_DATE,
      PAEMPPOSENDDATE.END_DATE  
    FROM
    LAWSON.PAEMPPOS
    INNER JOIN LAWSON.NEWSTAT
    ON (PAEMPPOS.EMPLOYEE = NEWSTAT.EMPLOYEE)
    /--Added by KAM--/
    AND (PAEMPPOS.COMPANY = NEWSTAT.COMPANY)
    INNER JOIN LAWSON.PAEMPPOSENDDATE
    ON PAEMPPOS.EMPLOYEE = PAEMPPOSENDDATE.EMPLOYEE
    /--Added by KAM--/
    AND PAEMPPOS.COMPANY = PAEMPPOSENDDATE.COMPANY
    AND PAEMPPOS.EFFECT_DATE=PAEMPPOSENDDATE.EFFECT_DATE
    WHERE
      (PAEMPPOSENDDATE.EFFECT_DATE <= NEWSTAT.BEG_DATE AND PAEMPPOSENDDATE.END_DATE >= NEWSTAT.BEG_DATE)
    PREVFTE AS
    (SELECT
      PAEMPPOS.EMPLOYEE,
    /--Added by KAM--/
      PAEMPPOS.COMPANY,
      PAEMPPOS.FTE PREV_FTE,
    PAEMPPOSENDDATE.END_DATE 
    FROM
    LAWSON.PAEMPPOS
    INNER JOIN LAWSON.NEWSTAT
    ON (PAEMPPOS.EMPLOYEE = NEWSTAT.EMPLOYEE)
    /--Added by KAM--/
    AND (PAEMPPOS.COMPANY = NEWSTAT.EMPLOYEE)
    INNER JOIN LAWSON.PAEMPPOSENDDATE
    ON (PAEMPPOS.EMPLOYEE = PAEMPPOSENDDATE.EMPLOYEE)
    /--Added by KAM--/
    AND (PAEMPPOS.COMPANY = PAEMPPOSENDDATE.COMPANY)
    AND (PAEMPPOS.EFFECT_DATE = PAEMPPOSENDDATE.EFFECT_DATE)
    WHERE
      PAEMPPOS.EFFECT_DATE <= (NEWSTAT.BEG_DATE-1)AND  PAEMPPOSENDDATE.END_DATE >= (NEWSTAT.BEG_DATE -1)
    SELECT DISTINCT
    EMPLOYEE.EMPLOYEE,
    EMPLOYEE.DEPARTMENT,
    EMPLOYEE.PROCESS_LEVEL,
    EMPLOYEE.EMP_STATUS,
    EMPLOYEE.FIRST_NAME,
    EMPLOYEE.LAST_NAME,
    EMPLOYEE.MIDDLE_INIT,
    EMPLOYEE.POSITION,
    PAPOSITION.DESCRIPTION,
    CHANGELIST.PS_A_VALUE,
    /--Added by KAM--/
    CHANGELIST.COMPANY,
    CHANGELIST.PS_HR_DATE_STAMP,
    CHANGELIST.PS_HR_BEG_DATE,
    CHANGELIST.PS_HR_OBJ_ID,
    CHANGELIST.NS_A_VALUE,
    CHANGELIST.NS_DATE_STAMP,
    CHANGELIST.NS_OBJ_ID,
    CHANGELIST.ACTION_CODE,
    CHANGELIST.REASON_01,
    CHANGELIST.REASON_02,
    CHANGELIST.DATE_STAMP PERSACTSDATESTAMP,
    CHANGELIST.EFFECT_DATE PERSACTEFFDATE,
    DEPTCODE.R_NAME DEPTNAME,
    PRSYSTEM.R_NAME PLNAME,
    PREVFTE.PREV_FTE,
    CURRFTE.CURR_FTE,
    CHANGELIST.NS_BEG_DATE,
    PGSELECT.GROUP_NAME,
    PAEMPLOYEE.SENIOR_DATE
    FROM
    LAWSON.CHANGELIST
                      INNER JOIN LAWSON.EMPLOYEE
                     ON (EMPLOYEE.EMPLOYEE = CHANGELIST.EMPLOYEE)
    /--Added by KAM--/
                     AND (EMPLOYEE.COMPANY = CHANGELIST.COMPANY)
                     INNER JOIN LAWSON.DEPTCODE
                     ON ((EMPLOYEE.COMPANY=DEPTCODE.COMPANY)
                     AND (EMPLOYEE.PROCESS_LEVEL=DEPTCODE.PROCESS_LEVEL)
                     AND (EMPLOYEE.DEPARTMENT=DEPTCODE.DEPARTMENT))
                     INNER JOIN LAWSON.PRSYSTEM
                     ON ((EMPLOYEE.COMPANY=PRSYSTEM.COMPANY)
                     AND(EMPLOYEE.PROCESS_LEVEL=PRSYSTEM.PROCESS_LEVEL))
                     LEFT OUTER JOIN LAWSON.PREVFTE
                       ON (CHANGELIST.EMPLOYEE=PREVFTE.EMPLOYEE)
    /--Added by KAM--/                
                     AND (CHANGELIST.COMPANY=PREVFTE.COMPANY)
                     LEFT OUTER JOIN LAWSON.CURRFTE
                     ON (CHANGELIST.EMPLOYEE=CURRFTE.EMPLOYEE)
    /--Added by KAM--/                                
                     AND (CHANGELIST.COMPANY=CURRFTE.COMPANY)
                     INNER JOIN LAWSON.PGSELECT PGSELECT
                       ON ((EMPLOYEE.COMPANY=PGSELECT.COMPANY)
                     AND (EMPLOYEE.EMP_STATUS=PGSELECT.BEGIN_VALUE))
                     LEFT OUTER JOIN LAWSON.PAPOSITION
                     ON (EMPLOYEE.POSITION=PAPOSITION.POSITION)
                     AND (EMPLOYEE.COMPANY=PAPOSITION.COMPANY)
                     INNER JOIN LAWSON.PAEMPLOYEE
                     ON (CHANGELIST.EMPLOYEE=PAEMPLOYEE.EMPLOYEE)
    /--Added by KAM--/               
                    AND (CHANGELIST.COMPANY=PAEMPLOYEE.COMPANY)
    WHERE
    (PGSELECT.GROUP_NAME='G:ACTIVE' OR PGSELECT.GROUP_NAME='G:INACTIVE')
    >

    Hi Arsh,
    The error message you receive i.e.
    ORA-01830: date format picture ends before converting entire input string
    is an Oracle error.
    The following document would be helpful:
    ORA-01830:     date format picture ends before converting entire input string
    Cause:     A valid date format picture included extra data. The first part of the format picture was converted into a valid date, but the remaining data was not required.
    Action:     Check the specifications for date format pictures and correct the statement.
    Regards,
    Alpana

  • Help with actionscript to make page jump back to top

    Ok so I wanted the page to jump back to the top when the
    buttons are pressed. I found some help in an old thread. It worked
    great but for the first button only that i put the script on. All
    the others don't work at all. Even if its the same button just on a
    different frame. Not sure what i am doing wrong at all. I really
    don't know anything about actionscript so if anyone can please help
    me. Below is the script that i added to the tree buttons and the
    script i added to the html code.
    thanks- joe
    Button1:
    on (release) {
    nextFrame();
    import flash.external.*;
    flash.external.ExternalInterface.call('pageTop');
    Button2:
    on (release) {
    gotoAndStop(1);
    import flash.external.*;
    flash.external.ExternalInterface.call('pageTop');
    Button 3:
    on (release) {
    prevFrame();
    import flash.external.*;
    flash.external.ExternalInterface.call('pageTop');
    At the top of my html:
    <head>
    <script http-equiv="Content-Script-Type"
    content="text/javascript">
    function pageTop() {
    window.scrollTo(0,0);
    </script>

    you don't need all the import statements but the problems are
    likely caused by your buttons failure to exist when the timeline
    goes to the frame indicated in the line above the externalinterface
    call().

Maybe you are looking for

  • How can I remove an old phone number from history iMessage

    Hello. I use iPhone 3gs with iOS5. I deleted contact my ex-girlfrind from contacst and phone book. But in iMessage, if i put first letter her name in "to:" area, i see his name and phone number in drop down menu. I'm appologise it's storied in iMessa

  • Problem in displaying the data of columns into rows in sap script

    hi, i am working on a sap script and i have to display the dat which is displayed in column into rows but it is not displaying it properly. eg, C     12.1     Si     5.5 it is displaying the data right now like this but i want to display the  data li

  • Should I move up to a Power Mac G5

    I currently have a Power Mac G4 with 733 Mhz ... it has 1 mb cache ... I have owned it for about 6 six years. I use it totally to edit films fom my school. I am using Final Cut 3 I have heard that the advantage of the G5 is speed, but I have point of

  • PSE6 now won't launch. Any ideas?

    My PSE6 was working and after some cleaning on my XP at a shop, PSE6 now won't launch. Any ideas?

  • Beckhoff CX8091 works with the SCADA OPC-UA

    Does anyone had a experienced of working with beckhoff CX8091. I want to know, how beckhoff CX8091 works with SCADA OPC-UA. i did know about the siemens PAC 3200 working with SCADA OPC-UA, but didn't find any good material regarding beckhoff CX8091.