ActionScript 3.0 :: Scale Video Using OnMetaData?

Jul 14, 2010

Im just a few week into AS and scripting in general so Im not sure why what I've got is working.

I want to create a scaling video that is full screen - from scratch.
I later want to dynamically load a graphic and tile it over the video - I've done that here

I was at the point that the video I was loading would only resize to the stage when the stage Event.RESIZE fired. I need the video scaled when it loads - so my approach was to try and do something with the onMetaData height and width values. I was going to create a function which returned the proportionally scaled native values back to Video(). However I'm not savvy enough to know how to get those values back into the playVideo function.

Along the way I stumbled on something that seems to work - but I dont really undersand why! - or if its 'best practice'.

Code:

import flash.net.URLRequest;
import flash.events.Event;
//variables

[Code].....

Im trying to take on board around methods, objects, callback functions and how to create variables that are more then a known values.

I honestly need a video of some guy with a chalk board drawing arrows to demonstrate how all these things connect

View 7 Replies


Similar Posts:


ActionScript 3.0 :: OnMetaData Video Progress Bar?

Apr 2, 2010

I've been following a couple of tutorials on making a custom video player and they all use the onMetaData event of the NetStream class to get the duration of the video. I always get this error though ns.onMetaData = function(obj:Object){1119: Access of possibly undefined property onMetaData through a reference with static type flash.net:NetStream.Here's what I have, sorry about the commented stuff I've been trying different things:

Code:
import flash.media.Video;
import flash.net.NetStream;

[code]....

View 3 Replies

ActionScript 3.0 :: Interactive Video With Hotspots, But Video Can Scale?

Feb 1, 2009

basically i got this video i need to make interactive, where the user will be able to click on hotspots in a video as it scales -- any possible ideas or directions?

The idea i got is if i know my hotspot is initially at x:700 y:300, and the video scales, i just move it over by that much of a factor -- from what my current resolution was to my new resolution?

View 3 Replies

ActionScript 3.0 :: Video Scale Up And Down At Run Time?

May 26, 2011

basic coding plan for scaling up and down the video at run time when I open a digital scrap book.The idea is very simple.. I have a Digital Interactive scrap book which will flip to the page which has the event housed on that page and will show a Thumbnail of the event. In the meantime the Loader will keep loading the movie file and show a progress bar. Once when the loader is done with, I want the Video to scale up to the size of the Stage and then play the video and once the file has reached the end it should scale down the video and go back to the Index page-the home page whioch started this..

View 1 Replies

ActionScript 3.0 :: Scale A NetStream Video?

Jun 23, 2010

It's a simple video player that opens a netStream which setups a client callback object onMetaData.The size is off when video is scaled.Example 1:

ActionScript Code:
trace("width: " + data.width, "height: " + data.height);
if(data.height > 240)

[code].....

View 0 Replies

Flash :: Scale An Embedded Video And Not Crop It?

Oct 30, 2010

I have embedded a flash video on my website. [URL]...I am having the problem that it seems to rescale fine in Firefox on the Mac, but in Firefox in Windows it just crops the video.

Here it my HTML
<object width="650" height="500">
<param name="movie" value="How To Add A Location">
<embed src="http://www.fribblesoft.com/zs-content/How_To_Add_A_Location.swf"
width="650"

[Code]...

View 2 Replies

ActionScript 3.0 :: Fullscreen Video But Control Bar Does Not Scale

Jul 1, 2009

I'm not using flvplayback. I'm using a simple video player that has a pause button on top of it. I want the pause button to just look exactly the same. I've got a ton of other elements on the site, but I just want the video to go fullscreen and the pausebutton to stay the same size...

View 2 Replies

Flash :: Deal With Late OnMetaData In IE?

Apr 7, 2010

I am trying to dynamically resize an flv playing back in a flash player. To do this, I need to get the flv's width/height so I can maintain the original aspect ratio. I have noticed that in Firefox the onMetaData event will be hit right away, and the video will resize properly. In IE however, onMetaData is not hit until the buffer is full and video starts playing.

One solution I have thought of is to set the initial buffer to something close to 0 (e.g. 0.01). Then the buffer will instantly hit full, and the video will be resized. The issue I have with this is low bandwidth users will have a a short 'sputter' of video (0.5 seconds say) at the beginning before it goes to the next, larger, buffer. Is there any better way to deal with this behavior in IE? Can you manually "get" the metaData from an FLV file before it even plays?

