Login | Forgot password | Register

X

What is OpenID?

OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.

With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.

For more information visit the official OpenID site.

23 Posts in 9 Topics by 9 members

Jump to:

General Discussion

If this is your first visit, you will need to register before you can post. However, you can browse all messages below.

Forums » General Discussion » Building interactivity

Page: 1 Go to End
Author Topic: Building interactivity 772 Views
  • hkundra
    avatar
    Community Member
    7 posts

    Building interactivity Link to this post

    Hi,

    Thanks for the great CoSolvent player! I have a file a.swf, which contains a frame-based animation. I was able to successfully integrate this in a sequence:

    a.swf -> b.flv

    My question is this: Is it possible to build in interactivity in the timeline? For example, can I insert another actionscript-based SWF file, say c.swf after b.swf which asks user to do something, lets say click a rectangle. And only when the user clicks on the rectangle does the player move onto the next file.

    a.swf -> b.flv -> c.swf -> d.flv

    So, the player starts c.swf but only when the user clicks on the rectangle (or some other way of interactivity) does the player go onto play the last file d.flv.

    Is this possible? If so, how?

    Thanks much in advance,
    hkundra

  • joseph.gay
    avatar
    Community Member
    28 posts

    Re: Building interactivity Link to this post

    We currently have in development a module that I believe is relevant to your task. We have been using it internally for several weeks now, and plan on having a public release available within the next week and a half. It makes use of the xml based scripts to allow for interactive objects with text and/or images to be placed in the timeline. Here is a code snippet:

    <Slide time="24000" width="640" height="480">
             <Layer id="background" backgroundColor="#abd3e9">
                <Image source="vc/top_left.gif" left="0" top="0" />
                <Image source="vc/top_right.gif" right="0" top="0" />
                <Image source="vc/bottom_left.gif" left="0" bottom="0" />
                <Image source="vc/bottom_right.gif" right="0" bottom="0" />
                <Image source="vc/middle.gif" left="0" top="250" maintainAspectRatio="false" scaleContent="true" percentWidth="50" />
             </Layer>
             <Layer id="textFg">
                <Text color="#0000ff" backgroundColor="#ffffff" top="50" left="50" right="50">
                   <h1> Did you know: </h1> "Something" is a single released by The Beatles in 1969, and featured on the album Abbey Road. "Something" was the first song written by George Harrison to appear on the A - side of a Beatles single, sharing top billing on the double A - side single with "Come Together" in the United States.
                </Text>
                <FinishButton bottom="20" right="20" width="100" height="32" text="Continue" />
             </Layer>
    </Slide>

    The slide would appear at the specified time relative to the particular script. It would then pause, as you suggest, and wait for the user to press the button before continuing playback.

    First of all, do you think that what I have described above would work for you? If not, what do you believe it is lacking?

    In the mean time, you should be able to accomplish some of what you want by using actionscript inside the swf to stop its local timeline. This would stop the player from progressing forward although it wouldn't change the button state. You could then have the button resume the swf local timeline to continue. We also plan on making an actionscript api accessible from timeline swf animations, but we haven't fully worked out the details. We'll keep this thread as well as the blog updated as we progress.

    Joe

  • hkundra
    avatar
    Community Member
    7 posts

    Re: Building interactivity Link to this post

    Joe:

    I am not sure if above would work as is for me. Yes, it would be able to pause the timeline and then continue playing from when the user interacts. This part is quite good and powerful. But could there be more powerful interactions with the timeline?

    See, basically we would like to build some interactivity that if the user takes some interaction then we do actionA (say play a sound) and if user does some other interaction (an incorrect one), we do some other action (say B, play a different sound).

    For example, if the user clicks on ButtonA on the slide, then the timeline resumes playing (as above). And if the user clicks on ButtonB on the slide, then the timeline jumps 5 seconds (or 5 frames) and then resumes playing. If it can do then that would solve our problem.

    One more thing, I think for this XML slide concept to be useful for us, we would need an editor interface as well. I can't expect my content guys to know or write XML markup.

    - - - -

    Can you give a couple of examples of SWF/FLA files - where in you can demonstrate pausing and resuming the timeline? That would be very helpful. My email id is hkundra _AT_ gmail

    For what its worth, we tried to pause the timeline and resume it, but couldn't get it to work seamlessly. In a couple of examples where we gave the command [gotoAndPlay(frameNumber)], it would not resume the timeline, and stay paused.

    - - - -

    That actionscript API sounds very good. We intend to work extensively with CoSolvent Player for all our video content (more than a 5000 videos over the next 6 months). So would love to hear more about this API. If you need any beta testers, we would be interested.

    Thanks,
    hkundra _AT_ gmail

  • joseph.gay
    avatar
    Community Member
    28 posts

    Re: Building interactivity Link to this post

    It sounds like the api will provide the capability you want once we roll it out. We now have definite plans on how it will look, so I will go ahead and outline them here.
    ------------
    First off, we will provide an swc that you can link to from within flash which will expose a CSPlayer class. This class will implement useful functions that will call back into the player. An instance of the class will be attached to each avm2 timeline movie clip, and it will be called csplayer. So from within your swf, on a button let's say, you could call something like parent.csplayer.seekAhead(5000) to move the timeline ahead by 5 seconds. If you have a list of actions, besides those already mentioned, feel free to post them here and we'll see about integrating them.
    ------------
    As for the xml inserts, I see your point about needing an interface for editing. To that end we have also developed an AIR application that allows for previewing the slides in the player prior to deployment. A release date for that is uncertain. It depends on the level of interest for the inserts module.
    ------------
    We expect to have an initial version of the api ready for use on or around Wednesday of next week, and we'd be happy to provide it to you as soon as we feel it is usable. If you can hold tight for that long, it's likely to be your best bet. We do have a legacy api already implemented for avm1 material, and we have used it successfully, but there are some latency issues due to the communication through local connection that you have to watch out for.
    ------------
    Once again, we will keep you posted as we progress.
    Joe

    772 Views
Go to Top

Currently Online: There is nobody online.

Welcome to our latest member: y0rk1e