Load justin.tv channel from a flash?
A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Load justin.tv channel from a flash?

  1. #1
    Junior Member
    Join Date
    Jul 2005
    Posts
    19

    Load justin.tv channel from a flash?

    Hi,

    im making a simple swf file. I only need it to load my justin.tv channel but its not working. This is my A3 script:

    Code:
    import flash.display.MovieClip;
    
    var Xpos:Number = 110;
    var Ypos:Number = 180;
    var swf:MovieClip;
    var myLoader:Loader = new Loader();  
    
    var url:URLRequest = new URLRequest("http://www.justin.tv/widgets/live_embed_player.swf?channel=mychannel"); 
    
    myLoader.load(url);
    myLoader.x = Xpos;
    myLoader.y = Ypos;
    addChild(myLoader);
    when i export the movie, i get a lot of output errors, such as security violations and things like that. However, im able to load other swf movies with the exact same code. Could you please help me?

    Thank you.

  2. #2
    Junior Member
    Join Date
    Jul 2005
    Posts
    19
    Hello?? Any answer please??

  3. #3
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    El Paso
    Posts
    2,429
    Here's an example from their api.
    http://apiwiki.justin.tv/mediawiki/i..._extends_Event

  4. #4
    Junior Member
    Join Date
    Jul 2005
    Posts
    19
    Hi,

    thank you for your reply. I already had seen that page but im not sure i understand it quite well. I just need to create a swf file and then copy pasting that AS3 onto it?

  5. #5
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    El Paso
    Posts
    2,429
    I haven't tried it but yeah, if you paste that code in your first frame of the fla it should work.

    However to actually connect to your channel you'll have to supply your api key instead of where it says YOUR_API_KEY

    loader.load(new flash.net.URLRequest("http://www.justin.tv/widgets/live_api_player.swf?video_height=480&video_width=6 40&consumer_key=YOUR_API_KEY"));

    It seems you need to log in to your accounts, covert it to a developers accounts and then create an application within your developers console. That should generate at key for you to use.

  6. #6
    Junior Member
    Join Date
    Jul 2005
    Posts
    19
    Thank you. Thats what i needed to know. However, im trying to get that API key and i cant find where to get it. The link on that page takes to a forbidden page. Do you know if the API key will make the flash only playable on a website defined by its creator?

    Thank you.

  7. #7
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    El Paso
    Posts
    2,429
    It should play wherever you embed the swf, the api key just lets them know which developer is making the player request so they know who to ban in case of abuse.

  8. #8
    Junior Member
    Join Date
    Jul 2005
    Posts
    19
    Ah, what a crap then. Is it possible to make the playable functional only in a given domain with AS3?

  9. #9
    Junior Member
    Join Date
    Jul 2005
    Posts
    19
    Hello? any answer please?

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

Poll by Flashkit.com