Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Help - Flash Exam - will pay

    Hey guys

    I'm having my exam in flash programming in 2 days, and I need some help coding my program. The tasks are as followed;

    Main: Make a library website in flash (Adobe)
    (Task 1 and 2 is gong to be in one scene together, where you go from frame 1 to frame 2)

    1. Make a presentation on the first frame with pictures of a random selection of books - I've done this one.
    Add a button that will let kids from 2-5 years range to click and go to a page called "Adventure time" (lols).

    2a. Make an animation where you make a book open itself, and a character from a random story comes out.. add some text - make it last 15 seconds - I've done this as well.

    2b. at the same frame as task 2a, make a list of readers who are going to have a reading session for anyone who wants to join in.

    Here's my code for that (I've made a list with the TITLES of the books that are available for reading) as they choose the book, the reader comes out in a textbox as well as the date and title of the book;

    lstReading.addEventListener(MouseEvent.CHANGE, bookchoice);

    lstReading.addItem({label:"Ole Brumm", reader:"Knut", time:"10.06.2013 - kl10-11"})
    lstReading.addItem({label:"Harry Potter", reader:"Annette", time:"11.06.2013 - kl14-15"})
    lstReading.addItem({label:"Pippi Langstrømpe", reader:"Astrid", time:"12.06.2013 - kl9-10"})
    lstReading.addItem({label:"Phenomena", reader:"Berit", time:"13.06.2013 - kl12-13"})
    lstReading.addItem({label:"Hobbiten", reader:"Arild", time:"14.06.2013 - kl14-15"})
    lstReading.selectedIndex = 0;

    function bokvalg(evt:MouseEvent)
    {
    txtReader.text = lstReading.selectedItem.label
    txtTitle.text = lstReading.selectedItem.oppleser
    txtTime.text = lstReading.selectedItem.tid
    }

    This works fine, I choose the title and the info comes out!

    2b-2 - Make an array where it is possible for anyone who wants to join the readings to register.
    - Make it so the name and a random PIN code is added to an Array (like username and password)
    - You have to make it so it's not possible to make duplicated entries (same PIN and name)
    - Make it so you can remove yourself from the array, just as easy as you can add yourself.

    *So I need help adding data from textboxes into an array with NAMES and PINS*

    I NEED HELP WITH THE ARRAY HERE, CAN'T FIGURE OUT HOW TO DO THIS :/ - I will have to have a textbox that shows a text when you click "join reading" and it tells you either that you have been added, or that you already exist at that reading.

    3. A NEW PAGE/SCENE

    The library itself, where you can get books.
    - 3.a - The newest movies and films have to be presented in a gallery - Done
    - 3.b - Make an ARRAY that will let anyone borrow books or films by typing in their NAME and their PIN + A BOOK PIN for book ID -I have no idea how to do this either, I need help making an array where I can add users, pin and the book ID - NOT ALLOW duplicates (of same book ID ex.) and it should be possible to trace the username/pin at all times to see what books the user have borrowed.

    If any of you could help me with this, I will repay you in whatever way I can.. I could buy you a game @steam or some place else for about $10-15? I really need some help though

    Thanks in advance!

  • #2
    New Coder djpaul1963's Avatar
    Join Date
    Apr 2012
    Location
    Athens GR
    Posts
    74
    Thanks
    0
    Thanked 8 Times in 8 Posts
    Before wasting your money have a look here http://www.adobe.com/devnet/actionsc...ls/arrays.html and here http://help.adobe.com/en_US/FlashPla...t/3/Array.html especially the parts about sorting, multi dimensional arrays, every() and some() methods.
    Arrays is a very strong tool in AS3 (and literally in every modern language) and as soon you become familiar with them you will give solutions to many coding problems.
    Everything can be done, but I don't know how.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •