Difficulty using hardcoded swf file to display flv files

Hi,
I have created a swf player using the flvplayback component to display flv files. The document in flash is 275 pixels wide by 130px pixels long. I also have my video component (flyPlayBack) set at 275px by 100px to display the playback controls. My flash code is my simple like the following
import fl.video.*;
var myflashvars:Object = new Object();
myflashvars = this.loaderInfo.parameters;
var fullVideoPath:String = "";
for (var item:String in myflashvars)
    if(item == "filename")
        fullVideoPath = myflashvars[item];
videoPlayer.source = fullVideoPath;
So using the above it should play the video and does.
(1) First question is I tried playing 2 different videos in my html code.
<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0' width='275' height='130'>
<param name='allowFullScreen' value='true' />
<param name='movie' value='moviePlayer.swf' />
<param name='wmode' value='window' />
<param name='scale' value='showall' />
<param name='flashvars' value='filename=sample_sorenson2.flv' />
<embed width='275' height='130' allowFullScreen='true' type='application/x-shockwave-flash' src='moviePlayer.swf' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='window' scale='showall' flashvars='filename=sample_sorenson2.flv' />
</object>
Just like above works fine. But I tried playing 2 different videos, the first video image is below
The second video image is below
I notice the video sizes are different but not the video player size, is this to do a thing called aspect ratio? Is it possible to change this using my simple actionscript code above?
(2) I also tried the full screen button but the video only takes up part of the screen, as shown below. sorry about image size.
Is this a common occurance, is there a way to access the buttons on the flyplayback instance using actionscript and overridding the behaviour? Any advice upon my current situation would be much appreciated. Thanks.

To me the first two screen shots look like you set the wrong aspect ratio/screen size. I don't see any scaling of the player at all... only black bars on sides because the video didn't fill the entire video player display.
And yes, there is a much more powerful and versatile means of displaying Flash video, called NetStream. You can design your own player and have better control over the display. I always use NetStream rather than the FLVPlayback.
But if you are having sizing issues introduced during the creation of the video... then the player itself is not necessarily going to fix that. You need to know the correct display size and aspect ratio for each video you plan to display.
However, you can somewhat adjust the display size for each video using some actionscript... as you see here:
http://www.cataractvideo.com/cv/physicians/cataract_surgery.html
an example of a larger (high brandwidth) version and a smaller (lower bandwidth) version... depending on which button you click.
More on NetStream:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.htm l
Here is a great tutorial on building your own NetStream video player:
http://gotoandlearn.com/
scroll to the very bottom of the page "Video Basics"
Best of luck!
Adninjastrator

