/    Sign up×
Community /Pin to ProfileBookmark

javascript swf problem

Ok heres the deal. (Client Side Scripting Only)

1) I have 2 swf files. worldmap.swf and play.swf
2) I require worldmap.swf to play (it loops twice then stops) then play.swf should come up on the screen where worldmap was after it stops.
3) Play.swf needs to be a link to a file called gto.swf

Problem: Well I have a small idea on what to do here, I think that javascript would be the best code to do this with since it can use if statements and call functions.
I though that maybe using a function called whatever would use the if statement that states.
if (worldmap.swf == true) continue playing
else (execute play.swf)
end if

If anybody has an idea or comment about my idea please reply, also if anybody has used code similar to this or is able to code it please reply I would highly appreciate it.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@neil9999Oct 28.2004 — [i]Originally posted by TheImmortal [/i]

[B]

if (worldmap.swf == true) continue playing

else (execute play.swf)

end if[/B]
[/QUOTE]

That's not javascript syntax: look at http://www.w3schools.com/javascript for javascript info. Ifs are generally like this:

if([i]condition[/i]){[i]code if condition is true[/i]}else{[i]code if condition is false[/i]}

And code like yours would probably crash it. Try using action script.

Neil
×

Success!

Help @TheImmortal 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.19,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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