Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Playing video on a html with jquery

Guest
Dec 21, 2011 Dec 21, 2011

Hi

I have a php/sql database that has thumb nails and videos in swf format and flv. On my html page I have an swf player. I have echoed

the thumbnails and have the url of the videos. How can I get the video url playing on the player after a person clicks the thumbnail with

out xml. Just by passing the url to the player. Kind of how youtube works thanks.

I have hand some sucess with xml passing but this can`t  work in this aspect. So I have been investigating jquery and other alternatives.

Hope you can help.

Thanks.

TOPICS
ActionScript
8.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 11, 2012 Jan 11, 2012

you're welcome.

Translate
Community Expert ,
Jan 08, 2012 Jan 08, 2012

if you publish for flash player 8 or better you can use the externalinterface class.  otherwise, you have to use getURL().

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 08, 2012 Jan 08, 2012

Hi

Thanks so much. Since you made the post I have been looking at some getURL() examples of doing the same as externalinterface but there is no

exact one that is suitable for working it in this circumstance.

So how can:

import flash.External.ExternalInterface;

ExternalInterface.addCallback("sendToActionScript", playFLV);

function playFLV(flv):Void{

myVid.contentPath=flv;

myVid.play();

}

using getUrl() playing video instantly.

Thanks so much.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 08, 2012 Jan 08, 2012

you're correct.  you can use getURL to communicate from actionscript to javascript but not vice-versa.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 08, 2012 Jan 08, 2012

Oh Okay.

So what option do I have? How can I manually publish high than flashplayer version 6 . Is there a way to manually change the version

after flash is published? Its weird I used the publish settings to publish flashplayer 12 but in the html it show some thing like

version 6. I am using dreamweaver after publishing.

Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 08, 2012 Jan 08, 2012

what version of the flash program are you using?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 08, 2012 Jan 08, 2012

Hi

Flash CS5 with actionscript 2. On old laptop.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 08, 2012 Jan 08, 2012

if you have cs5 why don't you publish for fp 8 or better??

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 09, 2012 Jan 09, 2012

Hi

Finally got it to fp8.

Check: http://www.expishare.com/interactive/JQplay.htm

if you click play below the player the vid should play. But no luck.

teleme.flv is in the same folder and actionscript same. Constantly trying  other things.

Any idea will be appreciated.

Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 11, 2012 Jan 11, 2012

Hi again

I just needed your assistance on a solution that works for text but needs modifiication to enable video.The solution uses Flashvars:

2 php variables are passed to swf and displayed on textfield.

<?php

$id = "monito";

$code = "teleme.flv";

?>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>AS3</title>

<script language="javascript">AC_FL_RunContent = 0;</script>

<script src="AC_RunActiveContent.js" language="javascript"></script>

</head>

<body bgcolor="#333333">

<!--url's used in the movie-->

<!--text used in the movie-->

<!-- saved from url=(0013)about:internet -->

<script language="javascript">

    if (AC_FL_RunContent == 0) {

        alert("This page requires AC_RunActiveContent.js.");

    } else {

        AC_FL_RunContent(

            'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',

            'width', '500',

            'height', '500',

            'src', 'AS3_php_Var_into_flash',

            'FlashVars', 'itemID=<?php print "$id"; ?>&itemCode=<?php print "$code"; ?>',           

            'quality', 'high',

            'pluginspage', 'http://www.macromedia.com/go/getflashplayer',

            'align', 'middle',

            'play', 'true',

            'loop', 'true',

            'scale', 'showall',

            'wmode', 'window',

            'devicefont', 'false',

            'id', 'AS3_php_Var_into_flash',

            'bgcolor', '#ffffff',

            'name', 'AS3_php_2_Var_into_flash',

            'menu', 'true',

            'allowFullScreen', 'false',

            'allowScriptAccess','sameDomain',

            'movie', 'AS3_php_2_Var_into_flash',

            'salign', ''

            ); //end AC code

    }

</script>

<noscript>

    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="500" height="500" id="AS3_php_Var_into_flash" align="middle">

    <param name="allowScriptAccess" value="sameDomain" />

    <param name="allowFullScreen" value="false" />

    <param name="movie" value="AS3_php_2_Var_into_flash.swf" />

    <param name="quality" value="high" />

    <param name="bgcolor" value="#ffffff" />   

    <param name="FlashVars" value="itemID=<?php print "$id"; ?>&itemCode=<?php print "$code"; ?>">

    <embed src="AS3_php_2_Var_into_flash.swf" FlashVars="itemID=<?php print "$id"; ?>&itemCode=<?php print "$code"; ?>" quality="high" bgcolor="#ffffff" width="400" height="150" name="AS3_php_2_Var_into_flash" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />

    </object>

</noscript>

</body>

</html>

Can you help me with actionscript 3 or 2 to grab the 2 variables and play them in a video playback component instance name Myvid

The current actionscript reads the variables and displays them on textfield: this code:

// Claim the offset Number that spaces the text

// fields so they are not right on top of each other

var offSet:Number = 32;

// Claim keyStr variable as a string

var keyStr:String;

// Claim valueStr variable as a string

var valueStr:String;

// Create the paramObj Object and set it to load parameters

// from the root level being sent in by FlashVars externally

var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;

// Set Text Format Object, its attributes and values

var format:TextFormat = new TextFormat();

      format.font = "Verdana";

      format.size = 24;

// Create the loop that iterates over all of the variables you send in using FlashVars    

for (keyStr in paramObj) {  

      

       valueStr = String(paramObj[keyStr]);      // This line gets the values of each variable sent in

       var myText:TextField = new TextField(); // Create a text field to read and access each var

       myText.defaultTextFormat = format; // Set the formatting into the text field properties

       myText.text = keyStr + " value is: " + valueStr; // Use the vars here, I place into text field waiting

       myText.y = offSet; // Before we place each text field on stage we offSet it

       myText.width = 450; // Set the width of the text field

      

       this.addChild(myText); // Now this line actually places the text field on stage

       offSet += offSet; // Offset offSet(lol) so the next text field is 32 pixels lower

         

}

I am trying to change that so the variable is used to play the pass video url into the videoplay name Myvid.

Thanks.

I am still working and modifying past code mite have a break through soon.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2012 Jan 11, 2012

use:

myVid.content=paramObj.itemCode;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 11, 2012 Jan 11, 2012

Hi kglad

Thanks so much again. You a champ.

Just tried: myVid.content=paramObj.itemCode;

This is the error.

Scene 1, Layer 'code AS3', Frame 1, Line 311119: Access of possibly undefined property content through a reference with static type fl.video:FLVPlayback.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2012 Jan 11, 2012

my errror.  that should be:

myVid.source=paramObj.itemCode;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 11, 2012 Jan 11, 2012

WOW

Finally working. you the best.

Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 11, 2012 Jan 11, 2012

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 17, 2012 Jan 17, 2012

Hi Kglad

Sorry to bother you but I was wondering if you could assist in a post on the application forum related to this post.

http://forums.adobe.com/message/4142934#4142934

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 17, 2012 Jan 17, 2012
LATEST

i answered but i'm sure you'll have more questions and i don't follow the dreamweaver forum so, if you have more questions, and you want me to respond, post in this forum.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines