Results 1 to 7 of 7

Thread: newby simple actionscript needed, help!

  1. #1
    Join Date
    Jul 2005
    Location
    UK
    Posts
    159
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Question newby simple actionscript needed, help!

    hey, i'm just learning my way around flash, for the most part i've been using it encode movies for my websites, as i'm still a css/dhtml webdesigner.

    i've built a site with multiple dhtml pop-up windows, each with a swf movie embedded in the div. what i'd like to do is, once the dhtml window is open, have the swf start playing, and then once it is finished, use actionscript to close the dhtml window. that is possible right? i just have never touched actionscript so i don't know where to start. could somebody help me out?

    on my other dhtml pop-ups this code is what i'm currently using to close/hide the div:

    Code:
    onclick="document.getElementById('popup').style.display = 'none';"
    i dunno if there is a way to call this kind of script when used with actionscript inside the swf. forgive my vocabulary, in case i'm not using the right words to describe this, like i said, i'm very new to this. hopefully you still understand what i'm asking....

  2. #2
    Join Date
    Jul 2005
    Location
    UK
    Posts
    159
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    your post is neither helpful nor relevant to the thread. go away.

  3. #3
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    @moscarda

    Yes, it's possible though complicated. You've picked one heck of a starting point to get into ActionScript. Your basic idea is correct. You would have to call the JavaScript from within the SWF.

    You do this using the ExternalInterface Class (a.ka. External API). This offers a way to link between JS and AS.

    Now that you know the vocabulary, I'll let you Google around for some guides. I've also touched on the External API in this forum a lot, so you might want to search for that term here.

    If you need more guidance, post what version of AS you're using and I'll see if I can be of more assistance.

    @Arpita
    I've asked the mods to split your post off into a new thread because it has nothing to do with moscarda's origial question. Once they do, I'll have a look at your post there. In the future, please create a new topic for unrelated questions.

  4. #4
    Join Date
    Jul 2005
    Location
    UK
    Posts
    159
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    Hey thanks, i'll do my best to figure out the ExternaInterface() solution. I have adobe flash cs 4, which lets you choose which version of actionscript. Which do you recommend for this project? Thanks again,

    moscarda

  5. #5
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Code:
    Which do you recommend for this project?
    It doesn't really matter, but I find the AS3 implementation slightly easier to work with.

  6. #6
    Join Date
    Jul 2005
    Location
    UK
    Posts
    159
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    you are right, bad place to start...this is all way over my head. is there an ExternalInterface() tutorial for dummies out there? my brain hurts.

  7. #7
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Lol. This is the only tutorial of the External API that is worth mentioning. It's not a topic that many have covered. I think that the assumption is that when you get to a point where the External API is necessitated, you're advanced enough to not really need a step-by-step tutorial

Bookmarks

Posting Permissions

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