Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Embeded Video Gives Error Whilst Navigating



I get the following error in Safari : Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.when I click off the page that has the video embedded on it. never seen that?



Adobe > Flash General Discussion
Posted on: 07/08/2007 03:12:07 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Flash File Not Loading In Firefox Whilst Embeded Into C3 Page
Hi,

I have a cross browser problem, my issue is that I have a C# ASP.Net (2.0) website that has a master page. This master page has 3 content placeholders, one for login, second for navigation (which is also done in Flash CS4) and the third being my pages content. On this page I have an FLVPlayback and a combo box, I read in information from and xml file to populate the combo box and depending on which item is selected depends on which file to play. This all works fine in IE but the 2nd flash file fails to function correctly in Firefox (and Safari) by not loading the data into the combo box. It does work in those browsers though if I just make it a simple HTML page which leads me to think that somehow ASP is rendering it wrong but im not sure how to fix it.

Here is the code from the page Video.aspx which is where the 2nd flash file is embeded

Note: The navigation part works in all 3 browsers in ASP so I'm very confused as to why the 2nd one won't work.


Code:

<%@ Page Language="C#" MasterPageFile="../Master/Master.master" AutoEventWireup="true" CodeFile="Videos.aspx.cs" Inherits="Pages_Videos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cntContent" Runat="Server">
<div align="center">
<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="1024" height="500" id="BangBabesVideo" align="middle">
<param name="FlashVars" value="girlID=6"/>
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="BangBabesGenVideo.swf?girlID=6" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="BangBabesGenVideo.swf?girlID=6" quality="high" bgcolor="#000000" width="1024" height="500" name="BangBabesVideo" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
</object>
</div>
</asp:Content>

How To Use Embed Code To Insert My Flash Video From Web Host Whilst Keeping My Player Buttons?
I have created a flash 8 video. It consists of the video.swf video.flv and skin.swf

When i try to embed it into a remote webpage, the video player buttons do not show.

How do i enable my webpage of flash video to show the player controls on a remote webpage using an embed code?

Navigating FLV Video
I'm currenlty working on a Flash project where I need to navigate to certain points in an FLV video. I've worked a little with FLV before, and I've worked with cuepoints to trigger other actions/events in Flash, but what I'm looking to do here is when certain events happen in Flash (could be as simple as someone clicking on a button) I need the video to jump to a certain point.

My first thought was to set actionscript cuepoints then have the events in Flash make the video go to those cuepoints, but I can't seem to find any information how to do that. All the information on cuepoints I've been able to dig up talk about using the cuepoints in the video to trigger other actions, not vice-versa.

Does anyone have experience with this? I'm sure it's something simple I am missing. I just can't put my finger on it.

Embeded Video
Hi,

Can anyone direct me to a tutotrial that covers using embeded video with Flash and how to control it? For example,play, stop, fwd and rwnd buttons—maybe even volume.

Currently, I'm importing embeded video as a movie clip and have a simple play button, but would like to give the user the option of pausing the clip at the current frame the playhead is at, and resuming play when pressed again.

Thanks.

Controlling Embeded Video :)
Hi...Whats the secret to controlling embeded video...

I have my movie clip (the embeded video) set up with an instance name just like a regular MC..

But when i call it to stop via tell target it doesnt respond...
I can see its properly named in the action script window (cause its there) so it knows about the movie but just wont control it..

Any suggestions ? Am i just being dumb ?

PS..I rock with flash 5 but am new to MX...(not that the 2 are that different, just a couple things me seems dumb on) :P

No Sound On Embeded Video?
I'm embeding a video that has an audio track! I can't get the audio to play!!! I have the image, but no sound! I did check the import Audio option when I imported the video into the library!!!
I also checked my publishing setting.... I'm putting the video dirrectly on the timeline to stream it online!
Any help is good!!!!!

Preload Embeded Video
Hi,
I'm trying to preload an embeded video in Flash MX, with a preload bar and percentage counter. Can anyone tell me how to do this?

I think I should use a code that detects the amount of bytes loaded but I don't know how to write the code.

Thanks