View 1 Replies

ActionScript 3.0 :: Can't Create Property OnMetaData

May 27, 2010

I'm puling in a FLV via a NetConnection (NetStream), and I've got it all working well EXCEPT for the scrubber. Here's the code I'm using for the scrubber[code]...

View 5 Replies

Actionscript 3.0 :: Cannot Create Property OnMetaData?

May 27, 2010

I'm puling in a FLV via a NetConnection (NetStream), and I've got it all working well EXCEPT for the scrubber. Here's the code I'm using for the scrubber:

****
//Scrubber
var videoInterval = setInterval(videoStatus,100);
var amountLoaded:Number;[code]....

View 1 Replies

ActionScript 2.0 :: Ns.onMetaData Within Class Function?

Apr 3, 2008

I am trying this function in a class, but i can only trace duration A and not duration B

Code:
public function playVideo():Void {
if(!isStarted) {

[code].....

View 4 Replies

ActionScript 2.0 :: Embedded Video Color To Gray Scale?

Mar 6, 2008

Is there a way to make an embedded video within flash gray scale rather than color?

View 9 Replies

ActionScript 3.0 :: OnMetaData Gets Triggered Multiple Times?

Nov 8, 2010

I have a class set up that should just spit back the duration of a loaded video file. It works, but my onMetaData handler seems to get triggered twice, even though I can only see one place that should trigger it:

Code:
public function PENetConnection (obj:Object=null)
{

[code]....

View 1 Replies

Media Server :: OnMetaData Properties Missing When Playback With HDS

Oct 13, 2011

Currently we have updated to FMS4.5 and doing some evaluation on HDS. We published our RTMP streams to the livepkgr application and successfully setup and playback HDS. However, we found that a we can't access some onMetaData Properties during playback. Our player use onMetaData - "videodatarate" and "audiodatarate" properties. We are trying to migrate it to playback HDS, however, we don't seems to be able to get back the two fields?

View 7 Replies

ActionScript 3.0 :: Why OnMetaData Handler Doesn't Be Called When Playing Some .flv

Dec 20, 2011

I am using NetStream to play some .flv files on local disc. My code skeleton is:

public class AdvertisPanel extends MovieClip
{
private var _video:Video;
private var _connection:NetConnection;

[Code].....

I used some .flv files that I download from YouTube to test; and I found that the handler metaDataListener would not be called when playing some .flv files, but some would. Is the problem caused by the video file? Because I may resize the video before play it on the screen, and I really need to know its original width & height.

View 3 Replies

ActionScript 3.0 :: FLVPlayback Fail To Invoke CallBack OnMetaData

Mar 24, 2008

i'm using FLVPlayback in order to load a movie. i keep getting this error: Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetStream was unable to invoke callback onMetaData. error=ReferenceError: Error #1069: Property duration not found on Number and there is no default value.

if i get it right, it means that inside built-in onMetaData there is no duration property. so, i tried adding my own call back function:

//creating a custom client
var customClient:Object = new Object();
customClient.onCuePoint = cuePointHandler;

[Code]....

View 8 Replies

ActionScript 3.0 :: Why Is NetStream.onMetaData A 'callback Function' And Not An Event

Nov 5, 2009

I rarely use NetStream or any video in my projects, but someone I email with was wondering this, and I have no earthly idea.

Is there any reason why the NetStream's "onMetaData" event cannot be listened to using addEventListener, but instead requires you to use a callback function?

Is it faster, avoiding the overhead of events? Is it to prevent more than one listener being attached?

View 2 Replies

Media Server :: FLASH Video Conference Large Scale Over 100k Simultaneous Connections

Mar 1, 2010

I am involved in project managment for a large video conferncing project involving over 100k simultanous connection and most likely to be increased 4 times by next six months.While figuring out the scalability area ,it was concluded that smart selection of hardware and origin-edge clustering will be suited most. Well while studying this documentation says it supports thousands of calls but unfortunately I could not determine the actual numbers. Can you tell me how many edge server will be needed for 100k simultanous calls/number of sessions per edge server and will we need license (4500$) for each edge server?

View 2 Replies

Flash :: Finding The Correct Scale Value Within A Scaled Object To Maintain The Aspect Ratio Of A Video

Jan 20, 2010

I have a video inside of another movieclip. When I go full screen, I scale up the outer movieclip to fit the screen. So that OuterMovieClip.width is equal to screenWidth etc. How do I maintain the aspect ratio on my video so it does not get distorted? Whats the proper math for that?

View 1 Replies

ActionScript 2.0 :: Expand To 100% Width / Height To Have Certain Elements Within Video / Maintain Inherent Size And Not Scale ?

Nov 5, 2008

Is there anyway (with action scripting) when having a Flash Video set to Expand to 100% Width and Height to have certain elements within that video maintain their inherent size and not scale ?URL...Notice how the BG Scales, but the video in the center does not nor does the footer. Is this performed with CSS and using multiple DIVs with varying Z Indices.

View 4 Replies

ActionScript 2.0 :: Rolledover Clip To Scale Up And All The Others To Scale Down And Blur?

Mar 8, 2007

Scenario: main moveiclip with 4 other clips in it. I want the rolledover clip to scale up and all the others to scale down and blur.

Question: What is the most effiecent way to code this. Would it be a "for in loop"? I am trying to minimize the code and would rather not use a whole bunch of if then statements.

View 3 Replies

IDE :: Flash Content To Scale When Scale Browser Window?

Feb 19, 2010

I want my flash content to scale when I scale my browser window.

View 5 Replies

ActionScript 2.0 :: Initialize X Scale And Y Scale Into Percentages?

Jan 14, 2006

How can I convert the current scale of the instance to 100% so I can easily "visualize" and manage the instance when I modify its scale? Here's the actionscript, it works, but I just want the temp._xscale and temp._yscale to be in percentages, not real numbers.

Code:
USflag.onMouseDown = function ()
{
var temp = USflag;
onEnterFrame = function ()

[code]....

One last thing, what's the tag you have to put that is designed for boxing actionscripts? I'm suing [ code ][ /code ]

View 1 Replies

Scale A Flash Using Dreamweaver - Can't Get It To Scale

Dec 4, 2009

My Flash image will not scale.if you zoom in, it gets chopped up. if you zoom out, it has a big blank area.What should I change in order to have this Flash image scale just like the rest of the site? [URL]It is the Flash in the center.

View 1 Replies

ActionScript 3.0 :: Flash Video Sites - Add Video And Resize The Video Acoording To The Page Size

Aug 18, 2011

Recently i have visited so many video enriched flash site like this one [URL] Most of them shows video in full size. I downloaded the video using FF plugin. Video framesize is very small compared to the stage size. When i tried to add video and resize the video acoording to the page size , it slows the browser. I tried to embed the flv inside an swf and loaded the swf using normal loader and plyed it.. but the quallity and performance comapred to these site is very low..

View 3 Replies

ActionScript 3.0 :: Video Loop - Made A Video In After Effect And Export It To Flash As A FLV Video

Dec 18, 2010

I made a video in After Effect and export it to flash as a FLV video.. and write de code to load it into flash.. but I need it to loop.. Here is the code

[Code]...

View 1 Replies

ActionScript 3.0 :: Make A Video Class So Can Put In Src And Video Dimensions To Load Up A Video

Oct 13, 2011

Im trying to make a video class so I can put in my src and video dimensions to load up a video .. I am wishing to implement this in the following way

[Code]...

View 2 Replies

Load A Video Into A Video At Certain Cue Points Along The Main Video?

May 31, 2009

I would like to load a video into a video at certain cue points along the main video.  Does anyone know how to do that?

View 20 Replies

Swf Won't Scale To Fit Div

Feb 15, 2010

I am trying to use swfobject 2.2 to display an swf, but the swf won't scale to fit the div that I'm putting it in. You can see what I've got here. When it first loads, it is the right size, then it expands larger for some reason. If I right-click on the movie and select "Show All", it then fits perfectly.[code]

View 5 Replies

AS2 :: Scale Objects With It?

Sep 7, 2010

I have a purple box on the stage. I turned this box into a movie clip with the instance name of "purple." onEnterFrame, I want to increase the wdith of that box. It is currently 11.75px. I want it to ease into 40px. I want this to happen onEnterFrame.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved