A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [MX] how to embed vimeo/youtube video

  1. #1
    Junior Member
    Join Date
    Jun 2008
    Posts
    2

    [MX] how to embed vimeo/youtube video

    I want to create a site that has an embedded vimeo video, how can I do that in flash? (just to clarify- i do not have the source video file, its just a video from a free video hosting site that someone else posted)

    thanks,
    mark

  2. #2
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    i've loaded youtube/google video no probs. it's just a straight up swf file

    mc_instance_name.loadMovie("http://www.youtube.com/f/dlkjfs.swf");
    Evolve Designs Interactive Media
    the natural selection

  3. #3
    Junior Member
    Join Date
    Dec 2008
    Posts
    5

    embed youtube in FLASH MX

    hi, im using flash mx (the old version! not flash mx pro 2004)
    i'd like to know how to stream my videos on my flash site

    i tried embedding it into the swf, but i think it makes the site too heavy and takes forever to load.

    i was hoping there was a way i could embed a youtube video in the swf?

    im quite new to using flash so i'd need some detailed step by step instructions

    thanks!

  4. #4
    Junior Member
    Join Date
    Aug 2001
    Posts
    3

    Multiple youTube videos

    Hi there,
    I successfully loaded the youTube movie but how do I have multiple movies on the same scene. I created new keyframes and layer with buttons to just from frame to frame. Howerver, it seems as the loadmovie control keeps the previous movie loaded. how can I reset it or this is the code I am using for each of the frames.

    System.security.allowDomain("http://www.youtube.com");
    System.security.loadPolicyFile("http://www.youtube.com/crossdomain.xml");

    var loader:MovieClipLoader = new MovieClipLoader();
    var listener:Object = new Object();

    listener.onLoadComplete = function(mc:MovieClip) {
    mc._xscale = 105;// _height and _width are buggy, also if you change the movie resolution.. not sure why
    mc._yscale = 98;
    }

    loader.addListener(listener);
    loader.loadClip("http://www.youtube.com/v/youTubeMovieID", mc);
    Each frame has a different youTubeMovieID. It seems as if the movies on the first frame stays loaded and conflicts with the other ones.

    Please advise.

    Thank you

  5. #5
    Quote Originally Posted by wgator
    Hi there,
    I successfully loaded the youTube movie but how do I have multiple movies on the same scene. I created new keyframes and layer with buttons to just from frame to frame. Howerver, it seems as the loadmovie control keeps the previous movie loaded. how can I reset it or this is the code I am using for each of the frames.



    Each frame has a different youTubeMovieID. It seems as if the movies on the first frame stays loaded and conflicts with the other ones.

    Please advise.

    Thank you

    Not sure if this will help or not, found it over at:

    http://help.adobe.com/en_US/AS3LCR/F...fo.html#loader


    "Problem accessing loaderURL from nested SWF files:

    I lost quite a bit of time with this problem and am adding this comment in the hope that others will profit from it.

    The thing is that the this.loaderInfo.loaderURL property might not return the expected information when loading mutliple nested SWF files. Take this example:

    SWF1 (top level) loads --> SWF2
    SWF2 loads --> SWF3
    SWF3 loads --> SWF4 ...

    When accessing this.loaderInfo.url and this.loaderInfo.loaderURL from the top level SWF1 file, both properties contain the same URL, namely the URL of SWF1. When accessing the properties from direct children of SWF1 (for instance SWF2), the properties will contain the expected information, i.e. this.loaderInfo.url will contain the URL of SWF2 and this.loaderInfo.loaderURL will contain the URL of SWF1.

    The real problem begins with nested SWF files from the third level on down. In these cases, SWF3 or SWF4 contain the respective URLs of SWF3 and 4 in this.loaderInfo.url, as expected, but this.loaderInfo.loaderURL always contains the URL of the top level SWF file, meaning the URL of SWF1.

    To obtain the URL of the actual parent of a nested SWF file, I've had excellent results using this.loaderInfo.loader.loaderInfo.url. Careful, because this.loaderInfo.loader is not available in the top level SWF file. Since SWF1's loader has no loader, the url property will be NULL and attempting to access it results in a run-time error. To circumvent this problem, I check to make sure this.loaderInfo.url != this.loaderInfo.loaderURL before attempting to access the parent URL.

    Let me summarize the contents of these properties:

    SWF1:

    this.loaderInfo.url --> URL of SWF1
    this.loaderInfo.loaderURL --> URL of SWF1
    this.loaderInfo.loader --> NULL
    this.loaderInfo.loader.loaderInfo.url --> n/a (run-time error)

    SWF2:

    this.loaderInfo.url --> URL of SWF2
    this.loaderInfo.loaderURL --> URL of SWF1
    this.loaderInfo.loader --> loader of SWF1
    this.loaderInfo.loader.loaderInfo.url --> URL of SWF1

    SWF3:

    this.loaderInfo.url --> URL of SWF3
    this.loaderInfo.loaderURL --> URL of SWF1
    this.loaderInfo.loader --> loader of SWF2
    this.loaderInfo.loader.loaderInfo.url --> URL of SWF2

    SWF4:

    this.loaderInfo.url --> URL of SWF4
    this.loaderInfo.loaderURL --> URL of SWF1
    this.loaderInfo.loader --> loader of SWF3
    this.loaderInfo.loader.loaderInfo.url --> URL of SWF3

    ... etc.

    Perhaps someone has a simpler solution to this problem. Anyway, I hope this information will be of some help to the one or other person. "


    Also, Did you try using the UNload event handler? then loading the new video?

  6. #6
    Registered User
    Join Date
    Feb 2010
    Location
    Waterford, MI
    Posts
    1
    Newbie here, and I've got a similar problem so I though I'd post it in this thread as opposed to starting a new one.

    I have a bunch of SlideRocket presentations that I need to put into flash (for various reasons). The sliderocket embed code is similar to youtube, except that it passes the movie id in flashvars instead of the url, so the embed code looks like this:
    <div style="width:400px;height:326px"><embed src="http://cdn.sliderocket.com/SlideRocketPlayer.swf" flashvars="id=a59f85fb-2cf0-401d-ab57-842a0beceaa6" width="100%" height="100%" allowFullScreen="true" type="application/x-shockwave-flash"></embed><div style="font-size:9px;color:#444444;font-family:verdana,arial;text-align:center">Launch your own <a style="text-decoration:none;" href="http://www.sliderocket.com/">SlideRocket</a> presentation!</div></div>
    I've tried using loadMovie (and loadMovieNum) as well as MovieClipLoader, but I'm not sure I'm getting the syntax right or if the "SlideRocketPlayer.swf" will accept the id variable from another flash movie. It accepts the id in xml using flashvars as a parameter...

    Any help would be much appreciated. I'm sure I'm not the only one with this problem, but I haven't been able to find it listed exactly in any of my searches.

    Thanks in advance, Mark

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