Embeded Video Problem
Hello folks,
I had created 3 Scenes, each one representing one web page for my website. Those Scenes are actually Movie Clip Symbols. Within one of them I have an Embeded video clip (120 frames). When I put those Symbols on main Stage as 3 frames,(each of one for one web page) everything works fine. Except the fact that when I go to page with the video clip, that video is looping. Page itself stops fine like it should. But that clip never stops, even though I assigned "Stop" Action Script to it.
Any idea, what I do wrong? Thanks for any input or suggestions.
Bergg





























Edited: 01/10/2007 at 12:22:46 PM by Bergg

Embeded Video Clip
Hello folks,
I would like embed a video of about 270 frames onto my webpage. I used a Quicktime file which had no compression on it and was perfectly sharp. I imported it to Flash with settings: 150 keyframes, bandwidth on maximum and quality 100. When I had placed it on stage it looks like crap. Quality is gone, specially parts when video is fast, like whitewater kayaking. Is there any trick how to keep the original quality of the video? Mabye in settings , or make it into different format than quick time, etc. Thank you so much for any advice or input.
Jaroush





























Edited: 02/05/2007 at 08:37:31 AM by Jaroush

Quality Of Embeded MOV Video
Hi There,

I have a some video as a mov format. It is saved in perfect quality, see picture 1 pls. When i eported it to flash into my swf project = the quality of video-pictures is VERY bad see picture 2.: HOW can i get the quality such as in the original movie ? Thanx for any answer.picture1-flv original mov-video

certainly i try to change a bitrate.. but without any effects. For ilustration, origial mov video has abot 4MB, flv output has about 350KB but quality is bad. What can (must) i do to better quality of video materials ? (eventually to get original mov quality), please help me :)

Cuepoint Embeded In Video Itself
just wondering will my FLV sizes increase if i were to embed my cuepoint together compared to using actionscript cuepoint? I understand that actionscript cuepoint tend to have slight delay and to me accurancy is very important so i have to embed them instead.

Embeded Video Problem
Hello folks,
I had created 3 Scenes, each one representing one web page for my website. Those Scenes are actually Movie Clip Symbols. Within one of them I have an Embeded video clip (120 frames). When I put those Symbols on main Stage as 3 frames,(each of one for one web page) everything works fine. Except the fact that when I go to page with the video clip, that video is looping. Page itself stops fine like it should. But that clip never stops, even though I assigned "Stop" Action Script to it.
Any idea, what I do wrong? Thanks for any input or suggestions.
Bergg

Detecting End Of Embeded Video
Hi - I'm new to working with flash so sorry if this is a real easy question. I've been trying to piece this together myself through the help files but I'm having no luck in getting it to work.

I have a .flv file in one frame of my timeline. What I want to do is have the video play (while the timeline stops and waits) and then at the end of it go to the next frame.

Thanks for any help or direction with this.

Kevin

Playing Embeded Video
New or not, I've never understood programming. Flash is my first (semi) real attempt at actual -programming. I have been through the tutorials, and am still having troubles *I think*. What I wanted: To click on a button in the top level of the screen, in the middle -a sub menu with opening animation and additional animation for the sub menu. Similar to 2advanced.com, click on the top menu, the middle screen opens a new animation with new menu. What I've done: on main page one: added a stop(); event (frame 1). In (frame 2) I've inserted a keyframe for the mainpage to display again, added a second layer, embedded my animation in the location I want it. Back in (frame 1), on my navigational button I've added:

on(release) {
gotoAndPlay (2);
}

During test, this works. However, I am so new, I don't know if this is the 'right' way to do this, or I am going the long route. In the end, I will have -5- navigational buttons in (frame 1) that will have to refer to -5- different frames (ie, 2, 3, 4, 5, 6) and in each frame will be an embedded video clip (without the next one continuing over -

video 2 layer: - - 3
video 1 layer: - 2 -
main layer: 1 1 1

does that make sense? Any helps, thoughts or input would be awesome! Thanks

Embeded Video And Preloading...
Hi!

I have a quicktime video, 3mb or so in size. I can import it into Flash and it puts it on the timeline with about 300 frames. So I save this as a SWF.

So in another movie I want to load this SWF in... but I want it to stream if possible. How can I get this movie SWF to stream in and play when enough of the video is loaded so the user can watch the video and load the rest without any breaks or pauses in the video due to not enough of the file loaded?

Does that make sense?
Is that possible?

Thanks.

DryCow

Embedding Video In An Embeded SWF
Hello people. I'm building a site with a flip book component. The book is a movie and then I load the pages via an XML file. The pages are SWF files. You can see the book at http://www.thiez.com/evf/main.htm
Now, If I add a video on a particular page by embedding it in the flash movie, I will be able to see it when I test that particular page, but it wont show when I test the whole book. So basically, my problem is: the video shows ok in the file where it is embedded but not in the main SWF file that calls the SWF file containing the video. Any idea will be appreciated.

Playing Embeded Video
New or not, I've never understood programming. Flash is my first (semi) real attempt at actual -programming. I have been through the tutorials, and am still having troubles *I think*. What I wanted: To click on a button in the top level of the screen, in the middle -a sub menu with opening animation and additional animation for the sub menu. Similar to 2advanced.com, click on the top menu, the middle screen opens a new animation with new menu. What I've done: on main page one: added a stop(); event (frame 1). In (frame 2) I've inserted a keyframe for the mainpage to display again, added a second layer, embedded my animation in the location I want it. Back in (frame 1), on my navigational button I've added:

on(release) {
gotoAndPlay (2);
}

During test, this works. However, I am so new, I don't know if this is the 'right' way to do this, or I am going the long route. In the end, I will have -5- navigational buttons in (frame 1) that will have to refer to -5- different frames (ie, 2, 3, 4, 5, 6) and in each frame will be an embedded video clip (without the next one continuing over -

video 2 layer: - - 3
video 1 layer: - 2 -
main layer: 1 1 1

does that make sense? Any helps, thoughts or input would be awesome! Thanks

Embeded Video And Preloading...
Hi!

I have a quicktime video, 3mb or so in size. I can import it into Flash and it puts it on the timeline with about 300 frames. So I save this as a SWF.

So in another movie I want to load this SWF in... but I want it to stream if possible. How can I get this movie SWF to stream in and play when enough of the video is loaded so the user can watch the video and load the rest without any breaks or pauses in the video due to not enough of the file loaded?

Does that make sense?
Is that possible?

Thanks.

DryCow

Custom Controls For Embeded Video
Hi All
I have a movie I need to have a video embeded. No external flv files. I am trying to figure the best way to do this and have video controls. the video can be in a mc. I would like cusom controls but cant seem to find any functions for that sort of thing. I have not been able to make the component video controls work with imported embeded video so I think I have to write my own. Any help would be great.

thanx
dave

Increase Volume Of Embeded Video
Hey Guys I am embedding some video wiht sounds into our flash. Although some clips are louder than others. Is there a way we can increase or decrease the volume of each video? - don't need this to veriable just we set it once and it remains like that.

I'm pretty sure I've done this before but I can't find it for the life of me now. (although it might have been sound clips only)

Any ideas guys - thanx

Embeded Video Plays Slowly
I have imported an FLV and chosen the "Embed video in SWF and play in timeline" option. Looks fine, but it plays more slowly than the original video--about 20% slower I would guess. I cannot find a reason or way around this. Any guesses?

Swf Has Jittery Playback With Embeded Video
Check out my test page at http://www.imirocks.com/IMIRocksHome.html

In my main movie, I had three loaded movie that are swfs. Each swf has an embedded movie in it. The sizes of the movies are about 636KB. When the movies play all together the movements are jittery. I would like to play each movie without the jitters.

Another issue is the browser says it's still loading the main html, the main html is about 50KB? That should load pretty fast? What else could it possibly be loading?

Control Sound For Embeded Video
hello!

is there any way to control the sound of an embeded video? i only need a on/off button.

i can turn it off with stopAllSounds(), but i haven't figured out a way to turn it back on.

i really need to use embeded video because i have to banners that i need to sinchronize... there's no way i can do this with streaming...

thanks

Stopping Video Play Back When Navigating Away
So on a mouse click I have a movie clip load (a video page) within the movie clip is a UILoader. The UILoader contains a XML video player. The problem I am encoutering is when navigating away from the video page containing the UILoader, the audio form any playing video is still heard. I've read many posts on many forums about similar situations but nothing has helped.

Any help would be great.

Embeded Flash Video Won't Show Skin...
I'm using this HTML code to display the Flash video on my website...

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="

No Dynamic Text Over Video Embeded In Layer?
I have Flash CS3 Mac. I have embeded a video in a movie clip and I can't seem to get dynamic text to show on any layers over it. Everything else works. I have animated clips, static text, etc. but no dynamic text. Is this a bug or am I missing something?

Embeded FLV Video Doesn't Play When Swf Is Loaded
Hello again. My last question was answered and I can now navigate back and forth between my parent page and the swf page I open in a content loader movie. However the flv files that I have placed in the swf don't play when that swf is opened in the content loader.

Here is waht I am using on my parent page to open the DVD page in the loader

dvds.onRelease = function(){
cloader_mc.loadMovie("dvds/dvds.swf");
}

On the DVD page, I am then using this code to open up the swf with the video file in that same loader.

playtestimonial.onRelease = function(){
_root.cloader_mc.loadMovie("dvds/ERCTestimonial.swf");
}


The swf subpage opens up fine in the loader but the video doesn't even show up. When I look at these same swf pages independently, they work fine.

Here is the link to the main page: http://erc.southern.edu
Click on the DVD link to see what I'm talking about.

Finally, here is the link to one of the subpages that works independently but not in the loader: http://erc.southern.edu/dvds/ERCTestimonial.swf


Sorry for the long post, but hope the question is clear. THANKS SOOOO MUCH for any help!

Can You Dynamically Resize Embeded Video Objects
DISREGARD THIS --- I JUST NOTICED THAT THE PROPERTIES ARE READ ONLY. SORRY



Can you resize embedded video objects dynamically. Actionscript reference says that these objects have height and width properties, but i can't seem to set them, such as:

my_video.width = 350;
my_video.height = 300;

Anyone know what the problem is, or is that just how these dudes work?

I also tried putting an interval that resized them an instant after the video was initialized - before that the dimension properties were returning 0 - but that didn't work either.

Thanks for any help.

A Button Opens A Video Clip, Embeded On A New Window
Hello folks,
I would like to achieve this: A viewer would click on a thumbnail placed on my webpage and this thumbnail would open an independent floating window (panel) with a video clip embeded on it. This window would be smaller than regular web page. I could set up any dimensions to it and create any background.
Thank you so much for any advise, but please, be patient with me as I have very little to none experience with Action Script.
Thanks
Janek

How To: Button To Open Independent Floating Pop Up Window With Embeded Video Clip
Hello folks,
I would like to achieve this: A viewer would click on a thumbnail placed on my webpage and this thumbnail would open an independent floating window with a video clip embeded on it.
Thank you so much for any advise, but please, be patient with me as I have very little to none experience with Action Script.
Thanks
Janek

Video Error?
I have a large swf with many different movie clips etc... some of them have imbedded movie files in them.

I export the file to swf from flash, then in the flash player create a projector. Whenever the projector is played it's fine, but when it comes to a video an error will always occur.

Has anyone ever came across this or have any idea of what i could do?

thanks guys

Whilst Dragging....
Hey guys,

I've built a volume slider (similar to the one in the tutorial) and i'm looking to add a function that only works whilst i am dragging the slider back and forth

