ActionScript 2.0 :: Play A Variable Linked To Soundfile?
Oct 26, 2005I have a variable named 'SoundFile' that's linked to a DB dir /audio/sound.mp3. How do I play this sound file with the variable?
View 1 RepliesI have a variable named 'SoundFile' that's linked to a DB dir /audio/sound.mp3. How do I play this sound file with the variable?
View 1 RepliesI have a .flv flash video using the 'steelexternalall' component that works fine when I preview it from it's .fla file to it's .swf.
The problem is when I link to it from my main movie (clicking on a btn to open it in a blank movie clip' it will not open!!! I can't get my head round this & am losing my marbles! I have all the files (including the 'steel' component) saved into the same folder.
It is easy to be confused I'd bet but I will try to spell it out very simple I have this micro site that has 4 flv videos linked from where I uploaded them. The videos seem to work fine, if I type in the directory to the site itself.. (mysite.com/myswf.swf)
But when i utilize a preloader file, that loads the site, the videos do not load. I figure it is some linking break in using a preloader swf. Because the preloader has a different name, then the site's swf, how should I write out the directory to the flv files in the site flash file so it can load when using a preloader
How can find out the linked url of the image in the flash of a website? I looked for the image url some time. but couldn't find itif find the linked url of the image, and i want to alter an image linked url address. where is the code in?
View 3 RepliesOn the mxmlc command line, I can include paths to RSL files. I can choose to link these RSLs at runtime by setting
-static-link-runtime-shared-libraries=false What if I need to link to some rsls and embed (static-link) other rsls? Is there a way to set the link settings for each rsl?
I want to load a soundfile (wav or mp3) into my application. The soundfile are set in the xml file, so what i need is some code to load this and play it.Here is what i do, which does not work:
speaker.stop();
mysound = new Sound();
mysound.onSoundComplete = function() {
speaker.stop();
};
mysound.loadSound("/welcome.wav", false); [code].....
I want to load a soundfile (wav or mp3) into my application. The soundfile are set in the xml file, so what i need is some code to load this and play it.[code]
View 3 RepliesI'm desperately searching for a way to get the frequencys of a soundfile without having to play it.I was shocked to see that the computespectrum method only processes real-time sound.I made some research and came across this. Ok so now I'd have the array of the amplitudes.Next step would be to make the Fast Fourier Transformation.
What I tried so far :
- Load external C++ dll. With fftw and SwfStudio. I failed at understanding how to create an SwfStudio Plugin or even to understand how to implement that software in my actionscript code.
- Try to Transform the C++ code to actionscript. Well, this guy could do it. He has exactly what I'm desperatly trying to do. If he'd ever release his source but I failed at understanding how the transformation process works.
- Letting Java do the work and then read the Data from an external swf.Ok, this could've worked if I could only use Actionscript 2. It seems that AS3 can't read variables from imported AS2 swfs.
I have an application using a form and screens. i would like to attach a soundfile to a particular screen. When I try to attach the soundfile to the particular screen the audio file starts playing as soon as the app begins to run..
View 3 RepliesFrom this AS3 code I expect 500 lines of trace outputs that contain "2048". But instead I get only some lines containing "2048". The rest of the traces print a "0" which shows me that the extract() method did not return any data.
Why is this the case? I would like to iterate through the soundfile with a specific amount of steps to extract 2048 bytes of the sound at the respective position. Extracting the entire soundfile at once would freeze the flashplayer for seconds and is therefore not a good solution for me.This behaviour can be found as long steps is smaller than samplesInSound/2048.The closer it comes to that value, the more lines with a "0" are printed compared to those with a 2048 in it.
var sound:Sound = new Sound();
sound.load(new URLRequest("soundfile.mp3"));
sound.addEventListener(Event.COMPLETE, soundLoaded);[code].....
I had the idea that the extracted part of the soundfile is cut out of the rest of the soundfile after extracting it (like at Actionscript 3 - Sound.extract method empties sound object data), so I tried out another for loop:
for(var i=0; i<samplesInSound - steps * 2048; i += Math.floor(samplesInSound/steps) - 2048) but this didn't work out either.
Is there a way to change the speed of audio/video playing in VideoPlayer or any other such control?Let's say to play voice recordings of slow speaking persons faster to save time.Some mp3 players (e.g. COWON S9) can keep the pitch to avoid funny voice.
View 1 RepliesI have a dynamic field text on stage called: mca .This dynamic field stores a MovieClip name.I am trying to play this dynamic MovieClip through a variable like below:
var myVar = String(mca.text);
_root[myVar].gotoAndPlay(61);
It is not working!! It works in AS2 but not in AS3. How can I do this in AS3?
I have the movieclip playing inside a variable but I can't figure out how to declare "play();" and apply it to the variable.the variable is called "player" and it contains any one of 3 movieclips.
View 3 RepliesI have three buttons: each one changes a variable to a name: one, two and three and plays the movie.
when the movie gets to frame 100, it should get the variable and play the label with the same name of the button...
How should be the AS of this frame so it plays to the correct label?
Here is my code Action Script Code:
var myVar:String = LoaderInfo(this.root.loaderInfo).parameters.myVar;
var snd:Sound = new Sound(new URLRequest(myVar)); var channel:SoundChannel = snd.play();
Here is the HTML embed:
[Code]....
I'm trying to play through a MovieClip frame by frame using setInterval. Overall I'm trying to imitate speeding up and slowing down of the MovieClip by changing the setInterval time. Basically, when a user moves the Slider the MovieClip needs to speed up or slow down based on the Slider value. EDIT: The code above works to a certain extent. As in the slider updates updateClip() and the MovieClip does actually play at one speed. But the MovieClip does not play at the speed variable value. If I remove the ClearInterval() the MovieClip just plays at one speed but then doubles when the Slider is changed. What I'm looking for is the MovieClip to play at the same rate as speed value.
[Code]...
I'm trying to create a simple SWF file that can receive the name of a FLV file in the HTML file and play it since I have many FLV files. Basically using the technique of FlashVars. I've set the contentPath/source in the components to be blank, and set my actions in the first frame to be player.source = filename, as was instructed to do so in a Flash book I am reading. I then set the "filename" variable to a file in the same path as the web page in the HTML file, however, all I get is a blank Flash player skin. The FLV file will not load. I also tried setting the "filename" variable to load the FLV from a public website in the same domain and on another domain, but it still doesn't work.
View 5 RepliesI would like to pass a value from a text box on stage as the URL or filename to the NetStream.play() argument. example:
var url:String = url_text.text;
var conn:NetConnection = new NetConnection();
conn.connect(null);
[Code].....
The point of the matter is that I'm pulling the values from JavaScript/HTML using the ExternalInterface which changes as the user selects next on a HTML page. The page name (URL) is being parsed and passed back as the video filename. I'm using the text boxes currently just to test/view the values being received and sent to JavaScript. The value send and receive fine, I just can not seem to pass the value into the NetStream.play(JavaScriptValue).
function getTextFromJavaScript(str:String):void {
sending_ti.text = str;
var jsArgument:String = sending_ti.text;
[Code].....
for example i have 2 movie clip, clip1 and clip2, and i want to play one of them, which defined in a external txt file variable like this:&c=1& or &c=2&my problem is, i have just one frame to make this!i tride to make simple my question, it's a bigger project!there is more than 2 movies and can't use if(), i just want to change the number of end of movie clip instans name some thing like this:
ActionScript Code:
clipname= "clip"
var trc = new loadVars()
[code]....
I have a movie embedded and I am passing a variable to the root movie for it to play when the embedded movie is complete. I know the variable is getting passed because I am displaying the value in as dynamic text but the parent movie will not play. This is what I have:
stop();
row = 0;
if (row == 1) {
this.gotoAndPlay(2);
}
Row is being passed from the embedded movie as
_root.row = 1;
I know there is a way to tell the parent movie to play from the embedded movie by using TellTarget but I would like to find out why this doesn't work.
I have three buttons: each one changes a variable to a name: one, two and three and plays the movie.when the movie gets to frame 100, it should get the variable and play the label with the same name of the button...How should be the AS of this frame so it plays to the correct label?
View 1 RepliesI have an if like this:
on (release) {
stopDrag ();
if (_root.go_blue._droptarget == "/g_target")[code]...
This works. I need to add "if (test = "one")", another drop sets this variable and the drop above should test for it. But I can't get the basics right! I'm a programmer who is new to Actionscript. What I want is:
"If the variable is correct AND if it is dropped on the target (g_target) THEN play the movie, ELSE go back to _x=130, _y=300."
The variable is being assigned correctly, I tested it with a Dynamic text box. The movie isn't running with my code!
Whenever I add a new layer, it seems to be linked to my 1st layer.If I delete something on the stage on the new layer, it's also deleted from the 1st layer. If I try locking the 1st layer, anything on the new layer-although not locked itself -can't be selected.
View 2 RepliesI am currently making a website in flash for a football team and i would like to make a list of all the players names which link to separate player profiles in the same flash document.
View 4 RepliesI am using the loader class to load an external swf and attach it to an empty movieclip, the final step follows:
// function loadComplete(e:Event):void {
mc_launch.addChild(gLoader);
MovieClip(gLoader.content).gotoAndPlay("start");}
When navigating away from the movie clip, it's dumped as follows:
MovieClip(gLoader.content).closeAllStreams();gLoader.unload();
The linked swf has two important frames in the beginning. The first frame is labeled "hold" and has the following:
var gSC:SoundChannel = new SoundChannel();
var gSCBusy:Boolean = false;var gSlideIndex:Number = 0;
var gAudioPosition:Number = 0;
var gPlayList:Array = ["start","slide01","slide02"]
var gAudioList:Array = ["intro.mp3","",""]
var gRunMode:String = Capabilities.playerType;stop();
The fifth frame is labled "start" and the singing and dancing begins from there. The stop(); function in the first frame is used to prevent the loading swf from executing before its 100% downloaded (I had some early trouble where the music would start before the screen assets were in place). My problem: This works perfectly the first time the linked swf is downloaded and attached, however, if you navigate away and then back I get the error "gSlideIndex NAN" which indicates to me that the first frame in the linked swf is not executed on subsequent attachments, the playhead jumps straight to "start" and my globals are never declared. Why would a linked swf execute frame 1 the first time it's attached to mc_launch but not the second?
Sounds simple enough. I have a number of swfs (quiz01.swf, quiz02.swf.....) all linked to one quiz.as file. The quizes in turn are loaded by another swf, Main.swf. I need to get the name of the specific quiz that is loaded, so I can identify an external xml file.
Tried using the "loaderURL" in the as, but it gives the name of the Main.swf. How can I just get the name of the swf that is associated with the quiz.as file?
I have an external .flv and I simply need to be able to pause it with a frame action and start it back up with another frame action.I found some references to "flvStream.play" through google but I haven't been able to properly implement it.
View 3 RepliesI've got an FLV video linked to an external SWF (a substage) that is itself linked to another SWF (the main stage) The FLV plays fine if I publish and run the substage independently but when the substage is loaded into the main stage at runtime I lose the video, all the other screen elements from the substage work fine. I thought it might be a path issue so I hardcoded a fully qualified URL as the video source with the same results; works independently, fails when loaded into the main stage at run time.
Flash CS5/AS3 using the video player component.
I'm trying to add a sprite to a stage made from bitmapData I link to from the library with the identifier pointerGraphic, here's my code:
Pointer.as
package com.George.BMIapp
{
import pointerGraphic;
import flash.display.BitmapData;
[Code]....
Yet nothing appears on the stage, yet there are no errors (I'm in strict mode with debugging enabled).
I am using linked TLFTextField in flash cs5 and want to access the text of a particular TLFTextField within the chain. Is there a way to access the text in a TLFtextField within a chain
View 0 Replies