A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Loading a video component from anywhere in my site

Hybrid View

  1. #1
    Member
    Join Date
    Aug 2006
    Posts
    64

    Loading a video component from anywhere in my site

    Hello.
    I have a site for my short movies that has a video component that is constant throughout the site. No matter what page you are on, the video player is there playing video.
    What I want to do is have a video play right when the player opens, which I know how to do, and also have videos load into the same player from any spot in the site. This could be buttons or text links. The problem is that all other pages are inside of symbols. Can you help me with how to load this player from inside of other symbols?
    Thanks a ton!

  2. #2
    Senior Member layerburn's Avatar
    Join Date
    Jul 2006
    Location
    USA
    Posts
    542
    If your video component is on the main timeline you would point to it using _parent.instancename then the rest of the code. _parent and _root point to the main timeline, though I have learned that generally _parent is better practice than _root. You then say what you want to point to that is on that timeline, so if your video is called myvideo, then you would say _parent.myvideo.play(); or whatever it is that you want it to do. So if you were to put this on a button that is inside a symbol on the main timeline, it would look like this

    on(Release){
    _parent.myvideo.play();
    }

    Hope this helps.
    This is your brain. This is your brain on script.

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