(background: i'm working on a SCORM compatible player and am passing a getURL command out to javascript, that in turn is passing it to some flash content; the sound object is in the content; the slider is in the player).

sofar my attempts have failed to get this to work (i placed it onEnterFrame but this hammered the javascript!)

Any ideas?

Bomski

[F8] Error With Video Import
I am not able to import an mpeg using flash8 due to an error.....

"the source file abcdef.mpeg contains video in an unsupported format and cannot be encoded"

Runnin' win xp
I have the lastest updates for directx 9

any suggestions as to what format would work?
or how i can encodde the mpeg?

Thanks

**If all you have is a hammer, everything looks like a nail.**

Video Import Error
Every time I try to import video into Flash 8, I get an error like this: "The source file *.avi contains video in unsupported format and cannot be encoded"

The external Flash8 Encoder simply crashes on me.

Would it make a difference if this was an unlocked (activated?) downloaded trial as opposed to installation licensed version to begin with.

Error Preparing Video
hi.
I have written a Flash lite application for an N80 that plays video from a URL in 3gp format.Everything works well on the emulator but when I run it on the device i get the error message - error preparing video for playing. I copied the video file straight to the device and it plays well, so I dn't think memory space or format is an issue.
Please help. Thanks.

Video Server Error - HELP
I made my very first flash advertisement for my website, but i have no idea how to get it online. I saved the file and I can open it directly from the desktop, but when i upload it to photobucket i get the error:
FLASH VIDEO SERVER ERROR

What does that mean and why am i getting this error

Import Video With URL, Error
Hi guys, ive been trying to import a video from a other website, like youtube.com and Dailymotion.com... But i get the same Error message all the time, and ive tryed to add a .FLV to the end of the URL link but still the same mess.
http://www.junsele.com/viewpic.asp?id=80313
Then after when i try the movie this mess come up
http://www.junsele.com/viewpic.asp?id=80311

This is how i imported them
http://www.junsele.com/viewpic.asp?id=80310

I also tryed adding .FLV
http://www.junsele.com/viewpic.asp?id=80312

But the same error comes up, Please Guys help me what am i doing wrong? :,(

Btw, Im using Flash cs3 professional





























Edited: 11/28/2007 at 03:19:39 PM by Zoro5

Video Error In Netscape 7.x
Have any of you encountered errors playing video in netscape 7.x via a mx2004 published (actionscript 1) movie?

It askes for sound or no sound and for high or low bandwidth then sets a cookie and starts preloading the movie, then it plays the movie.

This process works fine for EVERY other browser, even netscape 6.x and below, also, it is not my code, i am just trying to make it work.

In netscape 7.x, the first time through, it dosent even start preloading, but on refresh, it plays fine.

Through some debugging i have found the problem lies in the player for netscape 7.x and I am working on a workaround.

I was just wondering if any of you had ever heard of this before, or weather it is just me.

[as3]Error With Video Class
When I try and use the video class in as3, I get this error:

Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetStream was unable to invoke callback onMetaData. error=ReferenceError: Error #1069: Property onMetaData not found on flash.net.NetStream and there is no default value.
at com.infinity.components::ISMPlayer$iinit()
at Timeline0_d569d4230dd2142a716fd8ed9b47926/::frame1()

Any ideas?

Video Error In Netscape 7.x
Have any of you encountered errors playing video in netscape 7.x via a mx2004 published (actionscript 1) movie?

It askes for sound or no sound and for high or low bandwidth then sets a cookie and starts preloading the movie, then it plays the movie.

This process works fine for EVERY other browser, even netscape 6.x and below, also, it is not my code, i am just trying to make it work.

In netscape 7.x, the first time through, it dosent even start preloading, but on refresh, it plays fine.

Through some debugging i have found the problem lies in the player for netscape 7.x and I am working on a workaround.

I was just wondering if any of you had ever heard of this before, or weather it is just me.

Loop Sound Whilst Key Is Down
Is it possible to have a sound play and loop whilst a key is held down?

MC Y Position Whilst Using Listener
Hi all....its been a while.

I have a mc 'menu' that is positioned via


Code:
Stage.scaleMode = "noScale";
Stage.align = "TL";
Stage.addListener(this);
this.onResize = function() {

menu._x = Math.round (Stage.width*.0);
menu._y = Math.round (Stage.height*.0);
};

this.onResize();
This position works fine, however what i want to do it use a script that when a button is pressed, the MC will move down the screen, and when pressed again, will go back to its original position.

What i have at the moment is:

Code:
Movieclip.prototype.scrollme = function(xPos) {
this._y -= (this._y-yPos)/4;
};
out = false;

menu.onEnterFrame = function() {

if (out) {

this.scrollme(20);
} else {
this.scrollme(-406);
}
};
//the arrow button actions
menu.arrowMC.arrowBut.onRelease = function() {
//check our variable
if (out) {
//set variable
out = false;
//rotate the mc that contains the arrow button
menu.arrowMC._rotation = 0;
} else {
//set variable
out = true;
//rotate the mc that contains the arrow button
menu.arrowMC._rotation = 180;
}
};
//the bounce prototype
Movieclip.prototype.elasticScale = function(targetS, accel, convert) {
this.step = this.step * accel + (targetS - this._xscale) * convert
this._xscale = this._yscale += this.step
}
//but actions
//use a for loop to reduce repetition of the code
for(i=1;i<6;i++){
theButton=_root.menu["but"+i];
//this variable stores what number button it is
theButton.thisNum=i;
theButton.onEnterFrame=function() {
//if the mouse is over the but
if (_root.menu["but"+this.thisNum].overMe) {
//call the bounce prototype
this.elasticScale(150, 0.7, 0.3)
} else {
this.elasticScale(100, 0.7, 0.3)
}
}
theButton.onRollOver=function(){
//set a variable
_root.menu["but"+this.thisNum].overMe=true;
//bring to the front
_root.menu["but"+this.thisNum].swapDepths(5000)
}
theButton.onRollOut=function(){
//set a variable
_root.menu["but"+this.thisNum].overMe=false;
}
}
The mc and the code are both on the main timeline (code above the mc). The arrow roates 180 as it should but the mc will not move down.....could this be because the mc's position is already determined by the listener?

Many thanks in advance

Animating Whilst Moving An Mc
someone help me.
for days now i've been trying to animate a ball which changes shape as it moves.
var Xspeed:Number = 0
onEnterFrame = function() {
mover()
}
function = mover() {
if(Key.isDown(Key.SPACE)) {
ball._x += Xspeed
Xspeed += 2
ball.gotoAndPlay(2)
//where 2 is the beggining of the walking loop

The problem is that it on the Key.isDown function traps the bouncing animation in the 2nd frame and moves no further. I've tried adding a boolean varialbe too it too, but it has not worked. Help.Please.

Simple Video Coding Error--what Does It Mean?
I was working my way through a simple tutorial, and hit a big roadblock.
I'm connecting 3 components to a FLVplayback component

My actions layer is below my content layer

So I code the following: (btw, I checked all the spelling)

fishvid1.playPauseButton = playpause ;
fishvid1.seekBar = seeker ;
fishvid1.backButton = back ;

I get these two error messages on the first line
Statement must appear within on/onClipEvent handler
Expected a field name after '.' operator.

There are no error message for line 3

But for line 2 I get the following error
Statement must appear within on/onClipEvent handler

Interestingly when I--- Ctrl-enter---
the buttons seem to be active but I get the following error
1000: Unable to make connection to server or to find FLV on server

In the parameters for the playback component it has the path name to the video. Am I to guess that the video must be another folder for the test movie feature to work?

And if so which folder?

Also is it a problem that the FLvideo is named video1 and the instance name is fishvid1. And I am correct to use the instance name when coding?

[F8] Video Play Button Error
Hello:

I'm encountering an error message. On the first frame of my main timeline, I've placed the following Action Script on a layer dedicated to a button designed to take people to a video/placeholder set up in a seperate swf. I have no Action Script on the instance of the button itself, (unless you consider the four stages "up, over, down, hit" a form of Action script). I have the button properly labled "ribbon_btn" in the frame label. The script I used is verbatim from pg 233, Visual Quickpro Guide Flash 8 Advanced under the chapter "Communicating With External Video"


ribbon_btn.onRelease = function() {
var myVideo_nc:NetConnection = new NetConnection();
myVideo_nc.connect(null);
var newStream_ns:NetStream = new NetStream(myVideo_nc);
busVanVideoholder_video.attachVideo(newStream_ns);
newStream_ns.play("bus van ax.flv");
};


This is the Error:

**Error** Scene=Scene 1, layer=photo buttons, frame=1:Line 1: Statement must appear within on handler
ribbon_btn.onRelease = function() {

Total ActionScript Errors: 1 Reported Errors: 1

Import Video To Flash-->Error
I have searched these forms and so far what i have gathered. I just choose "import to library" and then choose what movie i want to import to flash. Well, i can't even get this far when i choose a movie Flash gives this this error message: "One or more files were not imported because there were problems reading them." The title of that box reads Flash MX but i am using Flash MX 2004. I don't know if that has something to do with it or not.
Thanks guys for the help.

ps. i have also read several post about these in the forums, i still don't understand. Also, there isn't a tutorial in the "tuts" section, which might be a good idea if someone wants to write one. If anyone has a tutorial to point me to that would be great.

Flash 8 Video Encoding Error
I edited a video file using Windows Media Maker and saved it as .wmv file. I was trying to import the video into Flash 8 and unfortunately I get this error

The source file [filename] contains video in an unsupported format and cannot be encoded.

Well, after that I encoded from wmv to avi and mpg but the same error comes out. Not just that, every video I try to import into Flash 8, I get the same error.

Someone please give me some advice on this.
My video file is here : http://sung-siew.com/tmp/disco_ext.wmv
It's a 5 MB wmv file, any help on encoding the video to FLV or SWF is greatly appreciated.

Thanks.

Video Playback Error In Flash CS3
I just installed Flash CS3 trial when I encode the video and add it as the content for the playback parameter I lose the video but the sound is there any thoughts?

Problem Handling Video Error
Hi there,

I have a document class that loads and plays a video (see below for full code).

I'm trying to load a video that doesn't exist (e.g. Videos.flv, the correct video url is Video.flv - notice no 's'). The reason I'm trying to load a video file that doesn't exist is so I can check that the appropriate error handling kicks in and handles the error that would occur. But for some reason my error handling isn't working (specifically the function netStatusHandler())?

I'm expecting the code...
quote:connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
...to trigger the error handling function when it realises the video file doesn't exist.

But when I run the SWF I get the following error message...
quote:Error #2044: Unhandled NetStatusEvent:. level=error, code=NetStream.Play.StreamNotFound
at VideoPlayer()
...Any help would be appreciated.

Many thanks.

Kind regards,
M.









Attach Code

package
{
import flash.text.TextField;
import flash.media.Video;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.events.NetStatusEvent;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.display.StageDisplayState;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.events.NetStatusEvent;
import flash.events.SecurityErrorEvent;
import flash.events.AsyncErrorEvent;
import flash.media.SoundTransform;
import flash.geom.Rectangle;

public class VideoPlayer extends Sprite
{
private var _stream:NetStream;
private var _play:MovieClip;
private var _controls:MovieClip;
private var _video:Video;
private var _thumb:Sprite;
private var _track:Sprite;
private var _scrubbing:Boolean;
private var _playbackTime:TextField;
private var _duration:uint;
private var _SoundTransform:SoundTransform = new SoundTransform();
private var _SoundOff:TextField = new TextField;
private var _TextFormat:TextFormat = new TextFormat();

public function VideoPlayer()
{
_controls = new Controls();
_play = new Play();
_play.buttonMode = true;
_play.addEventListener(MouseEvent.CLICK, function(){
_stream.play("Videos.flv");
removeChild(_play);
addChild(_controls);
addChild(_thumb);
addChild(_track);
_controls.bFullScreen.addEventListener(MouseEvent.CLICK, toggleFullScreen);
_controls.bMuteSound.addEventListener(MouseEvent.CLICK, toggleSound);
_controls.bPlayPause.addEventListener(MouseEvent.CLICK, togglePlayback);
_controls.bPlayPause.buttonMode = true;
_thumb.addEventListener(MouseEvent.MOUSE_DOWN, oMouseDown);
_thumb.addEventListener(MouseEvent.MOUSE_UP, oMouseUp);
_thumb.buttonMode = true;
})

_video = new Video(419, 235);
_playbackTime = new TextField();
_playbackTime.autoSize = TextFieldAutoSize.LEFT;
_playbackTime.y = 100;
_playbackTime.background = true;
_playbackTime.backgroundColor = 0xFFFFFF;
_duration = 0;

var connection:NetConnection = new NetConnection();
connection.connect(null);
connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
_stream = new NetStream(connection);

var client:Object = new Object();
client.onMetaData = onMetaData;

_stream.client = client;
_stream.bufferTime = 10;
_video.attachNetStream(_stream);

_track = new Sprite();
_track.graphics.lineStyle();
_track.graphics.drawRect(0, -2.5, 100, 5);

_thumb = new Sprite();
_thumb.graphics.lineStyle( );
_thumb.graphics.beginFill(0xCC0000);
_thumb.graphics.drawRect(36, 221, 11, 11);
_thumb.graphics.endFill();

addChild(_video);
addChild(_play);
addChild(_playbackTime);

addEventListener(Event.ENTER_FRAME, oEnterFrame);
_stream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
}

private function toggleFullScreen(e:MouseEvent):void
{
stage.displayState = StageDisplayState.FULL_SCREEN;
}

private function toggleSound(e:MouseEvent):void
{
_SoundOff.text = "X";
_SoundOff.x = 347;
_SoundOff.y = 216;
_SoundOff.width = 20;
_SoundOff.height = 20;
_SoundOff.defaultTextFormat = _TextFormat;
_TextFormat.color = 0xCC0000;
_TextFormat.size = 14;
_TextFormat.font = "Arial";
_TextFormat.bold = true;
_SoundOff.setTextFormat(_TextFormat);

switch(_SoundTransform.volume)
{
case 0:
//_controls.removeChild(_SoundOff);
_SoundTransform.volume = 1;
break;

case 1:
//_controls.addChild(_SoundOff);
_SoundTransform.volume = 0;
break;
}

_stream.soundTransform = _SoundTransform;
}

private function togglePlayback(e:MouseEvent):void
{
switch(_controls.bPlayPause.currentFrame)
{
case 1:
_controls.bPlayPause.gotoAndStop(2);
break;

case 2:
_controls.bPlayPause.gotoAndStop(1);
break;
}

_stream.togglePause();
}

private function onMetaData(data:Object):void
{
_duration = data.duration;
}

private function oEnterFrame(event:Event):void
{
if(_duration > 0 && _stream.time > 0)
{
_playbackTime.text = "Playback (seconds): " + Math.round(_stream.time) + " / Duration (seconds): " + Math.round(_duration);
}

// Handle the scrubbing through the video playback
if(_duration > 0)
{
if(_scrubbing)
{
_stream.seek(_duration * _thumb.x / _track.width);
}
else
{
_thumb.x = _stream.time / _duration * _track.width;
}
}
}

private function oMouseDown(e:MouseEvent):void
{
_scrubbing = true;
var rectangle:Rectangle = new Rectangle(0, 0, _track.width, 0);
_thumb.startDrag(false, rectangle);
}

private function oMouseUp(e:MouseEvent):void
{
_scrubbing = false;
_thumb.stopDrag();
}

private function netStatusHandler(e:NetStatusEvent):void
{
switch (e.info.code)
{
case "NetStream.Seek.InvalidTime":
trace("You have seeked too far ahead, the video hasn't fully loaded yet");
_playbackTime.text = "You have seeked too far ahead, the video hasn't fully loaded yet"
break;
case "NetStream.Play.StreamNotFound":
trace("Unable to locate video");
_playbackTime.text = "Unable to locate video"
break;
}
}

private function securityErrorHandler(e:SecurityErrorEvent):void
{
trace("securityErrorHandler: " + e);
}

private function asyncErrorHandler(e:AsyncErrorEvent):void
{
trace("asyncErrorHandler; " + e);
}
}
}

Copyright © 2005-08 www.BigResource.com, All rights reserved