ActionScript 3.0 :: Flashvars, Loaderinfo For Mp3 Player With Xml?

Jun 7, 2011

I have built a music community website, obviously members can sign up for an account, and upload mp3 files to their accounts.Once registration is complete, the php script creates a folder in the members directory on my server with their unique id, then when they go and upload an mp3, it uploads it to their folder and automatically creates a playlist.xml file for the song(s) I have a prebuilt flash mp3 player that I got from developphp.com, his as3 code calls for a static directory for the audio and xml, now since the flash player will live in the root, and the xml and audio will live in the members/$id folders, I am told to use flashvars and loaderinfo.parameters to do what I need, and that is to load the xml and mp3 files into the player for the profile that is being viewed at that moment, so lets look at what I've put into the html object and embed.
 
lets use profile #7
 
<param name="movie" value="flplayer.swf?<?php print"$id/playlist.xml" ?>">
<embed src="flplayer.swf?<?php print "$id/playlist.xml" ?>"> (please tell me if I have done this incorrectly)
  
now if we go to the profile.php?id=7 page, thius is what the page source looks like:
  
<param name="movie" value="flplayer.swf?7/playlist.xml">
<embed src="flplayer.swf?7/playlist.xml>">
  
now here is where I am stuck, as I said the flash mp3 player urlLoader and URLRequest, and I have been searching for days to figure out what I am supposed to do to get the player to pick up on the flash vars, here is the top part of the as3 code where it calls for the mp3 and the xml.
  
stop();
var myFormat:TextFormat = new TextFormat();
myFormat.color = "0xFFFFFF";
list.setRendererStyle("textFormat", myFormat);

[code]....

View 15 Replies


Similar Posts:


ActionScript 3.0 :: LoaderInfo/flashvars Not Working?

Feb 25, 2008

i have a file named: 394354.html. In it is the following code:

codebase="http://download.macromedia.com/pub/s...ersion=9,0,0,0" width="900" height="900" id="LoaderExample" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />

[Code]...

That is part of the source in the LoaderExample.swf. And all I get is a "Parameter text must be non-null" error. I've alternatively tried the FlashVars method using additional <param> and <object> tags but i get the same error. What is going on with Actionscript 3? is this a bug? What am I doing wrong? Do the 5 or 6 tutorials i've read leave some important detail out ?

View 9 Replies

ActionScript 3.0 :: FlashVars Root.loaderInfo.parameters Returns Null?

Jul 29, 2010

I continue, I must say I've searched on forum and on google and all the different kind of code didn't work On my actionscript panel, I have this:
 
import com.greensock.*;import flash.net.URLRequest;
import flash.display.Stage;import flash.display.LoaderInfo; 
var sujet_no:String = LoaderInfo(this.root.loaderInfo).parameters["sujet_no"];var timer:String = LoaderInfo(this.root.loaderInfo).parameters["timer"];var back_url:String =

[Code]...

View 7 Replies

ActionScript 3.0 :: Reading LoaderInfo Flashvars Then Chaning Them And Reading Them Again Fails

Oct 24, 2011

I am changing the flashvars variables v1=value&v2=value ect then after the flash movie runs I am changing the variables externally by javascript, so far so good.when flash first loads it reads the vars correctly.when I try to read them ( after the change ) it keeps reading the old values.[code]everything works except I cannot seem to read the changed FlashVars.

View 1 Replies

Pass Flashvars To Standalone Flash Player?

Oct 31, 2010

Is it possible to pass flashvars to standalone flash player via the commandline? Among other reasons, I want to run some unit tests from the command line.

View 2 Replies

ActionScript 2.0 :: [CS3] Resize Flv Player Dimensions With Flashvars

Dec 9, 2008

I'm using netstream in a video player that uses Flashvars to play flvs. The problem is that all the flvs are different dimensions. I'm not exactly sure how to handle this. (I know components stretch to fit, but I like using netstream.)

View 1 Replies

