ActionScript 2.0 :: Activating Sound Files Incorrectly

May 8, 2002

I did this e-card, and it seemed fine. Then I played it on another persons computer (both PC), and the sound failed to work. I'm using Flash 5. Other e-cards with sound produced by other people worked fine. So here's my code. On the first frame (root) I have:

[Code]...

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Activating Different Audio Files Over Different Frames?

Oct 6, 2009

Recently I bought CS4 as I decided that I wanted to design and create a new website for hosting my music productions, I have used dreamweaver in the past so I am quite familiar with XML etc but I wanted to make something with a little more to it. After talking to quite a few people and reading into it all I found that this would be my best option. After thinking that it was all going to be quite nicely straight forward Im banging my head against a wall in trying to learn and understand Actionscript.

I have currently designed all of the pages, I have used a few tutorials on actionscript 3.0 and have the whole website is functioning, my pages, frames, labels and buttons are all functioning how they should on the timeline and there is around 14 pages..

The problem i've had for around 4 days now is getting all of my audio previewssnippets to work, i have around 20 of these and I need them to be spaced out on about 6 pages (frames) ; Each frame is a different release etc

In each frame, I have 8 buttons 4X play buttons next to each track and 4xStop next to that... play_btn, play_btn2, stop_btn2 and so on..

I've set it so that all I want to do is be able copy the code into the other frames and also the buttons (which are on a different layer) and then all I have to do is enter the filenames in the code below (Track1.mp3, Track2.mp3 etc)

So... it all works fine on my first frame of my release page.. The audio plays and stops for each track, no problems at all.

Now,, the problem happens when i copy the actionscript from my first release page(frame) to the next.. its about 25 duplicate functions, duplicate variables etc

Is there some kind of way I can put all of this into some kind of Class or Tag.. And this code only operates inside this frame and not in the next to cause the duplicate errors? I realise that I could Label every single variable, function and button differently covering all of the frames so that it dosn't cause the duplications to occur but, I am hoping there is some other way around this..

import flash.media.SoundMixer;
//PLAY TRACK 1
var soundReq:URLRequest = new URLRequest("track1.mp3");
var sound:Sound = new Sound();

[Code]....

View 2 Replies

ActionScript 2.0 :: Activating And De-activating Loaded Movies?

Jan 7, 2009

Am working on a flash AS 2.0 project where am loading movies from the same folder. my code goes like

on (release) {
loadMovie("HAD.swf",2);
}

problem is the swf loads infront of the main movie but the main movie's links are still active.

View 4 Replies

ActionScript 1/2 :: Activating/de-activating Buttons?

Mar 9, 2009

I want to create some AS to disable and enable a button.Let's call this ButtonX. I want this button to appear disabled at first, and then allow the user the option of enabling this button(ButtonX) by clicking another button. Let's call this ButtonY. I cannot get this to work. I am attaching the code I am trying. I have this AS added to ButtonY and ButtonX is the instance name for the button I want to de-activate-activate.

View 7 Replies

IDE :: Way To Play Sound Files

May 2, 2010

I'm working on a game that loops a random sound file everytime the user goes to the menu. When I tried the simulate download in the preview menu, it took a long time to load the first frame (which is a preloader). I found the problem was that in the linkage for the sound files I said "Export on first frame" so i unchecked that box, but then when I tried playing again, the sound wouldn't load.So, I'm wondering, is there a way to play sound files through ActionScript without having to load them on the first frame?

View 1 Replies

Professional :: Fonts Incorrectly Embedded In CS5?

Mar 28, 2011

Create new AS3 fla fileIn publish settings, click 'Generate Size report'Put some text on the stage - Classic text, static (Though it doesn't seem to matter)Make sure the font is '_sans' (There is no 'Use device fonts' option for this font choice)Publish the fileNote that _sans is now embedded in the SWF, occupying bytes in the size report. Try the same in CS3, and there is nothing embedded, as you would expect. Unfortunately I can't get my fla loaded into CS3 because CS5 will only allow me to export as CS4.
 
Similarly, change the font to something specific, like Verdana, and set it to use device fonts and it still embeds font data (We're talking about 3 or 4k) but doesn't list any glyphs. Occasionally though, by screwing around, it doesn't embed anything. Then nudge some text in some magical way and it's back to embedding redundant data.

View 2 Replies

Flash :: MaxScrollV Reporting Incorrectly?

Dec 9, 2010

I have an html text field that displays content from an xml file, and a class that determines whether or not to show a scrollbar.The code that determines this is as straightforward as

if (field.maxScrollV>1){
showscrollbars()
}

And 9 times out of ten it is working. Sometimes - it seems when the html contains <li> - maxScrollV is reporting '2' and the scrollbars are showing, even though all text is visible onscreen and it will not actually scroll at all.

View 2 Replies

ActionScript 2.0 :: Php Script Being Called Incorrectly

Jul 2, 2009

I have a project with flash, php and mysql. We have a form for notes, that sends and stores a note, and then we have some other forms, and the other makes a query on a database to know what equipment some employee has. They are different swf movies loaded in another one. The issue is that whenever you make a query for an employee, there is a blank note saved. I already tried to trace something but nothing shows up. The code for notes is NEVER executed on the list change action, but still blank notes are added to the database. Here are the flash codes:

[Code]...

View 1 Replies

ActionScript 3.0 :: Images Sorting Incorrectly From XML?

Nov 5, 2009

I have a series of images coming in from XML, they are labeled sequentially something_01 - 21. No problems there at all.

When I add the image links to an XMLList, they trace in order... something_01 - 21. No problems there either...

Hell, even when I trace "loadedImages" below they trace in order.

But on stage... though all the images appear & line up the way I want, they're random in order. Image 15 | Image 12 | Image 17 | Image 6, etc...

I'm sure it can be in the code but it's really very frustrating. I first add each image to a box and then load it to a content container.

Code:
XML...
function formatXMLContent():void {
for (var i:uint = 0; i < tourImage.length(); i++) {
var loader:Loader = new Loader();

[Code]....

View 0 Replies

Sound Files Not Workin In .swf File

May 6, 2009

If I use Publish Setting and choose a different folder for the .swf and .html file that Flash CS3 will be generating then the audio/sound will not work when open the .html file in a browser. However, if I choose to the "Publish" option or "Publish Setting" but choose the same folder for the .html and .swf folder then the sound will work when opening the .html file inside a browser.[code]

View 3 Replies

Professional :: Can't Import Sound Files?

Jan 6, 2011

No matter the format no matter what the bit rate is, I can't import ANY audio files into flash CS4 without getting the error "One or more files were not imported because there were problems reading them"

This happens both when I import to the stage and import to the library. Please if you know anything about this issue please help otherwise the whole flash program is useless for me.
 
Also I found online that installing quicktime fixes the issue. It didn't work for me, I've reinstalled quicktime 3 times to make sure.

View 9 Replies

Professional :: Sound Files Not Importing?

Dec 2, 2011

I have a problem while trying to import any sound file into flash CS5.5. I have not successfully done it since purchasing the program. I have tried opening the file in a sound editor and saving it, as well as trying to convert to a different sound type that is still Flash compatible. I'm trying with .mp3 and .wav files mostly. The error messages i receive are "Couldn't import C://*file location* or else i get"One or more files were not imported because there were problems reading them." I havent figured out a pattern as to why either might be showing or the connection to the file.

View 1 Replies

ActionScript 3.0 :: Play Swf Sound Files?

Nov 26, 2008

can we play audio "swf" files along with mp3 files in as3?

View 1 Replies

Flash 10 :: Exporting Sound Files From Fla?

Jun 7, 2011

I had imported some sound files into an fla (CS5) and then i accidentally deleted the files.So those sounds are present as symbols in the fla. How do i export/extract those files from the symbols?

View 2 Replies

ActionScript 3.0 :: Swapping The Sound Files?

Sep 17, 2010

I am working on a Flash / AS3 project which has several audio tracks and starts off with an intro track. When the user clicks a button a window opens and the audio track changes, the new audio track continuously loops until the user closes the window. When the window is closed the audio track switches to a default audio track which is similar to the intro track. The problem I am having is that when the user clicks on the button and the window opens, the audio track plays as expected, but when it reaches the end, it doesn't loop, instead the intro track starts to play instead (and loop I assume).

Here is the code I am working with:

Code:
package {
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.MouseEvent;
import flash.media.Sound;

[code]....

I included trace statements to track what the value of "music" is doing. It appears that when the function repeat() occurs, "music" always seems to default to the intro music "audio/track-intro.mp3".

View 1 Replies

ActionScript 2.0 :: [MX] - Controlling Sound Of FLV Files

Nov 21, 2002

I've am trying to create a sound control to control the sound of an imported FLV file. The problem is like this. I recorded a video using a video camera and than using the iMovie, I've converted the movie to QuickTime format. Than I use Sorenson Squeeze for Flash MX to compress the video. I manage to compress the files into FLV format and than imported it to my Flash file. Now I want to add a sound control to the movie to control the volume.

View 2 Replies

ActionScript 3.0 :: TextField Width Reported Incorrectly?

Mar 5, 2009

I've been working with a marginally subclassed form of a TextField, which I need to display with embedded fonts. I'm noticing some surprising behaviour with the width property when embedded fonts are enabled, which is causing me trouble further on in my code.Due to the way I am animating text, I am displaying each word in a separate TextField (or Word object, as I've subclassed it). I then reassemble a line of text with even spacing, and to that I need to know the width of each word, so that following words will begin at the correct x-position. Before I began to use embedded fonts, the width was reported accurately, as expected, but once I enable embedding, the width property is reported as a much lower valueI've included the constructor for my Word object, which shows some traces for debugging

PHP Code:
public function Word(wText:String, partOfSpeech:String, chunkTag:String) {
text = wText;

[code]....

View 3 Replies

ActionScript 3.0 :: Images Incorrectly Scaled On Loader?

May 22, 2009

the loader class isnt loading images to their correct scales.they are always stoo short in width. is there a work around for this? it may be a common issue. im using AS3 for this.

View 1 Replies

ActionScript 2.0 :: Loading Images Displaying Incorrectly?

Jun 6, 2009

I'm trying to load some jpeg's into my movieclips. They are loading, but my height is displaying wrong. The image is 64x100px. I'm changing my movieclip to show the same size, but the display of the image is stretched.Doing a Debug of the movie, the movieclips show the correct dimensions, but the images are still stretched vertically somehow. My _xscale and _yscale are both at 100.

This is in actionscript 2.0. I've ran this file on both MX2004 and CS3, with the same result. The images aren't progressive,

Code:
numImages = 30;
spacing = 10;
x_pos = 0;
y_pos = 0;[code]..........

View 1 Replies

Data Integration :: Rendering XML Code Incorrectly

Mar 13, 2007

I'm pulling text from an XML file that was created throug Filemaker. Some of the text has special characters like ampersands or quotes etc. In the XML file those characters look like they would look in a regular HTML file (& or ") But once it's imported into the textfield in Flash it still only shows the long form (&) instead of the character. In the Property Inspector I clicked on "Render Text as HTML" but it doesn't make a different.

View 1 Replies

Flash Displaying Incorrectly Once Uploaded To Apache?

Aug 8, 2010

I recently purchased a flash template and after a lot of configuration and tailoring to my own requirements, I have the website look and feel exactly how I want it. I then proceeded to upload the site into cPanel and more specifically Apache, and unfortunately the display within the flash has now gone completely wrong. There are extra spaces in sentences where there were previously none and numerous images and text titles do not display any longer.his occurs in all browsers when viewed live but when viewed from my local computer via my hard drive all browsers display the content as normal??I am more of a Cisco/Network consultant therefore my knowledge in this area stretches a very small amount. I have added the Apache Handlers for .swf, .xml and the image formats but that's about as much as I know

View 9 Replies

Flex :: Spark CurrencyFormatter Formats '0' Incorrectly?

Feb 10, 2012

I'm having trouble with a spark CurrencyFormatter, which is failing to format the value 0 correctly.All other values are formatted fine.I'm using Flex 4.5Here's an example:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[code].....

View 1 Replies

ActionScript 2.0 :: AttachMovie Incorrectly Positioning Clips?

Jul 25, 2005

I'm using a Movie Clip (mc1) as a button and for it to be able to function with a mouse click, I placed a Button symbol (b1) inside of the Movie Clip and put some ActionScript onto the nested Button symbol:

Code:
on (release) {
_parent.attachMovie("mc2_id", "dot", 100);
dot._x=150;
dot._y=100;
}

As you can see, I'm trying to get another Movie Clip (mc2) onto the stage and that part works fine, but for some reason it keeps ending up at the top-left corner of the stage even though my code says otherwise. What am I missing? I'm including the .fla if anyone would be kind enough to look at it.

Also, when I was setting the linkage properties for the clip to be attached, I had to enable the "Export in first frame" function just so it would work (I normally don't since I was told it would kill a preloader if I had one); how would you export things without having this box checked if you normally don't do that sort of thing because of a preloader?

View 3 Replies

ActionScript 3.0 :: ROLL_OUT And MOUSE_OUT Triggering Incorrectly?

Mar 7, 2009

I am having a rather annoying problem!! Basically my code is triggering the event when it definitely should not be...Here is my layout:

Node container - holds all my Sprites and has a MOUSE_OVER (<works fine) and a MOUSE_OUT / ROLL_OUT (<neither of which work) Sprites in Node container - contain text + images but have a Shape hitbox on the top layer meaning there should be no confusion!Basically, I check to see if anything rolls over my node container with MOUSE_OVER which triggers correctly and allows me to target which sprite the user has rolled over.

However, when you move the mouse over the sprites (but not outside!) if constantly triggers my MOUSE_OUT and ROLL_OUT events, it makes no difference which one I use...This is is really frustrating and I can not think of even an ugly work around in my code to solve this, it would be nice to fix it and add it to my knowledge later.

EDIT : Actually the MOUSE_OVER triggers as soon as the OUT event has triggered incorrectly.

EDIT 2 :Basically I have a custom cursor and this is the root of the problem, it thinks I am rolling over the cursor and then out constantly.. OK so how can I Ignore my mouse cursor image? So it doesn't think I am rolling out all the time..?

EDIT 3 : FIXED

mouseEnabled = false;
mouseChildren = false;

View 1 Replies

ActionScript 3.0 :: Get A Handle On Embedded Sound Files?

May 7, 2009

From the Sound Class information, it says to use the SoundMixer Class to handle embedded Sound Files.  I have two sound files embedded, that I have setup in 2 separate layers, starting at frame one in the main timeline.  I needed to do this so I could see the wave files, and coordinate text with the waves.  I do not want to load these files into the .swf file at runtime using URLRequest.  How do I get a handle on those as they exist, to make each controllable by separate volume and mute controls for each sound?
 
This will be a challenging question, because, "it can't be done" doesn't work for me.  I managed to create a way to use an external classfile to control the main timeline, the ROOT timeline, without having to create a sub movie to root.  I can use my component to call play(); as though it were in code in a frame.  But it isn't, it's in an external classfile.  I passed root to the classfile and told the classfile to think of it as a movieclip - that put the handle on it.  I tried similar way with root as a Sound, but that isn't detailed enough - I need to get a handle on the frame that contains the embedded sound file.  I embedded, attached it, using the properties view for the frame.
 
I've attached, or whatever you want to call it, these sound files to a frame, and this frame is or should be attached to the layer I've created.  So, under the assumption that the ROOT has everything attached to it in some manner (it is after all the foundation for the COM), the stage of the root contains the visual components, so ROOT has to have the layer objects attached to it, which should have the frame objects attached to the layers.  I have two layers that each have a .wav file attached to frame one.  Somehow Flash keeps track of that - I want to know how Flash does it so I can read what flash reads.

View 1 Replies

Imported Swf Files Have Lost Their Streaming Sound?

Jun 14, 2009

I am trying to import a swf I made that contains streaming sound. When I place it on the time line and press cntr enter my animation plays but with no audio. I see the symbols from the swf and the swf inside my library. When I open the swf file inside my project it is broken down frame by frame with no audio. I can add audio back into my movie clip so I know that movie clips can support streaming audio. But I would rather not have to do this.

I'm very new to flash so I am hoping there is something big that I am missing.In addition to my previous question: I need to embed a lot of objects over and over in this project I am working on. Each object will have controls for play back of itself. Is there some reason I cannot do this?

View 6 Replies

ActionScript 3.0 :: Loading Multiple Sound Files?

Jul 28, 2009

I am trying to put a few songs on a website, not as an .mp3 player, I just want to be able to assign individual buttons to control them.ow, and it works great. I would like to now how to add more and assign them to their own buttons seperate from the other songs.This is the code I have for one song

var url:String = "";var urlRequest:URLRequest = new URLRequest(url);var sound:Sound = new Sound();sound.load(urlRequest);var sc:SoundChannelvar startTime:uint=0;
playBtn.addEventListener(MouseEvent.CLICK,playF);stopBtn.addEventListener(MouseEvent.CLICK,s

[code]......

View 5 Replies

Sound Files Made .fla File HUGE?

Sep 28, 2009

I imported 26 .mp3 files into my library, and linked their classes via AS3 to 26 instances of buttons.
My file size went from about 2MB before  I imported them to about 1.6 GB after I imported them. Each of the files is only about 2-3 MB.

View 2 Replies

ActionScript 3.0 :: Getting Script To Edit Sound Files?

Feb 7, 2011

A wav or mp3 file will be taped or various. Is there any script to edit these files in batch ie: to Trim the beginnings ie: no sound parts. Or would I have to use a sound editor. As I say I don't want to do it manually. This sounds like a stupid use but it's important as I have children taping themselves and can't use a 3 party product to edit. Perhaps AIR has something in an API.

View 7 Replies

Professional :: Accessing External Sound And Pic Files?

Feb 26, 2011

Is there any simple way you can access a very short sound file in flash without having to play it in an flv player.  its just a ding sound to play when the user hits a button in the presentation.Also is it possible to access an external pic file and then convert it in to a symbol to be used within my presentation.I just don't want to store these files to keep my main swf small.

View 3 Replies







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