Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 11-25-2008, 01:45 PM   #1
Registered User
Join Date: Nov 2008
Posts: 2
Default Changing functions in script from gotoAndStop to findCuePoint

I am attempting to access cue points in a FLV via html links/javascript using the external api.

The following html and javascript code sends an external api to the flash movie to go to a frame number:

function goToFrame(num) {
function getMovieName(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName]
else {
return document[movieName]
<body bgcolor="#ffffff">

<div id="menu">

<li><a href="#" onClick="goToFrame(1)">one</a></li>
<li><a href="#" onClick="goToFrame(2)">two</a></li>
<li><a href="#" onClick="goToFrame(3)">three</a></li>
<li><a href="#" onClick="goToFrame(4)">four</a></li>
<li><a href="#" onClick="goToFrame(5)">five</a></li>


<div id="flash">
<script type="text/javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '800',
'height', '300',
'src', 'ExternalAPI',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'left',
'play', 'true',
'loop', 'true',
'scale', 'noscale',
'wmode', 'transparent',
'devicefont', 'false',
'id', 'ExternalAPI',
'bgcolor', '#EEEEEE',
'name', 'ExternalAPI',
'menu', 'true',
'allowFullScreen', 'false',
'movie', 'ExternalAPI',
'salign', 'lt'
); //end AC code
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="550" height="400">
<param name="movie" value="test.swf" />
<param name="quality" value="high" />
<embed src="test.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550" height="400"></embed>
<noscript><p>Please install Flash and/or enable JavaScript to view this example.</p></noscript>

This is the actionscript code in the flash movie:
import flash.external.*;
#include "mc_tween2.as"

// The name of the Flash trigger variable to be called in JavaScript
var jsTrigger:String = "goTo";

// Callback function executed by the name of variable
ExternalInterface.addCallback(jsTrigger, null, goTo);
function goTo(frame:Number):Void {
image.alphaTo(0, .25, "easeOutQuad");
image.onTweenComplete = function() {
image._alpha = 0;
image.alphaTo(100, .5, "easeOutQuad");

Question: How do I change the scripts from the flash gotoAndStop function to the findCuePoint (with a name variable)?
aztecgreen is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing the functions of the FLV Component buttons? p0c ActionScript 3.0 0 06-05-2008 01:23 PM
I Need To Update This Script Grump ActionScript 1.0 (and below) 9 01-27-2003 06:38 PM
Smooth scripted colour changes? jpe2001 Animation and Effects 5 07-22-2002 12:10 PM
Changing Font using Action Script Harish ActionScript 1.0 (and below) 1 12-14-2001 02:18 PM
script for changing a mcs level blue ActionScript 1.0 (and below) 1 12-11-2001 08:56 AM

All times are GMT. The time now is 08:01 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.