ActionScript 3.0 :: Video Player W/ FlashVars &amp; Bandwidth Check?

Dec 19, 2008

I am trying to incorporate FlashVars into a video player that loads one of two movies depending on the users' bandwidth. I got everything working until I come to the FlashVars. Below is my code (most of it) which handles the bandwidth, etc, and the FlashVars.how to write these FlashVars so the accompanying .html file will load the fmspath, the src, and the src2 FlashVars.Here are some links to the project: (The zip file contains all the classes and the FLA File(s))http:[url......

View 1 Replies

ActionScript 2.0 :: Add Creating Custom Player And To Use Flashvars In File And Call It Dynamically In PHP

Oct 9, 2009

I m passing variable/ file name in html/ php like this

[Code]...

I m creating custom player and want to use flashvars in AS2 in my file and call it dynamically in PHP. this is how i m calling the mp3 file

[Code]...

View 0 Replies

ActionScript 3.0 :: LoaderInfo Of Swf Which Is Into Another Swf?

Aug 26, 2009

i have a swf and i send parameter to this from html. when i load this swf directly to the html page, i can take paramters by using 'this.root.loaderInfo'However, i load this swf into another swf and i load second swf to the html. by this way, i cant take paramters using 'this.root.loaderInfo'. what should i do for this? what is the root and parent relationship between swfs that one within the other one.

View 1 Replies

ActionScript 3.0 :: LoaderInfo Of ContentLoaderInfo?

Jul 7, 2011

As a part of a class I have been asked to place a preloader in front of my projects. I can't believe how tough this is. I get the best results when I use an URLRequest, but I want to understand the timeline.When I put a working preloader in front of my movie it doesn't start "ticking" until some middle point like 20%, or 70% depending on the file size of the movie. When I trace the bytes.Loaded it doesn't start counting until 700K or so.I have looked at several different preloaders and none seem to work as well as the tutorial. Can someone direct me to an "easy to understand" source that explains the loaderInfo / contentLoaderInfo class?

View 3 Replies

Flash :: Why LoaderInfo.bytesTotal Is Zero

Nov 22, 2011

I'm developing a flash file that that will be uploaded to dozens of websites which I have no control over. I found out that one of them seems to be gzipping the swf, which is causing loaderInfo.bytesTotal to be zero. This screws up the loading animation. I tried a workaround of just testing if bytesTotal is zero, if so simply proceed. That doesn't work because, as expected, not all the necessary data has loaded yet. Alternatively I can put a timed delay of whatever the expected load time is, and hope that it covers all the bases.

Does anyone have any other suggestions? Ideally there's an alternative way to define bytesTotal, but I haven't found one. FYI this is somewhat related to this question: Why loaderInfo.bytesTotal is Zero But I can't do the htaccess suggestion because I don't have control over the other websites, some of which may be on windows servers anyway.

View 2 Replies

ActionScript 3.0 :: Get URL From LoaderInfo IOErrorEvent

Oct 17, 2007

I'm loading an image with Loader class, adding a listener to its LoaderInfo object like this:

ActionScript Code:
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
var req:URLRequest = new URLRequest("myUrl.jpg");
loader.load(req);

Then of course I have a function ioErrorHandler. How can I get the url within that error handler?

The IOErrorEvent doesn't have something like a url property, nore does the LoaderInfo has one. Well, I just though of getting my Loader object back within the error handler like this:

ActionScript Code:
function ioErrorHandler(event:Event){
trace(event.target.loader);
}

But well... I get runtime error #2099. The Loader object is not available in ioErrorEvent. Do I really need to parse the url from IOErrorEvent.message?

View 9 Replies

ActionScript 3.0 :: How To Use LoaderInfo.getLoaderInfoByDefinition(obj)

Jun 28, 2008

how to use LoaderInfo.getLoaderInfoByDefinition(obj)??? Docs say it wants a "SWF File Object"... I tried feeding it a loaded movieclip. hoping to get the clips loaderInfo, but it simply returned the loaderInfo for the stage, not the loaded clip...

