php - flash - media playback

FLASH

    Next

  • 1. Preloading 50%
    I have a main .swf with my navigation in it. When you click on any of the 4 nav buttons it loads an external .swf into an empty movie clip called holder. Some of the .swf's are big picture galleries (900 k), and they all have preloaders. Is there a way to only preload the movies half way. Here is the preload code I am using. bytes_loaded = Math.round(this.getBytesLoaded()); bytes_total = Math.round(this.getBytesTotal()); getPercent = bytes_loaded/bytes_total; this.loadBar._width = getPercent*100; this.loadText = Math.round(getPercent*100)+"%"; if (bytes_loaded == bytes_total) { this.gotoAndPlay(3); } Thanks in advance.
  • 2. specify attributes
    I have a list of children that contain an image, name and a story and I want to randomly populate one of them at a time. I am able to get it to randomize, but I can't target the attributes, they always comeback undefined. Here is my xml structure: <children> <child imageURL="child0.jpg" childName="ben neal0" childStory="child 0 story" /> <child imageURL="child1.jpg" childName="ben neal1" childStory="child 1 story" /> <child imageURL="child2.jpg" childName="ben neal2" childStory="child 2 story" /> <child imageURL="child3.jpg" childName="ben neal3" childStory="child 3 story" /> <child imageURL="child4.jpg" childName="ben neal4" childStory="child 4 story" /> </children> and here is my actionscript: function loadChildren(){ for (var aChild in children) { var childData = children; var randomNode = Math.floor(Math.random() * childData.length); trace(randomNode); //this sends me back a number 0-4 imageHolder.loadMovie(childData.imageURL); } } what do I have to do to single out the attributes of the randomly picked child node?
  • 3. read and write txt file or cookies out of flash 8
    I was wondering if anyone had any knowledge of writing files out of flash and then reading them back in via actionscript or javascript with in flash. If anyone knows could you please help. I found this as a starting point but any other help would be appreciated. /////script/////// on (release) { if (_root.cookieName.length>=1 && _root.cookieValue.length>=1) { getURL("java script:setCookie('"+_root.cookieName+"','"+_root.cookieValue+"')", ""); //_root.done = "[DONE]"; } } ////////////////// daniel
  • 4. internet explorer error message
    I'm experiencing this problem quite often and at first I didn't think it was anything, but now I think it might be something. When I load a completed .swf and the accompanying .html to a server and I open internet explorer and navigate to the site, it works fine, but when I close internet explorer it gives me this error message: The instruction at "0x01935fbe" referenced memory at "0x01935fbe". The memory could not be "read". Click on OK to terminate the program. What is causing this? I've looked at my code and it looks fine. When I test it in Flash everything works. No compile time error or anything. Has anybody experienced this and does anybody know what the problem is?
  • 5. Cannot close pop-up with getURL
    I'm trying to do the following: 1. Navigate to a html with embeded swf POPPER.SWF> 2. POPPER.SWF automatically opens a movie CONTENT.SWF. 3. QUIT BUTTON on CONTENT.SWF should close CONTENT.SWF. I have tried using: 1. getURL("javascript.close();"); 2. getURL("javascript:window.opener=self;window.close();"); 3. getURL("javascript:window.close();"); 4. getURL("javascript:self.close();"); What's going on? I know there's a security restriciton in javascript that the close method will only close pop-ups openned by javascript without a prompt, but none of these seem to work. I can open the pop-up just fine, it's only the closing that's a problem. Ideas?

php - flash - media playback

Postby dbento » Wed, 18 May 2005 00:21:37 GMT

I'm trying to send a var from php with a filename a using it in flash media 
playback component.
 I can send the var to flash, but then media playback doesn't recognize it.
 PHP CODE
 <?
    echo "nomeVideo=miniMalucos.flv";
 ?>

 FLASH CODE
 mailform = "vars.php";

 loadVariables("vars.php", this, "GET");
 _root.onEnterFrame = function() {
 	if (nomeVideo != undefined) {
 		texto = nomeVideo;
 	} else {
 		texto = "erro";
 	}
 };
 videosAnimago.setMedia(nomeVideo, "FLV");


Re: php - flash - media playback

Postby SMakinson » Wed, 18 May 2005 00:31:51 GMT

Looks to me like you are probably trying to use the var before the loadVars 
completed. Use the LoadVars class instead and use the onLoad event. Take a look 
at the LoadVars class in the Action Script Language Reference in the help.


Re: php - flash - media playback

Postby David Powers » Wed, 18 May 2005 00:36:38 GMT



I'm not familiar with the media playback component, but looking at your 
script, it seems to me that you are trying to load the video before the 
script has chance to load the variable from PHP.

Try this in your ActionScript:

var getVideoName = new LoadVars();
getVideoName.load("vars.php?ck=" + new Date().getTime());
getVideoName.onLoad = function() {
   if (this.nomeVideo != undefined) {
     videosAnimago.setMedia(this.nomeVideo, "FLV");
   } else {
     texto = "error";
   }
};



-- 
David Powers
Author, "Foundation PHP 5 for Flash" (friends of ED)
Co-author "PHP Web Development with DW MX 2004" (Apress)
 http://www.**--****.com/ 

Similar Threads:

1.Media Playback component continuous playback

I want to have MP3s continuously play one after the other with the Media 
Playback component using the List component as the source of MP3's content 
path.  Is it possible to continously playback one after the other?

 Thank you

2.Media slider for Media Playback component

Hi,

I'm working with a .flv that is pretty short and will be used for doing a 360 view of an object; therefore, the time slider is being used a lot to control what angle is visible.  My problem is when I use the slider it only lets me view 2 or 3 different angles.  I'm wondering if there is a way to decrease the increment where it will advance the video.  If anyone knows, it would be a big help.

Thanks



3.Windows Media Player - flashes green during playback

Hi - On my Dell laptop XP Media Center, when I record a TV program and then 
play it back through the Windows Media Player, the screen will flash green 
during playback.  I can see the picture (despite the continuous green 
flashing) and hear the audio.

Can someone please give me some advice as to what I need to do to stop the 
green flashes?

The laptop is a Dell XPS 1710, Intel Core 2, 4 GB RAM.  Nvdia GEforce 7950 GTX

Thanks,
DDL

p.s.  I posted this initially in the wrong forum, in case you see this twice.



Return to FLASH

 

Who is online

Users browsing this forum: No registered users and 68 guest