Similar Messages

  • How to use an SWF file generated by Flex as a Stand Alone file

    Whenever we compile an MXML file, there is an SWF file
    generated. This file is not a standalone file and will not work on
    any other computer expect on the computer where there is a Project
    file created by the Flex builder.
    Why am I not able to use that SWF file as a stand alone file?
    If I want to use that SWF file alone as in the SWF generated
    by Flash what do I have to do?
    Regards,
    Rashmi

    The swf file will run from anywhere. What's it doing when you
    try to open it on another machine?
    The only thing I can think of is if you're getting a security
    violation in which case you would need to read about Flash Player
    trust files and security.
    -Mac

  • Using a swf file as a wallpaper - E51

    I have a nice swf file which is a clock with date - on an S40 phone I can install the swf file as a wallpaper, anyone know how i can install it as a wallpaper on the S60 E50? - its in a folder where I can play the swf file and it plays Fine but under options there is nothing to say "use as walpaper"  - can anyone help please?
    Many thanks,
    Andy.

    1) I also think it's much better to keep your images separate from your XML, this prevents a lot of in case you just want to read XML data
    2) What's exactly going wrong here? For the project.xml, make sure it's not inside a directory within the JAR file, or else the variable i will be null. Otherwise it looks fine..

  • When I reload an HTM page using a SWF file like a   menu, the HTML page doesn't shows the SWF again!

    Dear Sirs,
    I hope to be directing my question into the correct forum's place.
    I'm new in flash and I'm trying to make some tests
    My problem is the following:
    I included one SWF file into 3 HTM pages.
    This SWF works as a little menu.
    The SWF file (named "menu.swf") contains 3 items working as command buttons to access the three different HTM pages
    Each HTM page contains the same "menu.SWF" file, some HTML text and one picture.
    The swf contains:
    Button 1 -> calls page1.htm using:
                on (press) {
                getURL("./page1.htm", "_top");
    Button 2 -> calls page2.htm using:
                on (press) {
                getURL("./page2.htm", "_top");
    Button 3 -> calls page3.htm using:
                on (press) {
                getURL("./page3.htm", "_top");
    When I enter to "page1.htm" it appears correctly showing the swf file and all the HTML text.
    It is OK.
    But when I'm in "page1.htm" and I click on "Button1" (to reload "page1.htm") the only thing that I can see (after reloading page1) is the HTML text and the picture, but I cannot view the "menu.swf" file.
    "menu.swf" remains in its place, but "invisible".
    You can click on its command buttons, but anytime I click on the button that loads the same page (for example: "Button 1" to reload "page1.htm") the
    swf file(s) doesn't appears.
    The same thing happens when I'm in page 2 with Button 2 to reload page2 .htm, and so on.
    How can I do to solve this problem?
    Sorry for my not good english but I'm spanish speaker.
    Thank you!
    Gus

    The path in the buttons is not correct once you navigate to the htm page.
    So here you are on the landing page and the menu button says to get to "page1.htm" go up one folder level  (../) to the file page1.htm.
    Now once you are up one level, either you loose access to the .swf because from that page the path to the .swf is not correct, or if the .swf does show, then the path in the buttons back to the other pages is not correct, because you are now one folder level higher.
    If I am mis-reading your post and all pages are in the same folder, then remove the "../" part before the page name in the URL. Or perhaps you are using ./ to denote the current directory... I'd still suggest removing it. So the the getURL would look like this :
    getURL("page1.htm", "_top");
    if all pages are in the same folder.
    And if I am reading your post correctly, then you cannot use the same button URL to get to ("./page1.htm", "_top"); and once on page1.htm use that same URL to get back down to your landing page.
    So I'd say it's a pathing problem.
    Give that a try and see if it helps.
    Best wishes,
    Adninjastrator

  • Can you use a swf file like a background image

    The header has a css background image and the spry menu bar
    lays over it. Is it possible to attach a swf file as the background
    image in css or even in html?
    Maybe as a background-attachment somehow? Or simply in the
    html code?
    I am using CS4 but I believe the website was created with
    CS2.

    I don't know anyone, that knows what they are doing, that uses flash for websites anymore
    There are a few holdover gaming sites that still use it, but even those guys are making the move to JavaScript, HTML5 and CSS3.  
    @bretC,
    There are far too many people using mobile & tablet devices that don't support Flash (iOS, Android, Blackberry, etc...)  It's not good business to ignore those people.
    In terms of alternative technologies, look at HTML5, CSS3 and JavaScript animations made with Edge Animate.  These are well supported on all modern devices.  Edge Animate is part of the Creative Cloud plan.  Products | Edge Animate | Adobe TV
    Nancy O.

  • How to use a swf file in java

    plz any body tell me about this
    that how to use SWF in java (JFrame)

    I suggest you look in google http://www.google.co.uk/search?q=SWF+java

  • Using a container to load several swf files and play them

    I need some help. I want to use several swf files and have them be called upon in a container file and play them in sequence. It's a presentation that needs to play thru but still have the ability to stop, click on items, open a popup and then continue on in the presentation. I am building all the individual "chapters" and their "sub-chapters" as swf files, with the hope that I can load them in order. I am relatively new to AS3. Help?

    If you will be loading swf files into a container then you will use the Loader class to accomplish that, so give that a looking over in the help documents and see what you can do.  If you have a problem getting it to work, post your code and describe what you have done.

  • Using SWF file globally

    I have an xcelsius model where I want export the model as  swf . As I am using xcelsius locally when I export to  SWF it generates  a link on my desktop where I can only use it , how can I make it global so that when I send the swf file by email every one can access it.
    Thanks

    Hi Sany,
    You can use your swf file globally without any issue and modification if the swf is based on static data.
    By static data I mean based on standalone excel sheet and which does not have any live data connection.
    Incase you have live data connection, you will need to publish it to some server where others users have rights to view it.
    Please let me  know if you have further queries.
    Thanks,
    Amit.

  • Sandbox violation using swf files in applicationStorageDirectory

    I want to use an swf file as the source to an mx:Image which I then want to drag around.
    The swf file is in the applicationStorageDirectory.
    The swf file loads and appears on the screen. I click on the image and get:
    *** Security Sandbox Violation ***
    SecurityDomain 'app-storage:/project1/images/bg.swf' tried to access incompatible context 'app:/RAE.swf'
    How do I solve this?

    It seems that even if an swf file has no scripts in it, if any of the assets have been turned into movieClips (we're talking Flash here), then as soon as you click on them they try to reference the parent swf. The Air app interprets this as an external swf trying to script it and the Sandbox violation occurs.
    The solution to this specific problem is to put the mx:Image inside an mx:Canvas and set the mouseChildren property of the Canvas to false.

  • How to use swf file for Spark Skin

    Hi all
    I have little confuse about how to use swf file with Spark Skin,
    in Flex3 , i use Flex Skin Design Extension for Flash to deal with skin ,
    so basically , I just create a swf file and import to the project , then everything is ok
    but , seem that not working in flex4 , spark skin.
    1` I can't find the Flex Skin Design for the FlashCs4
    2` I try to use FlashCs3 version to import the skin art to the project , but seemed not working.
    3` I Google and check the Flex4 Help , seemed Spak skin need the Skin-Class , which I don't know how to use that with swf file
        what I have searched is how to use FXG , or some jpg file in that skin class, none of them are use swf file.
    so , is there any way that let user use the swf file to deal with the skin?
           is the Flex Skin Design can use in Flex4?
    Thanks

    Hello,
    I'm new to Flex, but have come to it from Flash Pro.  I'd like to know the same thing.  I think I found the answer here:
    http://www.flashallys.com/blog/spark-button-skinning-with-flash-symbols/
    However my question is now: Is this a good approach to use?
    99% of the googling I've done tells me to skin components with fxg files.  I've tried that by creating graphics and exporting from flash, but using swfs containing lots of graphics is much faster so I'd rather use that.
    The other thing I've done is to create custom components using these helpful tutorials:
    Creating component in flash:
    http://www.webkitchen.be/2008/12/12/video-tutorial-make-flex-components-with-flash-cs4/
    Dealing with Resizing with method overrides for your flash component:
    http://www.psyked.co.uk/flex/creating-flex-components-the-easy-way-for-flash-ide-converts. htm
    This allows me the flexibility of Flash Pro design with the layout, transistions, data binding etc from Flex.
    So my question is: Is this approach (skinning spark components with swfs, and using custom swc components made in flash) a bad idea for any reason?  E.g. does it create slow mobile apps?
    Cheers
    Chris

  • Dreamweaver CS5 wont loop .swf file???

    Hi there,
    I am having a problem where i am trying to get a swf file to loop. I read on another thread that there is a bug in dreamweaver and although it automatically selects the loop button in the property inspector it does not add the code. But when i correct the code it still doesn't work! here is the code i am using:
      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="400" id="FlashID" title="openingsequence">
        <param name="movie" value="1.swf" />
        <param name="quality" value="high" />
        <param name="wmode" value="opaque" />
        <param name="swfversion" value="6.0.65.0" />
        <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
        <param name="expressinstall" value="Scripts/expressInstall.swf" />
        <param name="LOOP" value="true" />
        <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="1.swf" width="550" height="400">
          <!--<![endif]-->
          <param name="quality" value="high" />
          <param name="wmode" value="opaque" />
          <param name="swfversion" value="6.0.65.0" />
          <param name="expressinstall" value="Scripts/expressInstall.swf" />
          <param name="LOOP" value="true" />
          <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
          <div>
            <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
            <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
          </div>
          <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
      </object>
    I have also read that it could be because the code for the .fla file has a <stop/> value at the end instead of the code to make it loop. I made the swf file from an mp4 in flash so ive never had the original .fla file. I have tried using a swf decompiler to get the fla file but it doesnt seem to have worked but this is a side issue...
    I really just want to figure out how to get dreamweaver to loop my swf file.
    Can someone please help me, ive spent all day trying to solve this!
    thanks,
    Matt

    Hi
    You wrote -
    I made the swf file from an mp4 in flash so ive never had the original
    .fla file. I have tried using a swf decompiler to get the fla file but
    it doesnt seem to have worked but this is a side issue...
    First welcome to the forum.
    Unfortunately without being able to edit the stop() function out of the fla file, your swf will not loop.
    You could use the html5 video element for your mp4 and if you have the original video file convert it to other formats for use in the html5 video, and then use the swf file as the fall back, this would allow your video to loop in those browsers that support this.
    There are also 3rd party players available that will allow the swf to loop without editing but these will only work on windows.
    PZ

  • Using a .swf as an HTML layer in DW CS3

    Hello,
    I am using a .swf file as a background for my site and I can get the thing to work in Firefox and Safari on the Mac, but not in IE or Opera.  It will play the .swf but in layers in on top of the content, not underneath.  What is so different about how IE and Opera view the page that Firefox and Safari do not have.  Please give a look at this link: http://www.allwickedthings.com/WT_index_test_1.html and let me know what you think.  The .css files are posted on the root directory, just check the code to find the file names.  I'm going to continue to experiment on the code and see if I can come up with something.  Also this site displays in a different way on Netscape, it just leaves the movie out altogether.
    Thanks,
    Brett

    First, run your page code through the on-line validation tools below and fix the reported errors.
    HTML Validator - http://validator.w3.org
    CSS Validator - http://jigsaw.w3.org/css-validator/
    FREE HTML & CSS Tutorials  - http://w3schools.com/
    You need a document type on your first line of HTML code.  On DW menu hit FILE > Convert and select HTML 4.01 Transitional as your doc type.  Without a doc type declaration, your pages will have undrepdictable cross browser results.
    I've never needed to use an SWF as page background, so can't be much help.  Maybe this thread from another forum will shed some light.
    http://www.kirupa.com/forum/showthread.php?t=277976
    Good luck,
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics |  Print | Media Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • Use an SWF as a Fill

    Does anybody know if it is possible to use an swf file as a fill?
    So for instance you could embed the swf file into code then use it as a fill for an object and get an animated fill?
    Or is there another way to achieve something similar?
    Thank you in advance for taking the time to read and comment.
    Jon

    Good old 1998!
    You could load the swf using SwfLoader and watch its enterFrame event.  When the frame changes, you could fill a BitmapData with it like this: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Graphics. html#beginBitmapFill().  You could use that BitmapData in a Bitmap, which could then be used for the source of an Image.
    HTH;
    Amy

  • Flash Container...to big when viewing SWF files

    I have used Flash Professional  CS5.5, to make a SWF.file, that when I save as all, it also includes a FLA file. I use this SWF file in  Dreamweaver CS5.5 , Insert , Media, to view this I have set the Parameters name .swf, . When I select Live View, all runs ok, but how do you make the Flash grey box smaller that keep the swf pictures the same size….when I change any of the widths and heights the banner sow with very small pictures.
        <!-- end .sidebar1 --></div>
    <div class="content"> <h1>
          <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="572" height="400" hspace="1" vspace="1" id="FlashID" title="banner2">
    <param name="movie" value="banner2.swf?banner2.swf=" />
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="6.0.65.0" />
    <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
            <param name="expressinstall" value="Scripts/expressInstall.swf" />
    <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
    <!--[if !IE]>-->
    <object data="banner2.swf?banner2.swf=" type="application/x-shockwave-flash" width="572" height="400" hspace="1" vspace="1">
    <!--<![endif]-->
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="6.0.65.0" />
    <param name="expressinstall" value="Scripts/expressInstall.swf" />
    <!-- The browser displays the following
    Thanks I await any reply’s…
    Email [email protected]
    I havent been able to bring the text up under this flash diolog box, always a big gap...

    Hello All,
    for me it's very interesting, 'cause Adobe makes some differences. In the German forum you are allowed to load up files too, see screenshot:
    Allowed are all file types and they are limited to 8.9 MB.
    We could send this thing to the wishform adress.
    Sincerely,
    Hans-Günter
    P.S.
    I so too can't understand why our questioner doesn't want to send a link. We're just nothing than normal users, Glen please don't worry.

  • Can't get an swf file to play

    I am working on my first flash site. I have a main site that
    uses several swf files that were created seperately. One of them is
    a menu bar that I designed outside the main site, and I imported it
    using "Import to stage". It works just as it should. I also have a
    button that I defined outside my main site, and I imported it in
    the same way.
    But now I am trying to import a slideshow that I created
    outside the main site, and it will not work. The import happens
    without error, and I can see the slideshow, but I can't get the
    move to play. This is the kind of slideshow that has thumbnails
    continuously scrolling at the bottom, so the user can pick one to
    be displayed in a larger slide above the thumbnail.
    Do I have to use a preloader instead of using "Import to
    stage"? I have seen several tutorials describing how to create a
    preloader, and I think I can do that without too much trouble. I
    would just like to know if that is NECESARRY, and that "Import to
    Stage" is limited in its capabilities in some way.
    Thanks for any advice you can give.

    I am using "this" in the slideshow files. That does not
    present the same scoping problem as "root" does, does it?
    Also, I have noticed that, with the other swf files that I
    have imported to the stage (a menu I created, for instance), the
    structure of the file remains in tact when I import it. The layers
    retain their names, the actionscript is there, etc. But, when I
    import the slideshow swf file, the layer structure is very
    different from the original swf file. And, most importantly, I
    can't find any of the actionscript that is in the original file.
    So, I must be exporting slideshow to .swf incorrectly. I have
    checked all the settings, and they appear to be the same as when I
    export the menu to .swf but, the results are very different.
    Very frustrating...

Maybe you are looking for

  • Partner application authorization model missing

    We have written our own portal using j2ee technologies. Based upon user identity, we construct a launch pad for the applications that a user has authorization to. It have 260 different applications. We want to migrate to Oracle Portal. I would like t

  • Can't get iMessage to work on iPad

    I have a problem where I'm not receiving any new iMessages on my ipad. It was working fine up until a few weeks ago

  • Ipod refuses to "update"

    i've downloaded the newest update from the web site for my ipod+video, but when i try to run the update program from itunes, i receive the message, "The ipod, "Ashle's ipod" couldn't be updated. The required file cannot be found." Where can I get the

  • Combine two FLA files

    I have two fla files that I want to combine into one file. Is it possible to import one into the other?

  • "Cursor state not valid.", AS400 JDBC, IBM JTOpen 3.0

    I am using JT400.JAR from IBM's JTOpen 3.0 release. I am running JTOpen inside of Websphere 3.5.x JDBC auto-commit is enabled. When running JDBC queries, I am observing intermittent SQL exceptions. The message that I see is "Cursor state not valid."