Slideshow using an Array?

For my flash class we are required to make a slide show that cycles through 6 different movieclips as slides. A requirement of this is to store them in an array for purpose of navigation..
I'm not 100% how to do this. I emailed my professor but he hasn't gotten back to me yet. Anyone here wanna take  a look at the beginning of code I have and maybe give me some pointers? Thank you
import flash.events.MouseEvent;
stop();
var slideArray:Array = new Array(Slide1,Slide2,Slide3,Slide4,Slide5,Slide6);
var currentSlide:int = 0;
next_btn.addEventListener(MouseEvent.CLICK, NextSlide);
function NextSlide(e:MouseEvent):void {
    if (currentSlide == 0){
        loader.source = slideArray[0]
        currentSlide++

Alright so it was me who had it all wrong.... I got it working now the way he wanted it and I have it working only with the "next" button. I'm not 100% sure how to get the previous button to work...
here's what I have (ignore the commenting, i have to explain each line of code for class so I was getting a head start)
var slideArray:Array = new Array(Slide1, Slide2, Slide3, Slide4, Slide5, Slide6); // defines the array that holds all the instances of the movie clips
var currentSlideArray:Array = new Array(); // defines an empty array for which the current slides on the stage will be held
var slideCurrent:int = 0; // defines a new integer variable named slideCurrent with a default value of 0
for (var i:int = 0; i < slideArray.length; i++) { // starts the for statement that sets each piece of the slideArray as a movie clip in the currentSlideArray
    var newSlide = slideArray[i];
    var slide:MovieClip = new newSlide();
    currentSlideArray.push(slide);
    trace("the value of i is: ", i);
next_btn.addEventListener(MouseEvent.CLICK, goNext); // sets an event listener for the next_btn that executes the goNext function
function goNext(e:MouseEvent):void {
    var slideOnStage:MovieClip = currentSlideArray[slideCurrent];
    slideOnStage.x = 0;
    slideOnStage.y = 0;
    addChild(slideOnStage);
    new Tween(slideOnStage,"alpha",Strong.easeOut,0,1,4,true);
    slideCurrent++;
    if (slideCurrent == slideArray.length) {
        slideCurrent = 0;
prev_btn.addEventListener(MouseEvent.CLICK, goBack); // sets an event listener for the next_btn that executes the goNext function
function goBack(e:MouseEvent):void {
    var slideOnStage:MovieClip = currentSlideArray[(slideCurrent)];
    slideOnStage.x = 0;
    slideOnStage.y = 0;
    addChild(slideOnStage);
    new Tween(slideOnStage,"alpha",Strong.easeOut,0,1,4,true);
    slideCurrent--;
    if (slideCurrent == slideArray.length) {
        slideCurrent = 0;

Similar Messages

  • How do I use an array variable in the assignment target?

    Hi,
    I am creating a BPEL process in which I have to use an array variable. The array variable needs to be initialized based on some condition.
    The issue is I cannot find a way to set the value of the array variable. There are ways to GET the value of an array variable indexing into it.
    But how do I set the value by using the Array variable in the <to> tag?
    Any help is appreciated. I am using BPEL 10.1.2.0.2.
    Thanks.

    You can declare a variable of type integer which will server as your index. Figure out based on some condition in your process which index of array to update. Assign to your integer variable you created.
    And have Assign copy operation like this -
    <copy>
    <from variable="Var_Output_FetchDueDate"
    part="OutputParameters"
    query="/ns18:OutputParameters/ns18:DUEDATE"/>
    <to variable="outputVariable" part="payload"
    query="/client:GetCustomerAccountInformationProcessResponse/client:customer/client:accounts/client:account[$Var_Counter]/client:dueDate"/>
    </copy>
    I have been using this in my processes.

  • I have a 4K monitor and want to see a full screen slideshow using the jpeg generated when I "save" a raw file in the raw converter.

    I have a 4K monitor (actually a 50 inch Samsung TV).  Looking at my daily photographs on this monitor is astonishing, wonderful, etc. but there is one fly in the ointment so to speak.  With previous monitors when I selected slideshow I could get a full screen "fit or fill" slideshow that I used for grading my images.  My initial work flow all happens in Bridge and Camera Raw.  It goes like this: I download my raw files using Bridge.  In the thumbnail view I delete all the obviously bad images.  Then using Bridge I open each raw file using my preferred presets for sharping and such.  If I like the image I "Save" it to the same folder as a full sized maximum quality JPEG. 
    Now we get to the part that doesn't work.  At this point I usually start a full screen slideshow and rate each of the JPEGs I have saved.  What I see is a 1920 x 1080 preview image blown up to full screen size which of course looks awful.  Why can't I just view a slightly reduced JPEG image created on the fly by Bridge.  I guess I could tell Bridge to create 3840 x 2160 previews and they would display correctly, but that would be a big hit on disk space.
    When I run slideshow using the 1080 pixel preview, I can click on the preview I click on the displayed image and start a full resolution slideshow of the saved JPEGs but the outer edges of the image are not viewable because the image has not been reduced to fit on the monitor screen. 
    Does anyone know how I can get Bridge to show a full screen slideshow using the saved JPEGs?

    Sounds like a driver issue. I never tested in bridge, so I could be wrong. But it sounds to me that when you are connected to that screen, your settings are not set to the full resolution of that screen.

  • I have created a slideshow using i Photo. How do I burn it to disc so that I can play it on my DVD?

    I have created a slideshow using i Photo.
    How do I burn it to disc to play on a DVD.
    I cannot access i DVD.
    Is this the problem?
    I have exported the slideshow as a movie quick time file.
    What do I do next???

    If your Mac is a new one, like mine, then it comes with a version of iLife that doesn't have iDVD and if so, there isn't an easy way to burn a DVD from iPhoto or iMovie that will play on a normal DVD player.  There is quite a bit of correspondence about this, but I couldn't find a good answer, apart from this:
    https://discussions.apple.com/message/18460085#18460085
    I ended up buying (via Amazon) a boxed version of iLife11, which has all the same software I already have, but with a copy of iDVD with it. 
    Seems to work well with iMovie, but at the moment, my copy of iPhoto has crashed - see:
    https://discussions.apple.com/message/18943719#18943719
    Having only just transferred from a Windows machine to a Mac, it seems incredibly arrogant for Apple to think people don't use DVD players anymore. 

  • How can I use my array in another method.... Or better yet, what's wrong?

    I guess I'll show you what I am trying to do rather and then explain it
    public class arraycalc
    int[] dog;
    public void arraycalc()
    dog = new int[2];
    public void setSize(int size)
    dog[1] = size;
    public int getSize()
    return dog[1];
    This gives me a null pointer exception...
    How can I use my array from other methods?

    You have to make the array static. :)
    Although I must admit, this is rather bad usage. What you want to do is use an object constructor to make this class an object type, and then create the array in your main class using this type, and then call the methods from this class to modify your array. Creating the array inside the other method leads to a whole bunch of other stuff that's ... well, bad. :)
    Another thing: Because you're creating your array inside this class and you want to call your array from another class, you need to make the array static; to make it static, you must make your methods static. And according to my most ingenious computer science teacher, STATIC METHODS SUCK. :D
    So, if you want to stick with your layout, it would look like:
    public class arraycalc
         static int[] dog;
         public static void arraycalc()
              dog = new int[2];
         public static void setSize(int size)
              dog[1] = size;
         public static int getSize()
              return dog[1];
    }But I must warn you, that is absolutely horrible code, and you shouldn't use it. In fact, I don't even know why I posted it.
    You should definitely read up on OOP, as this problem would be better solved by creating a new object type.

  • How to change the frequency of pulse train on the fly using an array of values?

    Hi all!
    First I want to thank U for the great job you are doing for this forum.
    Iam still busy trying to control a stepper motor, by sending pulses from my E-series 6024 to a compumotor s6- stepper Driver. I've managed to get it working. I desperately need to control the motor using the values from an array. I believe we can use two approaches for that:
    1st - I can get an array of the "numbers of pulses". Each element must run for 10 milliseconds. Using that we can calculate the array of frequencies to send the number of pulses within 10 milliseconds for each specific element. Could we use the arrays of "number of pulses" and frequencies in a "finite pulse train " and up
    date with each element every 10 millisecond?
    2nd - Or Could we use of the frequency array in a "continuous pulse train vi" and update it every 10 milliseconds?
    Please note that I must use the values as they are.
    Can someone please built a good example for me? Your help will be appreciated.
    Regards
    Chris
    Attachments:
    number_of_steps.txt ‏17 KB
    frequency.txt ‏15 KB

    Tiano,
    I will try to better explain the paragraph on LabVIEW. The original paragraph reads ...
    "While in a loop for continuous pulse train generation, make two calls to Counter Set Attribute.vi to set the values for "pulse spec 1" (constant 14) and "pulse spec 2" (constant 15). Following these calls you would make a call to Counter Control.vi with the control code set to "switch cycle" (constant 7). The attached LabVIEW programs demonstrate this flow."
    You can make two calls to Counter Set Attribute or you can make a call to Set Pulse Specs which, if you open this VI, you will see that it is just making two calls to Counter Set Attribute. What you are doing with the Counter Set Attribute VIs is setting two registers called "pulse s
    pec 1" and "pulse spec 2". These two registers are used to configure the frequency and duty cycle of your output frequency.
    The example program which is attached to this Knowledge Base demonstrates how to change the frequency of a continuous generation on the fly. Why continuous? Because changing the frequency of a finite train would be easy. When the train completes it's finite generation you would just change the frequency and run a finite train again. You would not care about the time delay due to reconfiguration of the counter.
    If you would like to change the frequency of the pulse train using a knob, this functionality will have to be added in the while loop. The while loop will be continuously checking for the new value of the knob and using the knob value to set the pulse specs.
    LabVIEW is a language, and as with learning all new languages (spoken or programatic) there is a lot of learning to be accomplished. The great thing is that LabVIEW is much easier than mo
    st languages and the learning curve should be much smaller. Don't fret, you'll be an expert before you know it. Especially since you're tackling a challenging first project.
    Regards,
    Justin Britten

  • Using Variables/Arrays from one class in another

    Hello all,
    First, to explain what I am attempting to create, is a program that will accept input of employee names and hours worked into an array. The first class will accept a command line argument when invoked. If the argument is correct, it will call another class that will gather information from the user via an input box. After all names and hours have been input for employees, this class will calculate the salary based upon the first letter of each employee name and print the total hours, salary, etc. for each employee.
    What I need to do now is to split the second class into two: one that will gather the data and another that will calculate and print the data. Yes, this is an assignment. However, I am trying to learn and I have gotten this far, but I am stuck on how to get a class to be able to use an array/variables from another class.
    I realize the below code isn't exactly cleaned up...yet.
    Code for AverageSalaryGather class:
    import javax.swing.JOptionPane; // uses class JOptionPane
    import java.lang.reflect.Array;     
    import java.math.*;
    public class AverageSalaryGather {
         public static void gatherData() {     
              char[] alphaArray = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','x','y','z'};
              String[][] empInfoArray = new String[100][4];
              String[] empNameArray = new String[100];
              String finalOutput = "Name - Rate - Hours - Total Pay\n";
              String averageHoursOutput = "Average Hours Worked:\n";
              String averageSalaryOutput = "Average Hourly Salary:\n";
              String averageGroupSalaryOutput = "Average Group Salary:\n";
                        String[] rateArray = new String[26];
                        char empNameChar = 'a';
              int empRate = 0;
              int payRate = 0;
                        for (int i = 0; i < 26; i++) {
                   payRate = i + 5;
                   rateArray[i] = Integer.toString(payRate);
                        int countJoo = 0;
              while (true) {
                   String namePrompt = "Please enter the employee name: ";
                   String empName = JOptionPane.showInputDialog(namePrompt);
                                  if (empName == null | empName.equals("")) {
                        break;
                   else {
                        empInfoArray[countJoo][0] = empName;
                        for (int i = 0; i < alphaArray.length; i++) {
                             empNameChar = empName.toLowerCase().charAt(0);
                                                      if (alphaArray[i] == empNameChar) {
                                  empInfoArray[countJoo][1] = rateArray;
                                  break;
                        countJoo++;
              // DecimalFormat dollarFormat = new DecimalFormat("$#0.00");
              for (int i = 0; i < empInfoArray.length; i++) {
                   if (!(empInfoArray[i][0] == null)) {
                        String hourPrompt = "Please enter hours for " + empInfoArray[i][0] + ": ";
                        String empHours = JOptionPane.showInputDialog(hourPrompt);
                        int test = 0;
                        empInfoArray[i][2] = empHours;
                        // convert type String to double
                        //double tmpPayRate = Double.parseDouble(empInfoArray[i][1]);
                        //double tmpHours = Double.parseDouble(empInfoArray[i][2]);
                        //double tmpTotalPay = tmpPayRate * tmpHours;
                        // create via a string in empInfoArray
                             BigDecimal bdRate = new BigDecimal(empInfoArray[i][1]);
                             BigDecimal bdHours = new BigDecimal(empInfoArray[i][2]);
                             BigDecimal bdTotal = bdRate.multiply(bdHours);
                             bdTotal = bdTotal.setScale(2, RoundingMode.HALF_UP);
                             String strTotal = bdTotal.toString();
                             empInfoArray[i][3] = strTotal;
                        //String strTotalPay = Double.toString(tmpTotalPay);
                        //empInfoArray[i][3] = dollarFormat.format(tmpTotalPay);
                        else {
                             break;
              AverageSalaryCalcAndPrint averageSalaryCalcAndPrint = new AverageSalaryCalcAndPrint();
              averageSalaryCalcAndprint.calcAndPrint();
    Code for AverageSalaryCalcAndPrint class (upon compiling, there are more than a few complie errors, and that is due to me cutting/pasting the code from the other class into the new class and the compiler does not know how to access the array/variables from the gatherData class):
    import javax.swing.JOptionPane; // uses class JOptionPane
    import java.lang.reflect.Array;
    import java.math.*;
    public class AverageSalaryCalcAndPrint
         public static void calcAndPrint() {     
              AverageSalaryGather averageSalaryGather = new AverageSalaryGather();
              double totalHours = 0;
              double averageHours = 0;
              double averageSalary = 0;
              double totalSalary = 0;
              double averageGroupSalary = 0;
              double totalGroupSalary = 0;
              int countOfArray = 0;
              for (int i = 0; i < empInfoArray.length; i++) {
                   if (!(empInfoArray[0] == null)) {
                        totalSalary = totalSalary + Double.parseDouble(empInfoArray[i][1]);
                        totalHours = totalHours + Double.parseDouble(empInfoArray[i][2]);
                        totalGroupSalary = totalGroupSalary + Double.parseDouble(empInfoArray[i][3]);
                        countOfArray = i;
              averageHours = totalHours / (countOfArray + 1);
              averageSalary = totalSalary / (countOfArray + 1);
              averageGroupSalary = totalGroupSalary / (countOfArray + 1);
              String strAverageHourlySalary = Double.toString(averageSalary);
              String strAverageHours = Double.toString(averageHours);
              String strAverageGroupSalary = Double.toString(averageGroupSalary);
              for (int i = 0; i < empInfoArray.length; i++) {
                   if (!(empInfoArray[i][0] == null)) {
                        finalOutput = finalOutput + empInfoArray[i][0] + " - " + "$" + empInfoArray[i][1] + "/hr" + " - " + empInfoArray[i][2] + " - " + "$" + empInfoArray[i][3] + "\n";
              averageHoursOutput = averageHoursOutput + strAverageHours + "\n";
              averageSalaryOutput = averageSalaryOutput + strAverageHourlySalary + "\n";
              averageGroupSalaryOutput = averageGroupSalaryOutput + strAverageGroupSalary + "\n";
              JOptionPane.showMessageDialog(null, finalOutput + averageHoursOutput + averageSalaryOutput + averageGroupSalaryOutput, "Totals", JOptionPane.PLAIN_MESSAGE );

    Call the other class's methods. (In general, you
    shouldn't even try to access fields from the other
    class.) Also you should be looking at an
    instance of the other class, and not the class
    itself, generally.Would I not call the other classes method's by someting similar as below?:
    AverageSalaryCalcAndPrint averageSalaryCalcAndPrint = new AverageSalaryCalcAndPrint();
              averageSalaryCalcAndprint.calcAndPrint(); Well... don't break down classes based on broad steps
    of the program. Break them down by the information
    being managed. I'm not expressing this well...Could you give an example of this? I'm not sure I'm following well.
    Anyway, you want one or more objects that represent
    the data, and operations on that data. Those
    operations include calculations on the data. Other
    classes might represent the user interface, and
    different output types (say, a file versus the
    console).Yes, the requirements is to have a separate class to gather the data, and then another class to calculate and print the data. Is this what you mean in the above?

  • How to create and use mutable array of UInt8

    Hello!
    If I get it right, UInt8 *buffer, buffer - is a pointer to a start of array?
    Then how to create and use mutable array of UInt8 pointers?
    The main target is a creation of the module that will store some byte array requests and will send all of them at the propriate moment.

    I try
    - (void) scheduleRequest:(UInt8 *)request {
    if (!scheduledRequests) scheduledRequests = [[NSMutableArray array] retain];
    [scheduledRequests addObject:request];
    But get warning:"passing argument 1 of 'addObject:' from incompatible pointer type"

  • How to use an array in a SQL Query

    Hi
    I need to use an array of numbers such as a VARRAY or Associated Index Array so that I can do the following SQL:
    select *
    from *
    where array is null or id is in array
    So that if the array is empty it will return all the records, and if the array is not empty then it will return only the rows associated with the ids in the array.
    Is this possible?
    Regards,
    Néstor Boscán

    Actually, solution I posted returns all rows when VARRAY is empty, not when it is null. To return all rows when VARRAY is null, use:
    SQL> select  ename
      2    from  emp
      3    where deptno in (select * from table(cast(sys.OdciNumberList(10,30) as sys.OdciNumberList)))
      4       or sys.OdciNumberList(10,30) is null
      5  /
    ENAME
    ALLEN
    WARD
    MARTIN
    BLAKE
    CLARK
    KING
    TURNER
    JAMES
    MILLER
    9 rows selected.
    SQL> select  ename
      2    from  emp
      3    where deptno in (select * from table(cast(null as sys.OdciNumberList)))
      4       or null is null
      5  /
    ENAME
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    ENAME
    JAMES
    FORD
    MILLER
    14 rows selected.
    SQL> SY.

  • Error in the pl/sql block using associative arrays

    Hi
    I tried the following block of code using associative arrays.
    DECLARE
       TYPE NumTab IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
       CURSOR c1 IS SELECT empno FROM emp;
       empnos NumTab;
       rows   NATURAL := 10;
    BEGIN
       OPEN c1;
       FOR i in empnos.first..empnos.last LOOP
          /* The following statement fetches 10 rows (or less). */
          FETCH c1 BULK COLLECT INTO empnos LIMIT rows;
          EXIT WHEN c1%NOTFOUND;
          DBMS_OUTPUT.PUT_LINE ( empnos.next(i));
       END LOOP;
       CLOSE c1;
    END;and the error is
    DECLARE
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at line 8could you please let me know where i'm wrong
    and please guide me where we use these associative arrays.
    Thanks

    Something like this. Do minor modification in your code.
    DECLARE
       TYPE NumTab IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
       CURSOR c1 IS SELECT empno FROM emp;
       empnos NumTab;
       rows   NATURAL := 5;
    BEGIN
       OPEN c1;
       LOOP  
        /* The following statement fetches 5 rows (or less). */
          FETCH c1 BULK COLLECT INTO empnos LIMIT rows;
          EXIT WHEN c1%NOTFOUND;
          DBMS_OUTPUT.PUT_LINE ( empnos.count);
       END LOOP;
       CLOSE c1;
    END;
    /

  • Error when using byte array in web service model interface

    Hello everybody,
    I'm using a web service model in my web dynpro application. The web service requires a byte array as import parameter.
    When starting the web dynpro application the following error occurs:
    com.sap.tc.webdynpro.services.exceptions.WDTypeNotFoundException: type java:byte not found
    at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getDataType(DataTypeBroker.java:216)
    I'm using byte arrays several times in my application --> no problem. So why does the error say "byte not found" when using the web service?
    Thanks for your help!
    regards
    Christian

    Hi,
    maybe this is the problem. The type is byte and not binary.
    But I have the same problem as mentioned in the other thread: I can't change the type.
    The type in the WSDL of my web service is "base64binary". Is there maybe a possibility to import a jar-file for this type?
    Christian

  • How can i control the timings of my slideshow using iphoto on my ipad

    Q: 1 how can i control the timings of my pupil's slideshows using iPhoto on the iPad?
    Q: 2 then how can i export them?
    Q: 3 how can i combine them from 8 individual slideshows to 1 for showing to their parents at an assembly?
    many thanks in anticipation of your collective help
    brian

    Here's my take on the same thing:
    Short answer: the dpi is set when you decide what size you're printing at.
    Long Answer: Dpi means nothing in the digital world of your computer. There are no "inches" to have "dots per..." Size is measured in pixels. That's the same on your camera. It doesn't take 10 x 8 or 6 x 4 shots. It takes shots measured in megapixels. For instance 4,000 x 3,000 is a 12 megapixel camera.
    Using that example, that shot from that camera has 12 million pixels. So that's how many "Dots" there are. To decide the ratio of dots per inch, you now need to decide the "inches" part. And that's printing. Print at 10 x 8 and the dpi will be 4,000/10 or about 400 dpi. At 6 x 4 then it's 4,000/6 or 660 dpi. Work the other way: Print at 300 dpi and the resulting image will be about 13 inches on the longer side.
    So, your photo as a fixed number of pixels. Changing the dimensions of the print will vary the dpi, changing the dpi will vary the dimensions of the print.
    For more see http://www.rideau-info.com/photos/mythdpi.html
    Regards
    TD

  • Help with very advanced slideshow using imovie?/idvd?/iphoto?

    I am trying to create a more advanced slideshow for the first time, and I need some advice on how to manage my project and the order in which to use (if to use) the various applications (iphoto, idvd, imovie). I've been in all of them trying to figure out the best format to use, as each of them have certain features I'd like to incorporate into my slideshow. It gets a little confusing since this is all new and I just don't know how to approach it. If anyone has experience with all of these programs, maybe you could give me some suggestions on how to get the most out of what is available. Here is what I'd like to do:
    I have a 4 minutes song from itunes which I want to use with a slide show of about 30 pics (whatever is a reasonable amount).
    FX features (a sound effect at beginning before song and maybe some of the cool video affects on a few of the photos (in addition to Ken Burns )
    Ken Burns zoom like an animated slideshow
    Use a theme (preferably one from idvd as it seems to have more to choose from.
    Since it is only one slideshow, I don't need the confusion of all the zones to import clips into, so I'd like to keep it simple. While I want to keep it simple, I'd like to have some sort of preview in the beginning with the cool stuff imovie offers like the title floating in etc..
    So my problem is, I just don't know how to get all of these affects into one slide show because I'm training myself on bits ad pieces of each one, but I don't where to start (magic imovie, magic idvd, start from scratch idvd, or just slide show to import to idvd). I 've tried them all, but I can't figure a way to get more affects as each one has something different. Not sure if this makes sense, but I've trying so hard to get this right (for a Xmas gift) and I'm going in circles trying to keep it all straight. So, if this is possible, I would really appreciate help as to the best way to approach it. Thank you.
    MacBook1,1   Mac OS X (10.4.8)   using iphoto 6.05, idvd 6.0.3, imovie 6.03

    Hi n
    You have one day more for Your project than in Sweden as Santa has to start
    somewhere and home is close. (We start at about 15.00 24 of dec).
    I would start with - if the music is bought from iTune store (a fix for a known
    problem) to save it out as an audio CD (.aiff) else it will look OK till You try
    Your DVD disk = No sound.
    Then I would start a new iMovie project and from media button select photos
    and drop one start photo from iPhoto down into timeline. Then I would import
    the music from the new CD.
    Cont to put photos one at a time into timeline. Change duration so that they
    match the tempo in Your movie.
    Transitions
    Effects
    etc.
    Save from time to time to keep safe.
    When the "movie" is done - close iMovie and open iDVD and drop Your movie
    project icon into this - or - use the import function in iDVD.
    DON'T Share/Export from iMovie to iDVD - it will destroy Your movie by a bad
    rendering work. iDVD does this so much better.
    I don't know any way to use the "themes" in iDVD into iMovie. Sorry
    Merry Christmas !!!
    Yours Bengt W

  • Using Parameterized Arrays in Stored Procedure

    I tried following code to pass array value to stored procedure but its giving error, as I am new to this procedure, please advise what am I missing ?
    Best Regards,
    Luqman
    My code is as below.
    CREATE TYPE num_array AS table of number;
    create or replace procedure give_me_an_array
    ( p_array in num_array )
    as
    begin
    for i in 1 .. p_array.count
    loop
    dbms_output.put_line( p_array(i) );
    end loop;
    end give_me_an_array;
    declare
    mdata num_array;
    begin
    mdata(1) := 1234;
    mdata(2) := 10;
    give_me_an_array(mdata);
    end;

    Hi Satya,
    Now I got it, thanks,
    Can you please advise, if I use the same stored procedure for EMP Table and use my array values to retrieve the selected EMPNo
    I tried following but I could not succeed.
    When I compile the stored procedure, error occurs:
    "inconsistent datatypes: expected NUMBER got NUM_ARRAY"
    for example:
    CREATE TYPE NUM_ARRAY AS TABLE OF NUMBER;
    Create or Replace Package TB_Data
    Is Type CV_Type Is REF CURSOR;
    END TB_DATA;
    Create or Replace Stored Procedure give_me_an_array
    (CV IN OUT TB_DATA.CV_TYPE,
    MEmpNo In Num_Array)
    Is
    Begin
    Open CV for
    Select * from EMP
    Where Empno in MEmpNo;
    End myProc;
    declare
    mdata num_array:=num_array(7839,7844);
    begin
    give_me_an_array(mdata);
    end;
    Best Regards,
    Luqman

  • Using an array in another class to set text of a button

    I am trying to use an array from one class in another to set the text of a button.
    This is the code in the class where i have made the array.
    public class EnterHomeTeam
         public int NumberOfPlayers = 11;
         public String[] PlayerName = new String [NumberOfPlayers];
    private void button1_Click (Object sender, System.EventArgs e)
              PlayerName [0] = this.HGoalKeeper.toString();
              PlayerName [1] = this.HDef1.toString();
              PlayerName [2] = this.HDef2.toString();
              PlayerName [3] = this.HDef3.toString();
              PlayerName [4] = this.HDef4.toString();
              PlayerName [5] = this.HMid1.toString();
              PlayerName [6] = this.HMid2.toString();
              PlayerName [7] = this.HMid3.toString();
              PlayerName [8] = this.HMid4.toString();
              PlayerName [9] = this.HAtt1.toString();
              PlayerName [10] = this.HAtt2.toString();     
              Players IM = new Players();
              this.Hide();
              IM.Show();
    }Then in the class where i want to use the variables (ie. PlayerName[0]) I have got
    public class Players
    EnterHomeTeam HT = new EnterHomeTeam();
    //and included in the button code
    this.button1.set_Text(HT.PlayerName[0]);I hope i have explained this well enough and hope someone can help me solve this problem! Im not a very competent programmer so i apologise if I havent explained this well enough!
    Adam

    .NET automatically generates quite a bit of code.... this is button1:
    private void InitializeComponent()
              this.button1 = new System.Windows.Forms.Button();
    // button1
              this.button1.set_BackColor(System.Drawing.Color.get_LightBlue());
              this.button1.set_Location(new System.Drawing.Point(88, 32));
              this.button1.set_Name("button1");
              this.button1.set_Size(new System.Drawing.Size(72, 56));
              this.button1.set_TabIndex(0);
              this.button1.set_Text(HT.PlayerName[0]);
              this.button1.add_Click( new System.EventHandler(this.button1_Click) );
    this.get_Controls().Add(this.button1);
         private void button1_Click (Object sender, System.EventArgs e)
              System.out.print(HT.PlayerName[0]);
              GKAction GK = new GKAction();
              this.Hide();
              GK.Show();
         }Hope that helps - im pretty sure that's all the button1 code

Maybe you are looking for