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




OnCuePoint Clarified



i was recently trying to use the .onCuePoint event handler for a project of mine, having caught a glimpse of it in the index. seemed like the right tool for the job... upon checking the good ol' F1-Help on the subject, i immediately had my eyes ravaged with some wonderful uber-engineer-class code that was less than clear in it's use.bottom line: confusion.so after snorking some serious Jolt and hunting the web for tidbits, i didn't really find anything much useful. but after snorking more serious Jolt and experimenting like a mad scientist, i finally bashed together this surprisingly useful arrangement. now, why couldn't the docs be this clear and useful on the subject? i blame lawyers...i hope this helps anyone else trying to use this really sweet event handler.NB. Attach Codefunction superTurboFunction(mediaCue){ switch (mediaCue) { case "kaboom" : doSomeExplodingStuff; break; default : pickNoseAndFart; break; }}myNetConn_nc = new NetConnection();myNetConn_nc.connect(null);myNetStream_ns = new NetStream(myNetConn_nc);myVideo_vid.attachVideo(myNetStream_ns);myNetStream_ns.onCuePoint = function(cueEventObject:Object){trace ("Elapsed Time: " + myNetStream_ns.time);trace ("Cue Point Name: " + cueEventObject.name);trace ("Cue Point Type: " + cueEventObject.type);superTurboFunction(cueEventObject.name);}myNetStream_ns.play("ScreamingNinjaDeath.flv");



Adobe > ActionScript 1 and 2
Posted on: 12/12/2007 04:53:25 AM


View Complete Forum Thread with Replies

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

Need Something Clarified
Hello,

Im new to AS3 and ive have had noob experiences so i was wondering if you could clarify some things with me:

1) Each object has a display list? yes or no
I understand that DisplayObjects are objects
and DisplayObjectContainer can have more than one object
Does each DisplayObject as well as DisplayObjectContainer have a display list?
Once i know which DisplayList i want to reference to, how do i do that?

2) In order to use removeChild or getChildByName, a child has to exist? yes or no.

3) I have a loader objects loading images while iterating through an xml file.
it looks like this

//trace("This is the count of the xml list:"+xmlList.length());
for(var i:int = 0; i < xmlList.length(); i++)
{
imageLoader = new Loader();
imageLoader.load(new URLRequest(xmlList[i].attribute("thumb")));
imageLoader.contentLoaderInfo.addEventListener(Event.INIT, initApp);
imageLoader.name = 'myImage'+i;
//trace(imageLoader.name);
}

now I dont want to add the objects until later on.
so many lines down i start adding them.
now when i reference imageLoader it refers to myImage11
so I would like to know how do i reference them.

now since im out of the loop i create another loop
to get access to each object at different iterations
and I put this inside the loop:
trace("myImage"+j));
doesnt work.

Anyone knows?

OnCuePoint
I have an FLV that I imported on the main timeline with instance: vid. I have a movieClip there as well with instance: slides. I've put these two actionScript cuePoints on the video: s1 (at 0 secs) and s2 (at 20 secs). Neither of those cuePoints have parameters on them (should there be?). I want the movieClip "slides" to gotoAndStop a frame labeled "s1" when the FLV reaches the s1 cuePoint, s2 when it reaches the s2 cuePoint, etc. Here is a script I have in the first frame of the main timeline. It doesn't change frames like I want it to in the slides movieClip. What am I doing wrong?

var vidList:Object = new Object();
vidList.cuePoint = function (cues) {
if (cues.info.name =="s1") {
slides.gotoAndStop ("s1")
}
else if (cues.info.name =="s2"){
slides.gotoAndStop ("s2")
}
}

vid.AddEventListener ("cuePoint",vidList);


Any help here would be appreciated.

Thanks,

Brian





























Edited: 08/23/2007 at 09:08:56 AM by yevri

Transition Effect ? Clarified
not b annoyin'—the last thread went dark

anyone splain how to do the pattern-over-image transition effect seen here?:

http://www.templatemonster.com/webs...lates/6383.html

Transition Effect ? Clarified
not b annoyin'—the last thread went dark

anyone splain how to do the pattern-over-image transition effect seen here?:

http://www.templatemonster.com/webs...lates/6383.html

OnCuePoint Structure
I have an FLV that I imported on the main timeline with instance: vid. I have a movieClip there as well with instance: slides. I've put these two actionScript cuePoints on the video: s1 (at 0 secs) and s2 (at 20 secs). Neither of those cuePoints have parameters on them (should there be?). I want the movieClip "slides" to gotoAndStop a frame labeled "s1" when the FLV reaches the s1 cuePoint, s2 when it reaches the s2 cuePoint, etc. Here is a script I have in the first frame of the main timeline. It doesn't change frames like I want it to in the slides movieClip. What am I doing wrong?

var vidList:Object = new Object();
vidList.cuePoint = function (cues) {
if (cues.info.name =="s1") {
slides.gotoAndStop ("s1")
}
else if (cues.info.name =="s2"){
slides.gotoAndStop ("s2")
}
}

vid.AddEventListener ("cuePoint",vidList);


Any help here would be appreciated.

Thanks,

Brian





























Edited: 08/23/2007 at 09:07:52 AM by yevri

Using OnCuePoint To GetURL ?
I am a Noobe to AS, but I'm trying to learn. Here's the problem, I have a intro for a website using a FLV. I set two cue points ("start","end"). What I am trying to do seems very simple (when I started,LOL), at the end of the FLV have it go to another web page using the "end" cue point. Here is what I have:

Code:
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
getURL("http://www.grunts-clan.com/gaming","_self");
};
movie2.addEventListener("end", listenerObject);
Like I said, I'm just learning, So any help with this will be Greatly Appreciated.

Receive OnCuePoint Events With Javascript?
Hello all,

I guess you'd have to call me "pre-newbie". My only experience with Flash and ActionsScript is using KoolMoves. I don't own Flash at the moment and despite the fact KoolMoves is a great product, it currently can't help me here.

I was wondering if there was another way to add a Javascript event listener to receive onCuePoint events from the Flash player? I found the Macromedia Flash/Javascript Integration kit, but that requires Flash. I'm hoping there's another way.

Thanks.

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