Jump to content

Archived

This topic is now archived and is closed to further replies.

DarkHavn

Onmouse over effect

Recommended Posts

Now i thought i would start a new topic, because someone along the lines on my previous topic, people got lost to what my question was actually about and starting pointing out web standards to me.

Now, my question is, xhtml has the ability to have 'onmouseover' without using javascript or anything.

[code]
<a href='' onmouseover=''>
[/code]
Now what im trying to do is, when someone mouseovers the image then a flash file will appear showing some information about the image (the information is retreived from the database)

Now i don't need help with that part, (the database or php), my question is, is it possible to call apon a flash movie to be played as soon as someone mouseovers this image.

Ie onmouseover='callflashmovie()';

Or something along the lines of that

NOTE: I'M steering AWAY from javascript, so that means, i dont want to use java script!

Share this post


Link to post
Share on other sites
Ok, redarrow you are saying that php can't call a .swf file i know.

But that wasn't my question, my question was is there anyway in hell to access a flash movie and play it when 'onmouseover' of an image, without relying on javascript.

Share this post


Link to post
Share on other sites
Well i big to differ, as i just came up with a way.

Using php, i was able to access the flash movie, mixed with a touch of rss, i turned the flash movie into a feed, the php gets all the values, throws them into values, then executes the flash movie and turns it into a feed.

That allows it to play apon ever mouse over.

So much for your theory?

[b]EDITED BY akitchin:  WATCH YOUR COMMENTS.  INSULT REMOVED.[/b]

Share this post


Link to post
Share on other sites
Redarrow is correct. You cannot trigger any PHP code when you mouseover an object. PHP is parsed on the server and sends back the output. PHP and HTML cannot be ran together like you can with javascript. However I am little intreged how you managed to run PHP code onmouseover without using javascript.

Could you post an example of your code.

Share this post


Link to post
Share on other sites
I just wrote a function, and placed it inside the onmouseover=''


name the function whatever you want i named it

onmouseover='<?movie()?>'

This calls the php function that was made on the same page, it takes all the values that want to be passed into flash, then i locate the file using php (dir)

Then i execute the file and turn it into a feed (the flash movie has to be on a different website and always running, i loaded it into a free server to host it, just the flash file)

Then i use it as a feed to the website, it works.

Just going to give an idea of this as i've been looking around and apparently i maybe the first to accomplish this, and it wasn't that hard.

When i patent the idea it's self, i will release the source code.

Sorry lol if it's possible to make money with this i will.

Already had some offers for the source.

Get in touch with me in a few days when i get it patented.



Share this post


Link to post
Share on other sites
php runs on the server while javascript runs on the client. You are mistaken in your belief of how your code works. Maybe you are using some ajax type trickery or are reloading the page, but you sure ARE NOT executing php from within an onmouseover.

Good luck getting a patent.

Share this post


Link to post
Share on other sites
[quote author=thorpe link=topic=108587.msg437613#msg437613 date=1158714131]
php runs on the server while javascript runs on the client. You are mistaken in your belief of how your code works. Maybe you are using some ajax type trickery or are reloading the page, but you sure ARE NOT executing php from within an onmouseover.

Good luck getting a patent.
[/quote]

probably they are calling na actual page so the on mouseover is actually opening a new page cause the server to parse that new info....

Share this post


Link to post
Share on other sites
[quote]you sure ARE NOT executing php from within an onmouseover.[/quote]

I agree...and it if you are it's defintely AJAX
if it's not AJAX what you're doing could be done by at least
PHPing, so to speak, the SWF filename as a parameter to your javascript function, that takes an SWF file as an argument.

so like
[code]onmouseover='showMovie(<? echo $swfFile; ?>)'[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.