Professional :: Using Same Function To Read Audio In Different Scenes

Mar 6, 2010

I have a flash movie that moves ahead in the animation based off the audio. I've broken the movie up into a few scenes so that I can keep things really easy for myself. However because I'm using the same function to read the audio in the different scenes I'm getting a duplicate function error. Original Function that works great in the individual scenes but fails when played together:
Scene 1Scene 2import fl.video.MetadataEvent;
audio.addEventListener(MetadataEvent.CUE_POINT, cp_listener);
function cp_listener(eventObject:MetadataEvent):void{
[Code] ....
How to end the listeners after they have finished. I have no idea if that will work...

View 3 Replies


Similar Posts:


Professional :: Playing Audio At Certain Scenes?

Feb 8, 2012

im trying to play an audio file through 2 certain scenes in my project. for some reason i cant manage to do it, only to stream in through the entire project.

View 9 Replies

Audio Played From Timeline In Multiple Scenes?

Sep 14, 2009

I just started using CS4. I have one problem with audio played from timeline in multiple scenes. The first 2 sceense work fine but the 3rd one has problem. The audio would pick up the last brief second of the audio before the current one and then plays the current audio. The pick up includes the last second of the last audio of the previous scene or the clip from the current scene.

If I copy all the frames in the problem scene into a new file, audio plays perfectly.
 
Have anyone seen something like this and what is the cure?

View 4 Replies

ActionScript 3.0 :: Use A Function In Multiple Scenes?

Feb 27, 2009

I have a .fla project being created under CS4, using ActionScript 3.0, that consists of multiple scenes.

In the code attached to the first scene, I define some functions that are used as methods on buttons[code]...

View 1 Replies

ActionScript 3.0 :: Transfer The Main Function To The Other Scenes?

Sep 28, 2008

I have a function with codes (variables, events, and events) that perform one after another. However, after the last code performs the main function ends. I want the codes inside this function to repeat itself after the last of the code perform.

How do I get those codes to do that?

Here is an example of what I have: see attach code.

I have continuous stated but of at the moment, the logo does not continue. I am guessing that I need maybe to put this in a loop. If this is so, I need an example as to how do this.

The second question, I have these codes on one frame (one scene). I want to create other pages or scene and transfer all of the codes to the other scenes. How do I do this? What is an example of the code that I would use to transfer the main function to the other scenes? I guess I could copy all of the codes to the other scenes but I am sure there has to be a faster way.

View 1 Replies

Make A Movie With Multiple Scenes - Streaming Sound And Scenes Sync

Jul 3, 2009

whenever I set my sound to stream and continue to make a movie with multiple scenes. The audio and video get disgustingly out of sync sometimes even off by 30 seconds. I just started an animation its only 10 seconds long with two scenes and the AV is already off by about 5 seconds. Ive worked around this by avoiding scenes altogether but i really don't want to have another 5000 frame scene. I discovered this problem in Flash MX and Im quite annoyed that it still has't been fixed 3 years later!

View 1 Replies

Professional :: Scenes Broken In CS4?

Mar 19, 2010

I've just started working with CS4, and admittedly I'm new to Flash, but I can't get the Scene functionality to work as described in the docs. The class MovieClip has a currentScene property that should return a Scene object. The Flash 10.0 docs give this code as an example :import flash.display.Scene;var scene:Scene =mc1.currentScene;trace(scene.name + ": " + scene.numFrames + " frames"); However, if you create a new ActionScript 3.0 fla file, create a MovieClip instance, name it mc1, and put this exact code in one of the frames, it returns a Scene object with no name and only 1 frame.Changing the name of the scene in CS4 does not . Am I missing something?

View 15 Replies

Professional :: Scenes Won't Reorder AS2

Jun 23, 2010

I'm building a portfolio site and I've renamed the secenes and reordered them but when I test the movie it defaults to what was originally scene 1. I'm working in AS2. If the mods will allow the web site is [URL]. There is an intro page which was scene 6 which is now renamed "intro" and draggd to the top of the pile but it doesnt show when I preview or upload.

View 2 Replies

Professional :: Separate Scenes Or Not?

Sep 27, 2010

I'm building a simple interactive video/animation in Flash. I have a sample from the company that I'm going follow and they use separate scenes for different sections of the video. I've read there are disadvantages to using Scenes but I haven't seen any advantages. In fact I haven't found much about Scenes at all. Most people seem to build their stuff in one scene, just labeling frames so they can jump to them to make scenes that way. I also have been looking up tutorials and I can't find anything about using the Scenes palette and how to connect the scenes together. Is there any reason I should use this Scenes palette and not do my whole video in one scene?

View 7 Replies

Professional :: Rip Audio Off SWF And Convert SWF To Audio?

Nov 22, 2011

Is there any  tool can help me rip audio from SWF file and ave it in MP3 format separately in another folder, and extract audio stream to MP3, AAC, M4A, WAV, WMA, AC3, MP2 formats?

View 3 Replies

Professional :: Jpgs Flicker When Loading Scenes?

Sep 2, 2010

I'm justing starting to learn some actionscript. I can't figure out why my jpgs are flickering when I go from one scene to another. Do they have to reload each time? Here is a link: http:[url].....I have each animation as a separate scene, and you'll see that the buttons flicker when the new scene loads.

View 4 Replies

Professional :: Music And Scenes With Continuous Song?

Oct 25, 2010

I have a bunch of scenes, and I have a continuous song that plays over them. I'll simplify below to better specify my intentions.
 
Game Menus

Scene 1:  Music placed on timeline, plays throughout the next 3 scenes (menus)
Scene 2:  Music uninterrupted and continuos from Scene 1 (desired effect).
Scene 3:  Music uninterrupted and continuos from Scene 1 (desired effect).
 
Game

Scene 4:  Completely new music for this scene. The music from the previous Scenes 1-3 (or Scene 1's music) still plays [until it is finished]. Scene 4's music is overlapped with it. This is not a desired effect. I'd like Scene 1 music to silence and Scene 4's music to play.
 
 
Things I've tried:
1.  Thought maybe I'd make Scene 1's music "stream" but when I go to Scene 2 or 3, the music is off.

2.  Thought maybe on Scene 4 I could do something to tell the music from Scene 1 to silence

View 5 Replies

Professional :: Creating Scenes As Movie Clips?

Dec 18, 2010

If i have created an animation in 'scene 1' on flas, and i really want this animation to be in a movie clip, is there any way i can transport the contents of scene 1 to a movie clip held within scene 1? (the animation only has one layer)

View 1 Replies

Professional :: Creating Different Document Sizes For Different Scenes

Dec 20, 2010

is it possible to create different document sizes for different scenes in Flash?

View 1 Replies

Professional :: Multiple Scenes Not Working On Any Computer?

Dec 21, 2010

I try to run a swf or html file of my fla file and it only works on my machine but not on my laptop. I have the latest flash player installed but it still doesn't work. My laptop works for single scenes swf and html but not for multiple scene file.

View 5 Replies

Professional :: Same Buttons On Interface Throughout Multiple Scenes?

Jul 13, 2011

I have a project that requires building the project using Scenes to chunk up different sections of an Elearning course.
 
I have created 20 Scenes.
 
Each Scene uses the same interface design.
 
On the Interface there are 6 specific buttons that will allow users to visit 6 instructional areas.
 
All six buttons will be avialable in all 20 Scenes.
 
My question is: is it possible to replicate the six buttons across all 20 scenes without having to provide unique instance names for each button in all 20 scenes so that the code to go to a scene will work in each Scene?
 
Or do I just have to code all 180 buttons individually as I go?
 
What I mean is for example.
 
The Lesson 1 button is replicated 20 times. the lesson one button has actionscript to go to the Lesson 1 Scene.
 
If I replicate the button to another Scene, I have to give it a different instance name, and update the code for that button each time and for all buttons.

View 6 Replies

Professional :: Dealing With Layers From Duplicated Scenes

Jul 28, 2011

I'm using Flash CS5.5. I had some unfinished work on flash 8 and I'm running actionScript 2.0  In one of my scenes I had come up with a good button set up I wanted to use in all of my scenes. So I duplicated the scene, and proceeded to re-name my layers on the new scene according to the new content in the form of bitmaps. Well, on the output I got warnings such as: "duplicated label on layers". My SWF is still showing normally but I don't know what to do with the warnings. Is there something I should have done other than double clicking directly on the old labels on the layers and chaging their name?

View 1 Replies

ActionScript 3.0 :: Using Buttons To Go Between Scenes - Showing Errors : Frame 2, Line 5 1021: Duplicate Function Definition?

Apr 21, 2011

I'm making an interactive website using ActionScript 3 and no matter what I try and do I keep getting the following error messages:

Characters, Layer 'actions', Frame 2, Line 5 1021: Duplicate function definition.

Characters, Layer 'actions', Frame 2, Line 12 1021: Duplicate function definition .Characters, Layer 'actions', Frame 2, Line 19 1021: Duplicate function definition.

I don't really understand what I'm doing wrong because it says "duplicate function" yet they aren't the same functions. Here is the ActionScript I've used for the first page:

stop();home.addEventListener(MouseEvent.CLICK, goHome);function goHome(evt:MouseEvent):void{ gotoAndPlay("Home", 1)}characters.addEventListener(MouseEvent.CLICK, goCharacters);function[code]....

View 1 Replies

Professional ::making An Interactive Game - Number Of Scenes Change Once The User Has Looked At Each Once?

Mar 19, 2010

I'm making an interactive kind of game, and I want a number of scenes to change once the user has looked at each once.For example, they go into three different scenes. When they finish looking at them all, Flash records this, and then when they look back at each scene again, they've all changed.

View 10 Replies

ActionScript 3.0 :: How To Read Variable From Outside Function

Sep 25, 2009

ActionScript Code:
var city:String = "Bath";
var xml:XML = new XML();
var urlloader:URLLoader = new URLLoader();
urlloader.load( new URLRequest("[URL]") );
urlloader.addEventListener("complete", xmlComplete);
function xmlComplete(e:Event):void{
[Code] .....

The main part is where I have created the variable: IconGif... it reads a portion of the xml file and turns it into a rference that will eventually relate to an instance name of a movieClip. I was going to use:
ActionScript Code:
this.attachMovie(IconGif,IconGif,100);
to place the item on the stage to whatever the xml says that day,

My problem occurs because the function I have used to create the variable, clashes with the attachMovie function and I receive the message:
TypeError: Error #1006: attachMovie is not a function.
at weather_fla::MainTimeline/xmlComplete()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio n()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader:nComplete()

Whatever that means but when I try to call the variable outside of the function, it doesn't know what I'm no about, because as far as it's concerned it doesn't exist, but only when the function is being called. I'm not the wisest with XML and calling up data...

View 8 Replies

ActionScript 2.0 :: Read Value Of A Variable From A Function?

Oct 28, 2009

I have a function that makes an array and I am trying to read the contents of the variable outside the function but it keeps giving me the result as undefined.

I know there must be a simple solution to what i am attempting to do.[code]...

View 0 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 1/2 :: Cannot Read RadioButton Data In Function

Mar 10, 2009

There's a RadioButtons group (=Group3) and event listener applied on it. The value of _root.choices3.a3.data is "a". The code is following:

trace("DATA BEFORE" + _root.choices3.a3.data);
var rbListener3 = newObject();
rbListener3.click = function() {
trace("I am inside.")
trace("DATA INSIDE" + _root.choices3.a3.data);
}
_root.choices3.Group3.addEventListener("click",
rbListener3);

If I compile it, the output is:
DATA BEFORE
I am inside.
DATA INSIDE
Why can't I read the value of _root.choices3.a3.data inside the function?

View 1 Replies

ActionScript 3.0 :: PlayString Function Not Able To Read Array?

Jan 21, 2009

The trace commands illustrate the problem - The playString function does not seem to be able to read the array created by the getChord function. It reads the default values listed below.

private var chordArray:Array =
["6,0","5,0","4,0","3,0","2,0","1,0"];
private var chordArrayCopy:Array = new Array();

A little background - getChord function is called from one class file and playString function is called from another. I don't know if this has anything to do with it. But that's why these are public functions within a public class.

View 3 Replies

ActionScript 3.0 :: Function To Read Bytes From Stream

Sep 28, 2011

I have a function that reads bytes from a stream, but the bitwise shift left only allows you to shift up to 32 bits it looks like.
Code:
function ReadALong(obj:*):Number {
var val:Number = obj.readUnsignedByte();
for (var L:Number=1;L<8;L++) {
var Add:Number = obj.readUnsignedByte() << (L*8);
val = val + Add;
} return val;
}

View 1 Replies

Actionscript 3 :: Flash Cs5: Set A Variable Using A Function, Then Read That Variable From A Different Function

Jan 29, 2012

I have a public variable and I am trying to set it, then read it from a different function:

public var str:String;
public function DailyVerse()
{
function create() {

[Code]....

My trace results says null. Why does it not give me "hello"?

View 1 Replies

Professional :: Read From File: 20 Vars

Apr 10, 2010

I can't get it to work. I now messed up the code so I have to start over and I'm a bit desperate now
 
I think the core of the problem in my actionscriptproject is the following:
 
1. I need to read, for example, 20 variables from a file, preferable an xml file. This file has 20 lines, and has two fields per line, variable name and content
(being text between " ").
 
so data.xml would be something like:
 
variable1, "text for variable1"
variable 2, "this is var2 content"
...
or even:
&variable1=value1&variable2=value2&variable3=value3&variable4=value... and so on to 20. 
 
2. Then, from the 20 read vars, a new array should be "populated" randomly! And at this point, I don't even know how to start doing that.

View 1 Replies

Professional :: Getting Flash To Read Mms.cfg File

Jun 16, 2011

Im having trouble getting flash to read mms.cfg file. This file only contains one line;

[Code]...

Where i believe it should be stored on a 64-Bit Machine. When ever we check the global settings on a flash video the setting still remains on "check for updates automatically).

View 1 Replies

Professional :: Export A Swf Without It Being Read As A MP4 Container?

Jun 30, 2011

I have a swf file but when I put it on a server at work, it is blocked. I get a black screen that just shows three dots as if it was loading. Nothing comes up. The swf has an FLVPlayback component which links to an external flv file. After talking with tech support locally, I found out that the swf is being read by the server scanners as an MP4 container and that is why it's being blocked. I would like to know if there is a way I can generate the swf without it being read as an MP4 container so it will work here.

View 8 Replies

Professional :: How To Read Text File

Dec 20, 2011

I try to read a txt file and split the content into variables, I use the following:

var fileURL = fl.browseForFileURL("open", "Select file");
var str = FLfile.read( fileURL);

the problem is the str get the whole test file, if the text file has multiple line,can I read the file each line by line, such as a function like readLine or something,so the str only get information for each line?

View 3 Replies







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