Skip navigation
Currently Being Moderated

How can you determine the absolute path to a dynamically created NetStream object?

Jun 26, 2012 4:16 PM

Tags: #flash #video #as3 #cs5.5 #netstream #path #absolute #actionscript3 #ccforflash

We are trying to implement video captioning with a freeware component, ccforflash. This requires us to provide an absolute or relative path  to our NetStream object. How can we determine this path in Flash CS5 AS3?

 

From the CCforFlashCS5 documentation:

 

"2. Object name and path

Type the name and path.  This is the instance name of the object with which CCforFlashAS3 will synchronize. It must be spelled correctly, since CCforFlashAS3 will query the object with this name for timing information in order to synchronize the captions. The path must also be included; either relative to the CCforFlashAS3 component (i.e. this.parent) or the absolute path from the main level of the movie (root)."

 
Replies
  • Currently Being Moderated
    Jun 26, 2012 4:31 PM   in reply to ChrisOWN

    You determine it based on where you have the objects located.  If your component is in the same timeline as the NetStream object, then a relative path will probably be the easiest... it will just be the instance name of the object. 

     

    If the objects are on different timelines, then you might find it easier to target using a path from the root timeline, though using a relative path still might be easier if the NetStream is in a child object relative to the timeline of the component.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 26, 2012 4:59 PM   in reply to ChrisOWN

    Are you saying you have no idea where the NetStream object is declared?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 26, 2012 7:44 PM   in reply to ChrisOWN

    I guess I understand your problem and agree that AS2 had a nice way of identifying a path to something as compared to what AS3 does.  I am going to see if I can stir up someone else's interest in your posting who is a better sleuth than I.

     

    But if I can get stoopid for a minute and suggest trying something (I would try it)... If you have access to the code where the NetStream object is instantiated, right after it is given life, assign that instance to a variable you have in the main timeline and use that variable (and the root timeline or a "this"-based reference for the path requirement) for your CCforFlashCS5 needs. 

    
     
    |
    Mark as:
  • kglad
    72,212 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 26, 2012 11:36 PM   in reply to ChrisOWN

    define a public getter for your Model class that returns your netstream instance and pass your model instance dot getter to that component.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 27, 2012 12:47 PM   in reply to ChrisOWN

    Well whaddya know!  You're welcome.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points