/    Sign up×
Community /Pin to ProfileBookmark

1 function to 2 function…

Well here it goes.

I have a player.

[code=php]1 function to start playing – I have some function with the help of which the movie starts.[/code]

[code=php]2 function is to stop a movie.[/code]

There are 4 images stop and play button (with hovers). So I need something.

So the 1 function is working, after you click on the image of the 1 function the functions switches to 2 function.
When you click on the second function it switches to first function.

So I do not have to pictures of stop and play button &PLAY&&STOP& but just one &PLAY& picture.

So some script that can swith the scripts after the click on the image.

Thanks, Yan!

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@KorNov 06.2007 — We are not psycho. Show us the code.:-)
Copy linkTweet thisAlerts:
@WLQauthorNov 06.2007 — It doesn't matter what is the code anyway there has to be some other javascript that can switch 2 functions does it?
Copy linkTweet thisAlerts:
@TJ111Nov 06.2007 — We are not psycho. Show us the code.:-)[/QUOTE]
No, I think we are. We're just not psychic.
Copy linkTweet thisAlerts:
@KorNov 06.2007 — It doesn't matter what is the code anyway there has to be some other javascript that can switch 2 functions does it?[/QUOTE]
It does matter. Your post is too vague. You gave us too little basic information and blurred ones. Play what? Stop what? a Flash? a slideshow js? a what? Wher's your code? Where are your codes? can we [I]see [/I]what's all about?
Copy linkTweet thisAlerts:
@KorNov 06.2007 — No, I think we are. We're just not psychic.[/QUOTE] I bet you're right ?
Copy linkTweet thisAlerts:
@toicontienNov 06.2007 — You'd like the image to change from the "Play" button to the "Stop" button when you click it, then when you click the "Stop" button it stops the player, and changes the button to "Play?"
Copy linkTweet thisAlerts:
@WLQauthorNov 07.2007 — Look it's not a flash player it's Windows Media Player.

You can either put a WMP controls or you can customize controls but it does require skills. Well I did made the functions 1 is to stop. And second is to play.

[B]1 function &IMAGE-PLAYBUTTON$[/B]
[code=php]<a href="#plays" onclick="playIt();"><img src="play.gif" alt="Play" border="0"></a>[/code]

[B]2 function &IMAGE-STOPBUTTON$[/B]
[code=php]<a href="#plays" onclick="stopIt();"><img src="stop.gif" alt="Stop" border="0"></a>[/code]

So if you put this code on the page it looks like this:

&IMAGE-PLAYBUTTON$ &IMAGE-STOPBUTTON$

Click on any of this images the function will work.

But I want more advanced player: I need to have only one image &IMAGE-PLAYBUTTON$. When you click on this image function works, the movie starts and switches this function to function 2 &IMAGE-STOPBUTTON$.

Same as in flash players, when you click on play, the button changes to stop right? I need the same but I don't know what the code I need to use to switch from one function to the other and back. You know like on click change function.
×

Success!

Help @WLQ 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.7,
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,
)...