A Flash Developer Resource Site

Results 1 to 16 of 16

Thread: cue points and flvplayback

  1. #1
    Junior Member
    Join Date
    May 2000
    Posts
    5

    cue points and flvplayback

    can someone give me basic instructions on how to use them. I see how to get into the cue point wizard. But how do i trigger them. i see how to set the type, actionscript, event, or navigation. ANd i see how to add parameters, name and value.

    for example i have a 2 minute vid, i want a text message to appear at 45 seconds and then disappear at 60 seconds. then at 61 seconds another text message(can be a graphic of text)

    any help much appreicated
    bob

  2. #2
    Junior Member
    Join Date
    Aug 2000
    Posts
    17
    Could someone please answer this in a simple step by step. Cue Points are supposed to be this great thing, but how they are explained on the Macromedia site is like figuring out voodoo.

    Please can anyone help?

  3. #3
    Junior Member
    Join Date
    Aug 2000
    Posts
    17

    HELP PLEASE, cue points...

    Are there any tutorials on how to use cuepoints to trigger actions in a movie?

    Where do I place the actionscript? Any help please?

    I have 3 video clips on three different scenes. I want to create a button that allows me to play all the videos back to back. ie. "click here to play all".

    So I was thinking put a cuepoint at the end of each video it can check to see if a variable is set to "all" and go to the next scene. If the variable is not set to "all" it goes to a scene with an interface for all the videos.

    So basically once the cuepoint is hit, it checks for a value and based on that value goes to a particular scene.

    Again any help would be greatly appreciated. THE HELP FILES IN FLASH 8 ARE NOT CLEAR HOW TO DO THIS!

  4. #4
    Junior Member
    Join Date
    Aug 2000
    Posts
    17

    Help.

    Can someone please direct me to a simple tutorial for this or tell me how to do it?

    Please?

  5. #5
    Moderator enpstudios's Avatar
    Join Date
    Jun 2001
    Location
    Tampa, Fl.
    Posts
    11,282
    Quote Originally Posted by dingosmoov
    Can someone please direct me to a simple tutorial for this or tell me how to do it?

    Please?
    http://www.macromedia.com/devnet/fla...ppreso_03.html

  6. #6
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Also, check the documentation in Flash.

  7. #7
    Junior Member
    Join Date
    Aug 2000
    Posts
    17
    Thanks estudioworks, but I have already read that tutorial a couple times, and it doesn't give any information other than adding the cuepoints. That tutorial seems to only work if you are using "screens" to author your presentation, and only mentions to name your cuepoints the same as the "screen" names. which is not the same as scene names.

    And regarding the comment about reading the Documentation. If done that over and over and it is still not clear. As well as not clear for many people on this forum or others, even the actual macromedia forum.

    So again, if any one has a real tutorial on this please post it to help people out.

    To Wheels,
    Being sarcastic and stating "read the documentation" helps no one.

  8. #8
    Moderator enpstudios's Avatar
    Join Date
    Jun 2001
    Location
    Tampa, Fl.
    Posts
    11,282
    I don't think Wheels was being sarcastic, it is not in his nature.
    He is the best Video guy on FK

  9. #9
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    No, I wasn't being sarcastic... although it is my nature, but never here.

    But first off - don't use scenes or it will never work.

    I don't know if it's in MX 2004, but I just went through a very detailed document in the F8 Help panel under Component Language Reference> FLV Playback Component> Using Cue Points> and > Playing Multiple .flv Files. Works great.

    There is matching help file on MM sites as well under Live Docs.

    So, yea - check the docs.

  10. #10
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Oh, also - there is a way to trigger functions with cues - estudio and I messed around with this over the weekend. But you'll have to write some code to make it work, there's no way to do it in the parameters panel for the components.

    Good article here: http://www.actionscript.org/forums/a...3/t-87082.html

    The key is the "eventObject.info.parameters" which is undocumented - you can pass variables, arrays, objects, or references than do a switch statement to choose the function you want to execute.

    There's a way to pass the function itself - but it's sloppy. I'll post a sample when I have some time to create a better way to do it.
    Last edited by Wheels; 01-31-2006 at 05:03 PM.

  11. #11
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Alright, I'll share it 'cause it may help, but it's not pretty.

    (FMX2004) - Method for setting cue points to call functions:

    1. Drag an instance of the MediaPlayback to the stage, give it a name of "myMedia".

    2. In the component parameters panel, select a local or remote .flv file and enter the duration.

    3. Make a cuepoint a couple of seconds into your video (parameters pane of the properties inspector) and give it a name of "stupidComponent".

    4. Create new layer for actions and paste this:
    Code:
    var myListener = new Object();
    myListener.ref = this;
    myListener.cuePoint = function(evt) {
    	for (var i in evt){
    		trace("EVENT: "+i+" = "+evt[i])
    	}
    	if (evt.cuePointName == "stupidComponent"){
    		this.ref[evt.cuePointName]();
    	}
    };
    myMedia.addEventListener("cuePoint", myListener);
    
    this.stupidComponent = function(){
    	//execute function here
    	trace("MM Components are lame!");
    };
    You just called a function using the cuePoint name.

    I have a working F8 version is in the works, but I'm booked for the next week - so it will be 10 days or so.

  12. #12
    Databarnak atRax's Avatar
    Join Date
    Dec 2000
    Location
    Zurich, Switzerland
    Posts
    258
    Use this :
    Code:
    var listenerObject:Object = new Object();
    listenerObject.cuePoint = function(eventObject:Object):Void {
    	if ( eventObject.info.name == "YourActionScriptNameInParamatersForTheCuePointNumber1"){
            _level0.yourMC.gotoAndPlay(2);
    }
        if ( eventObject.info.name == "YourActionScriptNameInParamatersForTheCuePointNumber2"){
            _level0.yourMC2.gotoAndPlay(2);
    }
    }
    myDemo.addEventListener("cuePoint", listenerObject);
    The other example from wheels doesnt work with many cuepoints
    regards
    mark
    I ask you all to concentrate really hard on the freedom of all being. Its hard not to be very angry it is impossible We have to focus this confusion frustration helplessness feeling into a creative outlet Anger can spawn such amazing creativity through Street art Free art to teach each other know each other a language our evolution Go ahead and break some dumb rules

  13. #13
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Thanks AtRax - I believe your method will only work in Flash 8 - I was posting a Flash 7 method.

    With Flash 8 you can evaluate both a function and parameter (you have just parameter?) with the right set up.

  14. #14
    Senior Member
    Join Date
    Mar 2005
    Location
    london/ny
    Posts
    126
    i found this thread very useful - used wheels' code and it worked great! only question i have now is this - the cue point i assume triggers because of the code cuePoint - but how does one trigger various different things from a number of cue points? i have a name for my cue point and was interested to see that i didn't need to use it in the code.

  15. #15
    Senior Member
    Join Date
    Mar 2005
    Location
    london/ny
    Posts
    126
    whoops i need to read better! i chopped out most of the code and used the basics i could understand. will have to experiment with names, sticking the rest of the code back in.

  16. #16
    Member
    Join Date
    May 2001
    Posts
    35
    Hey guys, I hope someone can help me with this, I've read all these thrends on CuePoints, but I haven't been able to get my code to work right still. I just want to make some simple captions. I have 3 cue points in my flash video (caption1, caption2 and complete) now my complete code works correctly as it should: going to frame 2 when complete is hit. Now my problem is with the captions. I've pasted my code below to show you guys and if anyone can tell me what I'm doing wrong thanks!!!

    Oh the problem is when I run the flash movie, both caption1 and caption2 are both displaying at the same time, when it should be caption 1 then at 10secs caption2. If I make both those movieClips _visible = false; then neither will show up.


    vid.contentPath = "test_actions.flv";

    var vidList:Object = new Object();

    vidList.complete = function() {
    gotoAndStop(2);
    }
    vidList.caption1 = function() {
    captionOne._visible = true;
    captionTwo._visible = false;
    }
    vidList.caption2 = function() {
    captionOne._visible = true;
    captionTwo._visible = false;
    }

    captionOne._visible = false; <-- if I take these out, the captions will never display, it seems as if the caption1 function code above isn't even used by Flash.
    captionTwo._visible = false;

    vid.addEventListener("complete", vidList);
    vid.addEventListener("caption1", vidList);
    vid.addEventListener("caption2", vidList);

    stop();

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center