-
oh i think i had the file name wrong -
this should work: http://moronica.net/compton.zip
-
Senior Member
I'm using ffmpeg to convert your movie to an .flv is this acceptable?
-
Senior Member
get file off my server.....I'm almost maxed out on my uploads here.
http://privatechatnow.com/test_suite/compton.zip
-
thanks a million - will now add the code to unload the .flv when navigating away from the "game" scene and see if it works...
mark
-
still having the same problem.
if i have this code: vid.attachNetStream(null); attached to the end of the code to play the video it won't play at all...
here's what I now have:
var vid:Video = new Video(480, 320);
vid.x=231;
vid.y=457;
addChild(vid);
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
vid.attachNetStream(ns);
var listener:Object = new Object();
listener.onMetaData = function(evt:Object):void {};
ns.client = listener;
ns.play("compton.flv");
vid.attachNetStream(null);
bummin...
-
Senior Member
if i have this code: vid.attachNetStream(null); attached to the end of the code to play the video it won't play at all...
//////////////////////////////////////
/////////////////////////////////////
This is good that means it killed the video now call vid.attachNetStream(null) on button press as a test to see if it kills the video in the middle of the movie
-
tried to add it to the code which controls the buttons - in this case the music button but the .flv still plays.
here's that code
//handle events for buttons...
home.addEventListener (MouseEvent.CLICK, clickHome) ;
function clickHome (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the home button was clicked")
//go to the section clicked on...
gotoAndPlay ("home start");
}
info.addEventListener (MouseEvent.CLICK, clickInfo) ;
function clickInfo (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the info button was clicked")
//go to the section clicked on...
gotoAndPlay ("info start");
}
music.addEventListener (MouseEvent.CLICK, clickMusic) ;
function clickMusic (evtObj:MouseEvent) {
//trace shows what's happening in the output window
vid.attachNetStream(null)
trace ("the music button was clicked")
//go to the section clicked on...
gotoAndPlay ("music start");
}
game.addEventListener (MouseEvent.CLICK, clickGame) ;
function clickGame (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the game button was clicked")
//go to the section clicked on...
gotoAndPlay ("game start");
}
comic.addEventListener (MouseEvent.CLICK, clickComic) ;
function clickComic (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the comic button was clicked")
//go to the section clicked on...
gotoAndPlay ("comic start");
}
cartoon.addEventListener (MouseEvent.CLICK, clickCartoon) ;
function clickCartoon (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the cartoon button was clicked")
//go to the section clicked on...
gotoAndPlay ("cartoon start");
}
blog.addEventListener (MouseEvent.CLICK, clickBlog) ;
function clickBlog (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the blog button was clicked")
//go to the section clicked on...
var request:URLRequest = new URLRequest("http://blog.moronica.net");
navigateToURL(request, "_blank");
}
store.addEventListener (MouseEvent.CLICK, clickStore) ;
function clickStore (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the store button was clicked")
//go to the section clicked on...
var request:URLRequest = new URLRequest("http://zazzle.com/moronica");
navigateToURL(request, "_blank");
}
contact.addEventListener (MouseEvent.CLICK, clickContact) ;
function clickContact (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the contact button was clicked")
//go to the section clicked on...
var request:URLRequest = new URLRequest("mailto: info@moronica.net");
navigateToURL(request, "_self");
}
album1_btn.addEventListener (MouseEvent.CLICK, clickAlbum_btn) ;
function clickAlbum_btn (evtObj:MouseEvent):void
{
//trace shows what's happening in the output window
trace ("the album1 button was clicked")
//go to the section clicked on...
var request:URLRequest = new URLRequest("itms://itunes.apple.com/us/album/hard-rock-hyper-hero/id340648752");
navigateToURL(request, "_self");
}
album2_btn.addEventListener (MouseEvent.CLICK, clickAlbum_btn2) ;
function clickAlbum_btn2 (evtObj:MouseEvent):void
{
//trace shows what's happening in the output window
trace ("the album2 button was clicked")
//go to the section clicked on...
var request:URLRequest = new URLRequest("itms://itunes.apple.com/us/album/clowns-from-uranus/id342086511");
navigateToURL(request, "_blank");
}
album3_btn.addEventListener (MouseEvent.CLICK, clickAlbum_btn3) ;
function clickAlbum_btn3 (evtObj:MouseEvent):void
{
//trace shows what's happening in the output window
trace ("the album3 button was clicked")
//go to the section clicked on...
var request:URLRequest = new URLRequest("itms://itunes.apple.com/us/album/queen-of-the_queefs/id343693701");
navigateToURL(request, "_blank");
}
Last edited by superbooty; 06-07-2010 at 03:37 PM.
-
Senior Member
ok i'm going to look at this as though its a brand new problem.....I went in wrong direction or something .....first of all are you using a custom video player object or a prebuilt adobe video Object? tell me exactly how you built the player.
-
I think at this point I'm going to have to hire someone - I'm not a programmer really and it's causing me undue stress...
If you would like some work I'd be happy to send you the source files -
mark
-
Senior Member
send me sourece i can fix it pretty quickly not that difficult of a thing to do and i'm bored to tell you the truth.
-
that is extremely kind of you -
i'm uploading the zip right now:
http://moronica.net/home47.zip
should be finished in about 15 minutes (75 megs)
thank you so much!
mark
-
Senior Member
well i only have CS3 and was unable to open the file......if you want to save it in CS3 format and i'll download again i will.
-
no problem - here's a link to the CS3 version:
http://moronica.net/home47_cs3.zip
let me know if you have any trouble downloading it -
Its going to take another 20 minutes to upload -
it doubled in size from the CS4 version (150 megs!)...
thanks again for all your help - much appreciated.
mark
-
Senior Member
now this code definately works however there is one small problem that i need your help to resolve right now it clears the video when you click anyplace on the stage ....i did this so it could be tested.......so what event(s) takes place to stop the video?
PHP Code:
var vid:Video = new Video(480, 320);
vid.x=231;
vid.y=457;
addChild(vid);
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
vid.attachNetStream(ns);
var listener:Object = new Object();
listener.onMetaData = function(evt:Object):void {};
ns.client = listener;
ns.play("compton.flv");
stage.addEventListener(MouseEvent.CLICK,Clicks);
function Clicks(e:MouseEvent):void{
trace("clicks");
vid.attachNetStream(null);
ns.close();
vid.clear();
}
-
that's great news!
the video should clear when someone clicks on the "home", "info", "music", "comic", or "cartoon" buttons.
the "blog" and "store" buttons open new windows and the "contact" opens a mail message window so those don't need the video to stop.
the AS3 code that controls the buttons is in the first frame of the main movie in the actions layer...
hope that helps. =
mark
-
Senior Member
rather than give you the huge file back i'm just going to post the code for the buttons frame and the video frame
VIDEO
PHP Code:
var vid:Video = new Video(480, 320);
vid.x=231;
vid.y=457;
addChild(vid);
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
vid.attachNetStream(ns);
var listener:Object = new Object();
listener.onMetaData = function(evt:Object):void {};
ns.client = listener;
ns.play("compton.flv");
this.addEventListener("stopvid",Clicks);
function Clicks(e:Event):void{
trace("clicks");
vid.attachNetStream(null);
ns.close();
vid.clear();
if(vid.parent != null){
vid.parent.removeChild(vid);
}
}
BUTTONS
PHP Code:
//handle events for buttons...
home.addEventListener (MouseEvent.CLICK, clickHome) ;
function clickHome (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the home button was clicked")
//go to the section clicked on...
dispatchEvent(new Event("stopvid",false,false));
gotoAndPlay ("home start");
}
info.addEventListener (MouseEvent.CLICK, clickInfo) ;
function clickInfo (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the info button was clicked")
//go to the section clicked on...
dispatchEvent(new Event("stopvid",false,false));
gotoAndPlay ("info start");
}
music.addEventListener (MouseEvent.CLICK, clickMusic) ;
function clickMusic (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the music button was clicked")
//go to the section clicked on...
dispatchEvent(new Event("stopvid",false,false));
gotoAndPlay ("music start");
}
game.addEventListener (MouseEvent.CLICK, clickGame) ;
function clickGame (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the game button was clicked")
//go to the section clicked on...
gotoAndPlay ("game start");
}
comic.addEventListener (MouseEvent.CLICK, clickComic) ;
function clickComic (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the comic button was clicked")
//go to the section clicked on...
dispatchEvent(new Event("stopvid",false,false));
gotoAndPlay ("comic start");
}
cartoon.addEventListener (MouseEvent.CLICK, clickCartoon) ;
function clickCartoon (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the cartoon button was clicked")
//go to the section clicked on...
dispatchEvent(new Event("stopvid",false,false));
gotoAndPlay ("cartoon start");
}
blog.addEventListener (MouseEvent.CLICK, clickBlog) ;
function clickBlog (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the blog button was clicked")
//go to the section clicked on...
var request:URLRequest = new URLRequest("http://blog.moronica.net");
navigateToURL(request, "_blank");
}
store.addEventListener (MouseEvent.CLICK, clickStore) ;
function clickStore (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the store button was clicked")
//go to the section clicked on...
var request:URLRequest = new URLRequest("http://zazzle.com/moronica");
navigateToURL(request, "_blank");
}
contact.addEventListener (MouseEvent.CLICK, clickContact) ;
function clickContact (evtObj:MouseEvent) {
//trace shows what's happening in the output window
trace ("the contact button was clicked")
//go to the section clicked on...
var request:URLRequest = new URLRequest("mailto: info@moronica.net");
navigateToURL(request, "_self");
}
album1_btn.addEventListener (MouseEvent.CLICK, clickAlbum_btn) ;
function clickAlbum_btn (evtObj:MouseEvent):void
{
//trace shows what's happening in the output window
trace ("the album1 button was clicked")
//go to the section clicked on...
var request:URLRequest = new URLRequest("itms://itunes.apple.com/us/album/hard-rock-hyper-hero/id340648752");
navigateToURL(request, "_self");
}
album2_btn.addEventListener (MouseEvent.CLICK, clickAlbum_btn2) ;
function clickAlbum_btn2 (evtObj:MouseEvent):void
{
//trace shows what's happening in the output window
trace ("the album2 button was clicked")
//go to the section clicked on...
var request:URLRequest = new URLRequest("itms://itunes.apple.com/us/album/clowns-from-uranus/id342086511");
navigateToURL(request, "_blank");
}
album3_btn.addEventListener (MouseEvent.CLICK, clickAlbum_btn3) ;
function clickAlbum_btn3 (evtObj:MouseEvent):void
{
//trace shows what's happening in the output window
trace ("the album3 button was clicked")
//go to the section clicked on...
var request:URLRequest = new URLRequest("itms://itunes.apple.com/us/album/queen-of-the_queefs/id343693701");
navigateToURL(request, "_blank");
}
-
YOU DID IT!!!!!!!!!!!!
thank you thank you thank you -
I am so grateful for your help you have no idea...
If there's ANYTHING I can do for you - help with a website, music, audio, animation, a logo, please let me know.
It would be nice to know your name -
Mark
-
Senior Member
I do need a logo for one of my sites......do you have problem with adult site logo?
-
I wouldn't really but my wife sure would
mark
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|