FLEX, how to specify parent html item, when I call external functions ?
- by Patrick
hi,
I'm calling a javascript function from my flex application to set width and height of my html wrapper according to application size.
However, I've many flex applications on my page and the wrappers have not id attribute.
I'm using a unique javascript function and passing it the parameters. How could I specify the "parent" html element in these parameters ?
Following is the code:
Actionscript:
if (ExternalInterface.available) ExternalInterface.call("changeSize",id, width, height);
Javascript:
<script type="text/JavaScript">
function changeSize(id, width, height) {
console.log(id);
console.log(width);
console.log(height);
}
Wrapper:
<div class="filefield-file clear-block">
<div class="filefield-icon field-icon-video-x-flv">
<img class="field-icon-video-x-flv" alt="video/x-flv icon" src="http://localhost/drupal/sites/all/modules/filefield/icons/protocons/16x16/mimetypes/video-x-generic.png"></div>
<div style="background-color: rgb(255, 255, 255); width: 400px;">
<embed style="display: block;" src="/drupal/videoPlayer.swf?file=http://localhost/drupal/sites/default/files/files/projects/Project3/videos/9565274.flv" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" bgcolor="#ffffff" allowfullscreen="true" autoplay="true" flashvars="file=http://localhost/drupal/sites/default/files/files/projects/Project3/videos/9565274.flv" height="400" width="400">
<div>Scheduling Video</div>
</div>
</div>