Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Solved]Javascript Question

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
M.CORP
Grandmaster Cheater Supreme
Reputation: 28

Joined: 28 Oct 2009
Posts: 1010

PostPosted: Mon Sep 17, 2012 2:08 am    Post subject: [Solved]Javascript Question Reply with quote

How do I get the movie parameter of an swf object on an HTML page by only using javascript?

HTML with flash object example:
(taken from http://armorgames.com/play/13852/planet-juicer)
Code:
<div id="gamefilearea">
<object id="gamefile" width="640" height="480" align="middle" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
<param value="/files/games/planet-juicer-13852.swf" name="movie">
<param value="high" name="quality">
<param value="window" name="wmode">
<param value="false" name="allowfullscreen">
<param value="false" name="allowfullscreeninteractive">
<param value="" name="flashvars">
<embed width="640" height="480" align="middle" pluginspage="http://www.adobe.com/go/getflashplayer" type="application/x-shockwave-flash" flashvars="" allowfullscreeninteractive="false" allowfullscreen="false" wmode="window" name="gamefile" quality="high" src="/files/games/planet-juicer-13852.swf">
</object>
</div>


I've been trying my own JS code, but it always returns "undefined":
Code:
function getMovie(movieName){
var embed = document.getElementsByTagName("embed");
return embed.movie;
}


Thanks Smile

Edit:
I just needed to change "return embed.movie" into "return embed.src" Very Happy

_________________
Shameless Self Advertising Very Happy!
Steam
Just lurking around...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites