A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Get parent or class of event

  1. #1
    Registered User
    Join Date
    Mar 2012

    Get parent or class of event


    I have a class called "download" and an URLStream object inside it called "urlStream".

    From outside the class, I am adding a progress listener like this:
    download.urlStream.addEventListener(ProgressEvent. PROGRESS,onFileProgress);

    Everything works fine inside the onFileProgress function and bytesLoaded, bytesTotal are read correctly.

    What I need is a way to point to the download class from inside the onFileProgress function so that I can retrieve some other public variables defined in the "download" class.

    I tried things like:
    function onFileProgress(e:ProgressEvent):void {

    But obviously didn't work.

    I am pretty new with AS3, having started learning it about a month ago, so excuse me if this question is stupid.


  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    press the picture...
    You need to specify the target for the event first:
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

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