A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Cant figure out the Actionscript Code to do this.

  1. #1
    Junior Member
    Join Date
    Mar 2009
    Posts
    2

    Cant figure out the Actionscript Code to do this.

    I am in charge of creating a portal page for my company. We are a Wireless ISP and we have portal page at a local airport. We offer free wifi there because of sponsorship. We would like the page to have a 30 sec movie on it that people have to watch in order to get online. I have 2 ideas on how to do this. 1. watch the movie and when movie is over automatically call to our login script and then log the user in through our network device. 2. have a get online button grayed out until the movie is over after the movie is over button becomes clickable and then the button after clicked calls to the script that logs my users in through my device.

    What do you guys think? Do you think 1 or 2 would be easier?? And which ever way you think is easier can you show me the code i need in order to get this accomplished. Any help would be greatly greatly greatly appreciated. Thanks!

  2. #2
    Junior Member
    Join Date
    Mar 2009
    Posts
    1
    I would have the "get on line" movie invisible until the movie is over, then... fade in.

  3. #3
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Hummmmm, auto redirect or disable til complete button. I think I like the button idea. Disabled so the user knows, you can even have different labels depending on the button status.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  4. #4
    Junior Member
    Join Date
    Mar 2009
    Posts
    2
    Thanks for he responses. I appreciate it. I am not sure on how to disable the button the on the page and then after the movie ends have the button enabled and have that call to the specific fucntion i need in order for my clients to log into my device??

  5. #5
    Banned
    Join Date
    Nov 2002
    Posts
    60
    Hey check here, they have all kinds of usefull stuff.

    http://flashden.net?ref=sixtyacura

  6. #6
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Just about all components have and enabled property. You can set that property to false to disable and true to enable. For instance, if you have button on the stage names (btnSomeButton), you can disable it via code like this:
    Code:
    btnSomeButton.enabled = false;
    If you're new to programming, there is a propensity to use "procedural" or linear traits. This isn't bad, but can make the work a little hard, if your project grows. The reason I bring this up is, I suggest you begin in this method to get the basic understanding of code execution (Please take no offense, don't want to insult your intelligence).

    You main timeline will control everything that happens. In a linear fashion write some fake code (also known as Psuedo-code) outlining, in plain english, what you want to happen. Here is an example:

    Application starts
    o load movie
    o show button, disabled
    o start movie

    o when movie is complete, enable button
    Application ends
    Of course, I short cut my code, but it just give you an idea of what you want to happen. When you have this, it will become very clear where to place the code, what function to call and what order to perform the tasks to get the results you want.

    When you're confortable with linear development, then you can migrate to object oriented programming, which is the standard for many mid to advance application and web site.

    Hope this helps.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center