ActionScript 3.0 :: Using External .swf Linkage Audio?

Sep 1, 2008

Because flash doesn't loop external mps file correctly, there is always a pause in the loop. The work around is to load the AIFF, or WAV, file into the .fla and let Flash compress the audio file, then the loop works without the pause. The problem with this is that when I have many music loops it takes a long time to publish and test, so in AS 2 I would publish .swfs that compressed the raw audio file and gave the audio file a linkage. Then I would load the .swf into the main .swf and access the loaded .swfs linkage file.

[Code]...

View 1 Replies


Similar Posts:


ActionScript 3.0 :: External SWF Runtime Linkage PNGs

Aug 11, 2008

Flash can compress .png files like Photoshop can compress .jpg files better than any other tool hands down. I have 77 .png files that are 1.8 .megs on my c: drive after I imported them and setting the file compression under the "File > Publish Settings" to 75% for jpg and published the .swf with all the .png on the stage the file size is 350K that's about 20% of the original file size of the .pngs downloaded file by file with 77 separate request.

I can create linkage in the shared .swf and test the movie with code in the shared .swf to add the movieclip holders for each:
.png to the stage but when I load the shared .swf into the main
.swf Flash acts like it can't create the classes based on the
Linkage I setup or that the MovieClip linkage doesn't exist.

I tried a test to have the shared .swf with all the .pngs and linked movieclips to add the assets to it's own stage and it works fine but that means a lot of my code and logic is included in the shared .swf that the designers need to add .pngs to. We need to have the main .swf get a handle of the linked .png assets and place them in the main .swf to load the assets to different parts of the main .swf. It's cute that the shared .swf can add the linked assets to it's own stage but not too useful.

Also the way we deploy we cannot roll out a new release/build to update the .pngs but we can upload a new .swf to the asset server so the .pngs need to be in a separate .swf. I can get the shared MovieClip to add the linked assets to it's own stage when testing and when loading my problem is the main .swf that loads the shared .swf cannot create instances of the classes that are exported for runtime sharing using linkage.

View 2 Replies

ActionScript 3.0 :: Default Value (uint=null) - Create An Object From A Library Symbol With Linkage 1180: Call To A Possibly Undefined Method [linkage Name]

Oct 16, 2009

Flex complains if I want to create an object from a library symbol with linkage: 1180: Call to a possibly undefined method [linkage name]. So to avoid this, I create a class for that symbol, in this case extending BitmapData using Flex's new ActionScript Class feature. Flex create that class for me and the constructor looks like this: public function CustomBitmapData(width:int, height:int, transparent:Boolean=true, fillColor:uint=null)

[Code]...

View 6 Replies

ActionScript 3.0 :: Duplicating MovieClip From External SWF Without Explicit Linkage

Mar 5, 2010

In Flash CS3 I was able to duplicate any MovieClip from an external SWF by loading the SWF, and then executing the following code:
var targetClass:Class = MovieClipToDuplicate.constructor;
var duplicate:MovieClip = new targetClass();

Note that the MovieClips I was duplicating did NOT have any linkage explicitly defined. Flash would automatically assign a unique class to each MovieClip. Now, in Flash CS4, when I try to do the same thing the .constructor property returns only the "MovieClip" class, such that the "duplicate" variable above is but a blank MovieClip. If I compile the external SWF using CS3, my old code still works. But I want to do it in CS4.

View 4 Replies

Professional :: Linkage : Cannot Find The Linkage Instance?

Apr 20, 2010

I'm trying to create a linkage to swap movie clip dynamically. I already create a linkage and after my movie clip symbol actuall say Export: contact_idea. But when I try to attachMovie("contact_idea"). It does nothing. Is there anyway that I can test that the linkage is actuall linked?

View 2 Replies

ActionScript 3.0 :: Refer To A Class Linkage Set In Library From External Code?

Jan 12, 2011

If one uses [Embed] to refer to external graphic assets its easy to instantiate and use them.However, I've got a png in an Fla, with the Class identifier set to "Symbols", Base class is BitmapData.I need to instantiate it like this:

var symbols:BitmapData = new Symbols(1, 1);
addChild(new Bitmap(symbols));
 
Of course the compiler complains about a call to a possibly undefined method Symbols.For a temporary fix I guess i'll put the graphic external to the swf, but for this project it needs to be in the library along with everything else.

View 9 Replies

Flash :: Actionscript - Remove The Audio - Put The Audio Into A Byte Array And Then Re-add The Audio To The Flv Video?

Aug 6, 2010

If I import an FLV video is there any way to remove the audio, put the audio into a byte array, and then re-add the audio to the flv video?

View 1 Replies

ActionScript 2.0 :: Have Audio As External Mp3

Nov 29, 2006

What's wrong with this code? I'm trying to have audio as external mp3.

Code:
myAudio = new Sound(myAudioMC);
myAudio.loadSound("mix.mp3", isStreaming);
myAudio.setVolume(20);
myAudio.start(0, 999);

View 1 Replies

ActionScript 2.0 :: FLV Player With External Audio

Mar 2, 2009

I have a flv file which is in spanish and I want to show the original video but I need to play the audio file which is in english. The length of the video and the audio file is same but I need to mute the audio of the video file and play the external mp3 file instead of it. Also the files will be hosted on a server and so the Streaming should be done for the video and audio simultaneously.

View 2 Replies

ActionScript 3.0 :: External Swf Audio Keeps Playing?

May 21, 2010

I have a big problem that the audio of the external swf keeps on playing on top of other swf after clicking another button.

I have about 22 external swf files that are called up after clicking on their respective button. However, the audio keeps playing on top of the new swf that is selected. It thought the "removeChild(loader);" would work but it doesn't remove the audio.

I don't know if this may be an issue, but along with every swf that plays there are 3-4 .flv videos that are included in the swf. I have included the code.

import flash.display.MovieClip;
var Xpos:Number = 220;
var Ypos:Number = 105;
var swf:MovieClip;

[Code].....

View 6 Replies

Actionscript 3.0 :: RemoveChild Won't Get Rid Of Audio In External Swf

Apr 16, 2009

I have a container swf which is used to load multiple external swfs into a blank movie clip. Done as follows:

blank_mc.addChild(externalSWF);

This works fine, however I've got a weird issue with audio. Some of my external swfs have audio clips in them and for some reason the audio doesn't go away when a new external swf is loaded. So say the user loads a swf with audio in it and the user switches to another page, the audio from the previous page keeps playing even though a new external swf has been loaded into the blank movie clip.

I tried using removeChild before the new external swf gets loaded, but that didn't seem to do the trick. Audio is loaded to the timeline like so:

var audio:Nasdaqbell = new Nasdaqbell();
audio.play();

also tried the audio on the timeline as "stream" and "event" and got the same results.

View 4 Replies

ActionScript 3.0 :: Stopping Audio In An External Swf File?

Nov 18, 2008

I managed to use a loader to load an swf that has a video/audio track encapsulated within it. It starts and plays fine. Because of property rights considerations, I must use the provided swf with the video within it rather than converting it to an FLV.

And using the unload command I get the video portion to stop, but not the audio.

I know that I need some kind of audio stop to stop the audio, but haven't been able to figure out exactly how.

The parent swf is pretty simple, no buttons, it just plays 6 external swfs under control of another program that starts it and stops it with no other interaction.

View 6 Replies

ActionScript 3.0 :: Loop External Audio Files?

May 14, 2009

I would like to have an external file (actually, one of several randomly selected files, but I can handle that) play and loop but I have yet to understand how to do the latter. My code works great for playing the file through one time, but when playback completes, it's done. How do I loop the audio? Is there perhaps a listener that can wait for the file to finish playing, then call a function to play the sound again?

View 3 Replies

ActionScript 3.0 :: Unload Flv Audio From External Swf Using UiLoader?

Aug 22, 2011

I have a small flash website where one of the pages has an embed flv video with sound. I need to it unload when the next swf is called through uiLoader. This is the code I am using to call the swfs.

Code:
but1.addEventListener(MouseEvent.CLICK, loadsSWF);
but2.addEventListener(MouseEvent.CLICK, loadsSWF);

[code]......

View 0 Replies

ActionScript 3.0 :: Listening For The End Of External Audio Files?

Aug 22, 2011

I have an event listener that is listening for the end of an eternal audio file. I want to move to the next page after an external audio file has completed playing: here is the code I have so far:

ActionScript Code:
d1Channel.addEventListener(Event.SOUND_COMPLETE, soundComplete, false, 0, true);
function soundComplete( e:Event ):void {
gotoAndPlay("next_page");
trace("sound over");
}

This seems to work intermittently. Sometimes it will, and other times it won't. Is there anything wrong with my code or theory. Is there a better way to do this that will yield more consistent results? Or do I need to import any Flash Events?

View 5 Replies

ActionScript 3.0 :: External Audio X Animation - Sound Delay

Feb 8, 2011

