/    Sign up×
Community /Pin to ProfileBookmark

Using Javascript to interact with flash

Hi,

I’m using javascript to cummunicate with flash and I have it working. It’s just that when I click this link

[CODE]<a href= VALUE=”Goto Frame 3″ ONCLICK=”go(2)” >go to the frame </a>[/CODE]

it goes to frame 3 but it trie’s to go to

[CODE]file:///C:/Documents%20and%20Settings/userName/Desktop/Javascript%20Talking%20to%20flash/VALUE=%22Goto[/CODE]

This is the Javascript at the top of my html page

[CODE]
<SCRIPT LANGUAGE=”JavaScript”>
<!–
var movieName = “testcommand”;

function thisMovie(movieName) {
// IE and Netscape refer to the movie object differently.
// This function returns the appropriate syntax depending on the browser.
if (navigator.appName.indexOf (“Microsoft”) !=-1) {
return window[movieName]
} else {
return document[movieName]
}
}

// Checks if movie is completely loaded.
// Returns true if yes, false if no.
function movieIsLoaded (theMovie) {
if (typeof(theMovie) != “undefined”) {
return theMovie.PercentLoaded() == 100;
} else {
return false;
}
}

function go(theFrame) {
if (movieIsLoaded(thisMovie(movieName))) {
thisMovie(movieName).GotoFrame(theFrame);
}
}

function golabel() {
if (movieIsLoaded(thisMovie(movieName))) {
thisMovie(movieName).TGotoLabel(“_level0/”,”redframe”);
}
}

//–>
</SCRIPT> [/CODE]

Can anyone tell me why it’s trying to go to that page.
All I want it to do is go to that frame or frameLabel.

Thanks,

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @bmcc81 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...