View 2 Replies

ActionScript 3.0 :: Reading Dpi From LoaderInfo.bytes?

Aug 11, 2009

I need to get the density and units from loaded images, both jpg and png. I am able to get the data, but the bytes do not seem to be where they should, according to [URL]..rchange_Format units, xDensity and yDensity should be proceed one another, but I get an unknown value between units and xDensity. Am I reading the JFIF specs wrong or am I doing somthing wrong with the byteArray? Same with pHYs data in pngs, I can get the data but it's not where I expect it according to

[Code]...

Edit: Forgot to add, I am reading the first 100 bytes of the loaderInfo, picked this number arbitrarily. Any suggestions on a safe length, long enough to ensure I can retrieve the metadata but short enough to keep it quick.

View 3 Replies

ActionScript 3.0 :: Set LoaderInfo Params From Flash

Oct 7, 2010

This is my case

1: I have two swf : a.swf n b.swf

2: I can't do any coding on a.swf but I can code on b.swf

3: b.swf loads a.swf

4: a.swf takes some params from html

5: Since b.swf now loads a.swf,how can I set loaderinfo params of a.swf from b.swf?

So is there any way I can set loaderinfo params from loading swf to the loaded swf.

View 3 Replies

Falsh :: Specify LoaderInfo Parameters In CS4 For Debugging

Nov 12, 2009

I am using LoaderInfo params in my Flash movie. Is it possible to specify sample flashvars in Flash CS4 during design time for debugging???

View 1 Replies

Actionscript 3 :: LoaderInfo Is Null In Flex?

Mar 27, 2010

I have a problem with Flex module. I want to access url variables by this.loaderInfo.url, i call a function in createionComplete handler of module and sometimes it works and sometimes it doesn't. (Can't access... null). Any suggestions?

This function is called in creationComplete handler of module. And although it throws error window, the alert with url shows and contains url of module.

private function checkModuleUrl():void
{
var url:String = this.loaderInfo.url;
Alert.show(url);
}

View 5 Replies

Actionscript 3 :: Flash - LoaderInfo From A Class

Dec 4, 2011

I am using flashvars to get some info. When im using LoaderInfo(this.root.loaderInfo).parameters from the main fla frame it works fine but how can I use it from withing a class? Something like this -

[Code]...

I'm getting this error message: Access of possibly undefined property root through a reference with static type. Hope someone could guide me how to overcome this.

View 1 Replies

ActionScript 3.0 :: What Is The Order Of Events For LoaderInfo

Nov 25, 2009

I would like to find documentation on the order of events for my_loader.contentLoaderInfo;

specifically: does init ALWAYS fire before complete?

View 5 Replies

ActionScript 3.0 :: LoaderInfo Url As Null For Too Long

Jun 22, 2009

I have a class that loads a handful of external swfs, and a preloader class to handle them all as a single object.I was having some strange problems with the loading process and tried tracing the urls to see which file was bugging. For my surprise, almost all loaderInfo objects reported theirs url as null.With a bit of testing I came to the conclusion that they only report some url when the file is almost completely loaded. The docs say something about "possibly wrong urls" before progress events, but that would be in cases where redirect happen, and everything here is local with simulate download option. Also, "event.target.url" inside the very progress event handler reports null unless the target's loading is almost done. Unfortunately I don't have any piece of code with less than a hundred lines to show. But is there any undocumented behavior, known bug or common coding error that generates such situation?

View 1 Replies

ActionScript 3.0 :: Set LoaderInfo Params From Flash?

Oct 7, 2010

This is my case1: I have two swf : a.swf n b.swf2: I can't do any coding on a.swf but I can code on b.swf3: b.swf loads a.swf4: a.swf takes some params from html 5: Since b.swf now loads a.swf,how can I set loaderinfo params of a.swf from b.swf?So is there any way I can set loaderinfo params from loading swf to the loaded swf.

View 6 Replies

ActionScript 3.0 :: Trace In For Loop Using LoaderInfo.parameters?