I have a few animations that run on different scenes each time a scene is loaded the external audio should start with it. Well here is the thing the animation always starts before my audio files and each scene gets bugged. I need to create an action that only allows my scene to start with the audio and also starts loading the next audio so it wont be dellayed.

On the first scene I have the following code:
scene 1 frame 1
var autoPlay:Boolean;
if(!autoPlay){
stop();}
scene 1 frame 2 animation starts and audio 1 loads
import flash.media.Sound;
[Code] .....

View 3 Replies

ActionScript 3.0 :: Pause/Resume Audio From External SWF Loaded

Jun 20, 2011

loaded an external swf (with audio) in a conteiner swf.
 
From the cointeiner I want to controll audio pause/resume.
 
I know the procedure to do this with a mp3 file, but I can't  intercept the sound channel of my child swf...
 
this should be the code to obtain the sound position:
 
var soundChannel:SoundChannel = new SoundChannel();
var sound:Sound = new Sound(new URLRequest("SOUND.mp3"));
soundChannel = sound.play();
pausePoint = soundChannel.position;
  
But I haven't the mp3 path.... My mp3 is embedded into swf child. And I can't put actionscript function in child, because is haven't source fla.

View 5 Replies

Professional :: Turn Off Audio When External FLV File Is Closed?

Jul 19, 2011

This is part of my ongoing issue with 6 video files in six Scenes.I have 6 videos there were imported as enbedded, one in each scene. the first four play but the second two do not.whichever order i place the scenes, it is always the last two that pause at the first frame.o try another approach, I linked instead to a video externally. This seems to work, but, when I click a button to go to another scene the audio from the previous scene is still playing when the new video starts.

View 22 Replies

Professional :: Loading External Audio File In Array?

Dec 7, 2011

I have figured out how to load an external video file - and I can play an imported audio file, but I can't seem to use either method to load an external audio file into an array.

Here is my audio code:
var tour_audio:Array = [tour1, tour2];
var my_num:Number= Math.floor(Math.random()*2);
var ChosenSound = tour_audio[my_num];
var playing:Sound = new ChosenSound();
playing.play();

Here is my video code:
var my_videos:Array=new Array ("link1.mp4", " link2.mp4", " link3.mp4", " link4.mp4");
var randomIndex = Math.floor(Math.random()*my_videos.length);
my_player.source = my_videos[randomIndex];
I tried "var tour_audio:Array = ["link1.mp3", "link2.np3"]; - but that did not work.

View 9 Replies

Flash :: Merge Two Flv Files (contain Audio) In PHP Without External Program?

Nov 1, 2010

I need to merge two flv files, using PHP. I can't use exec method. I am wondering if is possible to cut some part of one flv file (audio tag) and paste to another and overwrite duration for output file. [URL]..file-length-using-pure-php but I do not know how can I get an audio tag from a flv file? How many audio tags a flv file has? Which tags should I overwrite in output file to be able to play audio from two merged files?

View 1 Replies

Actionscript 2.0 :: Controlling Volume On External Audio Clip

Jan 26, 2010

I've designed a website for a client and it's completed but she's complaining that the music on the website is too loud. I made a button so you can turn the sound on and off, but i have no clue how to make a volume button for an external audio clip and i haven't found a single tutorial on the internet that can help me with this specific issue. Can someone help me with this and give me a step by step instruction, including any code i need.

View 1 Replies

ActionScript 3.0 :: Getting External Audio And Video Files To Start At The Same Time?

Jan 16, 2010

I've got a swf which uses AS 3 to load separate audio (mp3) and video (flv) files. The reason they're separate is because the audio is just background music while the video is navigatable. The video kinda goes along with the audio, but it's not imperative that the two sync perfectly. However, the audio always starts playing before enough of the video has loaded to begin streaming.I'm at a loss as to how to get the two to at least START at the same time.

View 14 Replies

ActionScript 2.0 :: External Audio Not In Sync With Text/screen On Windows XP?

Sep 23, 2011

I created a Flash program that utilizes audio and text. The audio is located in an external folder and is loaded using .loadSound(). The text is located on the timeline and appears based on a certain time in the audio. I have a pre-loader that looks to ensure all of the external audio is loaded before the user can move onto the appropriate screen and the audio would play. This is using a combination of the .getBytesTotal and .getsBytesLoaded.

It works fine on Windows 7 but doesn't seem to be working one particular user's Windows XP on IE 7 (So it's not happen on all Windows XP). On a particular user's computer, the text is slow to load while the sounds loads pretty quickly leaving the text out of sync. After a few screens, the text will catch up with the audio.

View 6 Replies

ActionScript 2.0 :: Make External Streaming Audio Sound File?

Mar 8, 2007

Is there a way to make external streaming audio sound file "mp3" loop. my understanding is that streaming audio won't loop, only works for attached sounds...

var my_sound:Sound = new Sound();
my_sound.loadSound("jazz.mp3", true);
my_sound.start.(0, 99)

This actionscript works but it won't loop..

View 3 Replies

ActionScript 2.0 :: External Sound - Load Audio And Have It Ready For After The Preloader

Apr 17, 2007

how to load audio and have it ready for after the preloader. I had it export for actionscript before but it loads before the preloader starts which really elimates much of the need for the preloader. I took off the linkage for it to load for frame 1. I search the forums and saw that a few people recommended following link

[Code]...

View 3 Replies

ActionScript 1/2 :: Turn On Audio For External Flv On Replay When Previously Muted While Playing?

May 3, 2011

I have a project where an external video plays with cue points that  trigger the elements on my main timeline (captions). I have a custom mute button  for the video so that the guy talking on the video can be muted if necessary (did not use a skin for video controls but set it up as a button). The problem is, when I reach the end of the video and I click  a "replay" button to restart at the beginning, the timeline and video start but if the video was muted previously, the video remains muted while my button shows that it isn't. How do I  get the audio to turn back on automatically when restarted, or at a minimum show that it's still muted when replaying? My replay button AS2. mcPlayer is my flv.

[Code]...

View 9 Replies

Flash :: External Audio Processing Technology Player Interact With In Realtime?

Apr 3, 2012

There may be more than one answer to this, but I'd like to know if there's some technology out there that exists to handle Audio Processing / Playback in realtime, so that Flash can:

Interface with the technology / plugin to generate sounds with no delay or lag. Apply DSP effects (Reverb, Delay, Dynamic Range Compression / Expansion, Distortion, etc). Manipulate DSP parameters in realtime (sweeping an EQ filter's band or Q).

The most important thing of all, would be for this technology to be available to most users, as it would likely be used for Gaming environments or online Audio production, even. So far, Flash has a few ways to manipulate Audio Data, such as the SampleDataEvent, Andre Michelle's Popforge library, chiptune libraries like SiON, and possibly some other unheard of libraries.

I'm not really convinced though, that these methods are the optimal ways to create interactive sounds - sounds that change depending on game conditions, sounds that closely responds to the users actions. Nothing (that I've seen so far) easily allows developers to create or communicate with a DSP effect in order to manipulate the sound in this way, in realtime.

I know that Flash has the ability to communicate over sockets / ports, so perhaps there is an existing library that can communicate with an external plugin, and can be easily distributed to users at the same time.

Is there such an audio solution out there?

View 1 Replies

ActionScript 2.0 :: Building A Project That Dynamically Loads External Images And Audio Into It?

Nov 14, 2009

I'm building a project that dynamically loads external images and audio into it.The images in the external folder are numbered sequentially in the order they display as you click through them (1.jpg, 2.jpg, 3.jpg, etc). No problem.There is audio that is supposed to fade in a play with certain images. (1.mp3 fades in when 1.jpg is displayed.). No problem.Here's where it gets tricky... At least for me.Not every jpg has an audio file associated with it. The last audio that was triggered needs to keep playing until another jpg with cooresponding audio file plays, at which point the two audio files need to smoothly crossfade.1.jpg displayed => 1.mp3 fades in and plays.

(user clicks)
2.jpg displayed => 1.mp3 crossfades to 2.mp3.
(user clicks)

[code]........

View 5 Replies

ActionScript 2.0 :: Use Video Component Control To Set Volume For External Audio Clips

Mar 10, 2009

hope i'm explaining this the right way. i'm using the flash flvplayback component to play a video. i've stripped the audio from the flv and am playing it, along with another audio clip, on the timeline at the same time. volume has been set for both clips, but i need to allow people to adjust the volume from the volumeBar that exists inside the video player. it's built in as2.

View 1 Replies

ActionScript 3.0 :: Call To Main Timeline, After External Video Or Audio Is Done Playing?

Aug 3, 2011

I am curious if there is a way to call back to the main timeline using AS3 after a video clip or audio clip that is being loaded externally, is done playing? For instance: you get to a page with a video on it, but when the video is done playing, instead of just sitting there, it automatically takes you to a new page (framelabel).

View 9 Replies







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