ActionScript 3.0 :: Externally Loading MP3 Player (XML Driven)
May 6, 2010
I have a project that first loads a preloader swf then loads a main swf. Next, other swfs load externally into the main swf. One external swf is an xml driven mp3 player. The player runs fine when opened on it's own, however, when it is loaded into the main swf, the playlist isn't actually showing up, nor is the audio playing. The components, combobox, show up but playlist is not populated nor do the controls work. Below is my source code. Note: the playlist, mp3 files, and external swfs are all in the same directory.
Code for preloader swf
Select allvar l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("test_flash_16.swf"));
function loop(e:ProgressEvent):void {
[Code] .....
make an xml driven player with a couple of tuts of the net.Here is the code:
Code: var xmlRequest:URLRequest = new URLRequest("content.xml"); var xmlLoader:URLLoader = new URLLoader(xmlRequest); var imgData:XML;
[code]...
It displays both images and movieclips.How can I make it that it when a movieclip is loaded it waits for it to finish and then switches (rather than the 2 sec swap I have right now).
I have an actions layer and a layer with a video object, called "theVideo". Below is the actionscript:
stop(); // global objects.... buffer._visible = false; // playlist object for the playlist from raw xml data
[code]....
This script works locally. I have checked and double-checked the file locations when uploaded. It will parse the XML file when uploaded, but will not play the videos.
I bought a flash site template that loads xml driven swfs inside the main swf as different menu items are clicked. The modules that come with the template work fine, but I don't know how to add a third party xml driven swf, so that it shows up properly. While the third party swf works fine as a standalone, the embedded version loads just an empty movie.
I'm have a flash movie where I let the viewer push a button to load an external SWF-which in itself is a video I converted to SWF. Once it loads via an empty movie clip into the main flash movie how can I add video player controls such as volume on the lower part of the stage of the main movie to control the externally loaded SWF?
how to make it so that it is always centered horizontally in the middle of the browser window. I am having issues making it so that it is centered vertically between 150pixels from the top to the bottom. This will make it so that if the window is small the swf will be right at y=150 but if the window is large it will have equal spacing between the top(150) and the bottom of the window.
I know how to build a simple slideshow. The particular slideshow that I'm working on has 50 images, and with all those images in the library, it makes the file 23MG and takes forever to load.Should I load the images externally? I know how to do that when using a thumbnail, or button, but how would I do that so that it loads in as a slideshow?
What's the proper way of loading an flv movie externally? I was doing a project in class which utilized tweenlite and loading of a couple videos externally in a folder. The swf worked fine and even the html looked fine, but once it was loaded into the schools server, the site didn't show. The professor is not really fond of actionscript, but she does have a grasp on HTML related issues. She told me it may have been a problem with the video loading file. This is the script I used to load the file in:
var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetStream(nc); ns.client = {};
I've been trying to get this actionscript 2.0 to work on more than one movieclip. It works fine on the one object:
[Code]...
When I try to add the code to other objects it only works on one. So can anyone explain to me how I can apply the code to multiple objects? I want more than just one object to rollover glow. Also, can it work on externally loading text moveclips (ie movieclip_mc.myText01_txt)?
Im have 5 swf files that I want to play one after another on my home page.
I would like to have the first movie load and play and while that is going on have the others downloading in the background so they are ready to start when the first movie finishes.
After the 5th and last movie has played I would like it then to return to the first movie and just loop this process continually.
I have attached what I have at the moment which is a file called demand.fla that uses buttons to load in demand001, demand002, deamd003 etc.
Ideally i would like demand to load in each slide automatically and then have flashmove onto the next one after 5 seconds or so.
In the following application images are attaching from library as bitmap. But i want to load it externally.Actually what I am trying to do is that i want to divide an image in to several pieces and giving a disolve effect for transition. I got a code in which images are loading from the library as bitmap object. I changed it and loaded externally using bitmap, but i cant divide images in to small pieces. I think its due to the problem of loading as bitmap.i just want to modify the following code to load image externally.
when I press a button, the text loads into the still visible imageArea_mc text area.When a button is clicked, I have external swfs which contain 2 dynamic text boxes, named heading_txt and content_txt, loading into my main movie. They are receiving their data dynamically from an XML file. The problem I am having is that as soon as the button is clicked, the new data loads into the still visible text boxes. What I want to do (I think) is somehow tell the main movie to assign the appropriate text for each individual movie.
ActionScript Code: var myXML:XML = new XML(); myXML.ignoreWhite=true; myXML.onLoad=function(ok){
I'm using this code to load a .jpg into a movieclip with the instance name picholderCode:_root.picholder.loadMovie("pic.jpg");How do I get getBytesTotal() or getBytesLoaded() to work with this picture? I've tried to get the total and loaded this way:
Code: _root.picholder.getBytesLoaded() But it doesn't seem to work
It seems to work fine when I uploaded it to my testing site. It loads the correct swf and I can click on my menu link (the only other functional button with the action scripting) to go to another swf and it transitions correctly. Here is the problem:
After clicking on the menu link and trying to click back on the home link (containing the same swf as what initially loads) to redisplay the first swf, nothing happens. Then the menu button is unfunctional after that as well.
I've been pulling my hair out trying to get transitions sequences between externally loading swf's in my flash site.
I have the jist of how to load external images into as3. One thing that I do not understand is how to pull all the images needed and store them so that when you want to view a specific image it is not loading the image again.
I need help on how to pull about 10 images externally and store them in to movieclips or something so that when I roll over a button to display this image it will just call the movieclip and display the movie clip with a preloaded image already. I am also doing this dynamically.
I have an image viewer which has both next and prev buttons and a thumbnail menu at the bottom. They are both loading images from the same array, I need to get them to talk to one another. For example: if I click one of the thumbs to take me to array4, then click the next button it will recognize array4 and go to array5. Right now the thumbnails don't send that information to the rest of the script.
Here's my script: stop(); import mx.transitions.Tween import mx.transitions.easing.* var photos_arr:Array = new Array( [Code] .....
I have a main swf file in that i have an empty movie clip in which i want the external swf to load...i made buttons n i have given gotoAndPlay specific frame function for them and... wen it enters that specific frame i have given loadMovie function in actions layer for that specific frame... but i dont know how to make a preloader for that so that it loads the external swf..
I'm trying to do the tutorial on scrolling dynamicly loading text- easy enough...I don't have a scrollBar component in the UI's and when using the one from the open source tutroial it doesn't snap to/resize to text box.....then whne test movie I get **Warning** Scene=Scene 1, layer=text, frame=1:Line 1: The identifier 'loadVars' will not resolve to built-in object 'LoadVars' at runtime.
I am making a website and am having a very hard time with the actionscripting and external loading involved. I have managed to auto load the background externally but the problem is that once the bgload movie(which is loading externally in main.swf) is loaded, it goes back to start. make the "bgload" movie stop right there after its played once....
I have a file that loads text from a notepad file externally. This is working fine. But when I try calling this animation from another flash file (using loadMovie), I do not see any dynamic text attached to the child file.
I realize that title sounds a little confusing, but what I am trying to do is copy this style of site[url].... I have created all of the swf's for the main index of the site, but am way out of my league on how to load them into a certain position in a single movie clip so that a drag bar can slide the movie clip left and right. I have read a few posts on external loading, but am not really sure on how to implement them to achieve this look.
I have a few questions... All of which have to do with this website: [URL] 1) First off, is there any way to pre-load externally loaded .jpg's so that there is no time delay between each background image? (You can see what I mean by clicking the "-" and "+" buttons on the bottom left corner. Here is the code that I'm using for the background images/buttons:
I'm trying to apply CSS to text that is loaded from an external text file. Now, it works fine when I play it in the movie file "current.swf". Here is the code as it is-
Code: var format = new TextField.StyleSheet(); var path = "jbcss.css"; format.load(path); format.onLoad = function(success) { if (success) {
I created files main.fla and Main.as. In main.fla I set the document class as Main. Now I want to check if the main.fla file is loaded. In AS 1 I used _root.getBytesLoaded...getBytesTotal. How can I do this in AS 3.This is the code of Main.as file.
I'm trying to make an MP3 player with art and text associated with each of the 4 songs I need included, but I can't figure out how to load more than one song into the player. The first song loads and plays fine, but when I try to load another one of the songs, I'm given this error:
Code: Error: Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful. at flash.media::Sound/_load() at flash.media::Sound/load() at RealSite_fla::mp3player_mc_6/goGS86()
And here is my code: var req:URLRequest; var sound:Sound = new Sound(); var controller:SoundChannel; var volumeControl:SoundTransform; var soundPaused:Boolean = false; var position:int; function loadSound(event:Event):void [Code] .....
So we have a basically skinless video player embedded in a web page. Works fine in Firefox, Safari, Opera... but... in IE... if you type the URL in the browser, it works fine... however if you go to the page from a link, the player renders only the very bottom right of the video skin, as if the align property were seriously out of whack.The video player is 360 x 480 and when broken shows up all white, with the player controls in the top 60 x 10 pixels or so.