Apr 12, 2011

I want to get some flashVars parameters, but have a hard time getting them into any variable.
 
When using the following code :

[Code]....

the values are shown inside the SWF as expected. However, when adding a trace in the for loop, nothing is there.
 
Why is this, and how should I retrieve the variables?

View 6 Replies

ActionScript 3.0 :: Loaderinfo Event Listener Not Working?

Nov 9, 2011

I am which requires few things like;

1. swf should play if client open it at his end (this will be detected by checking a text file which has variable on the local drive say "C") swf should preload if finds flashvars from HTML file on server by user 3. if both of the above conditions dosent work then swf should not play

I have succeeded some what in this. if i run the file without preloader it work fine. but when i add preloader to it something goes wrong.

[Code]...

View 5 Replies

Flash - Delete Value In Loaderinfo.parameters Object?

Oct 17, 2011

Flash gives access to query-string parameters via calling loaderInfo.parameters() method.And I couldn't delete the field on the object. IS it possible to delete some fields in the object? how can I do this?

View 1 Replies

ActionScript 3.0 :: Find The LoaderInfo's Related Object?

Dec 5, 2007

I don't know if this is even possible, or if I'm going the right way about this.Here's what I've got:

ActionScript Code:
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, imageProgressHandler);
function imageProgressHandler(event:ProgressEvent):void {

[code]......

View 3 Replies

ActionScript 3.0 :: LoaderInfo Not Working Properly In Class?

Jan 7, 2011

The class that I am struggling with is not the Document Class. I've had great success grabbing variables using LoaderInfo there when building the page from the start. LoaderInfo works great there, I think I am struggling to understand how to use it with the nested classes.This class, SetBookMark.as, is imported into another class that controls button methods. When the user clicks the exit button, its supposed to set the cookies and close the browser window. I've done a lot of error checking and JavaScript alerts to ensure everything is functioning properly and my classes are pulled in correctly. The code I posted below from the navigation class I have built is just the important part showing that I have called the class, added it to the DisplayList. Everything works great other than where it fails to grab the closeTheWindow variable and what its set to.This is the variable in JavaScript that I am trying to grab using FlashVars and LoaderInfo.

Code:
document.movie.FlashVars = "closeTheWindow=true";
Snippet from navigation class that I pulled together

[code]....

View 2 Replies

ActionScript 3.0 :: LoaderInfo.bytesLoaded Not Hooked To External Img?

Jun 3, 2009

when I try loaderInfo.content it traces [object MainTimeline] but should trace the external image

View 1 Replies

ActionScript 3.0 :: LoaderInfo.parameters When URLRequestMethod.POST?

Aug 31, 2009

I have something like the following code:

Code:
var req:URLRequest = new URLRequest('child.swf');
var vars:URLVariables = new URLVariables();
vars.foo = 'bar';

[Code]....

but when I change URLRequestMethod.GET to URLRequestMethod.POST, I'm unable to. why, and if there's a workaround?

View 2 Replies

ActionScript 3.0 :: Access LoaderInfo And Call Functions In Class

Nov 30, 2010

how to access loaderInfo and also call functions immediately in a class.My game is 99% there, but for this problem, whenever I run the code in the order below, I get:Error #1120: Access of undefined property root.Error #1009: Cannot access a property or method of a null object reference showMessage();[code]Is there a way I can get the loaderInfo parameters immediately, and call showMessage() if previewcard is true?

View 5 Replies

ActionScript 3.0 :: This.loaderInfo.addEventListener(Event.COMPLETE Not Firing In Firefox?

May 10, 2010

I'm using this.loaderInfo.addEventListener(Event.COMPLETE to call a function when the flashVars are available as many tutorials/examples suggest. Is it correct to use it in the root of the main swf? The event is often not firing in firefox.

Here's the test code. Am I doing something wrong?

Code:

import flash.display.Loader;
import flash.events.Event;
var flashVars=new Object();

[code]....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved