ActionScript 1/2 :: Fails To Fire OnSoundComplete Function When Playing Local Cont?
May 3, 2009
I have created a simple flash movie which I use to stream MP3 files into HTML documents using the JavaScript Flash integration Kit. When an audio file has finished streaming it fires the onSoundComplete function; using the integration Kit as a proxy allows me to fire JavaScript events within the HTML document. The event fires correctly when I am streaming from the Internet, however, it fails to fire when the movie and the files are on the same, local, machine.The problem lies, I think, in the following lines of code:
[Code]...
View 13 Replies
Similar Posts:
Feb 7, 2010
I am trying to get an equalizer animation to redirect to a url AFTER the called on MP3 track has finished playing. But I am pulling my hair out in trying to figure out how to do this... Based on some help and more research, I think i need this following action script inserted somewhere into the original action script, but i'm not sure. Am I even on the right track?
[Code]....
View 3 Replies
Sep 25, 2010
There's a Flash EXE projector There's a XML file in the folder relative to the projector, data/menu.xml Application is launched on a Windows XP box
On one of the XP machines XML fails to load over some awkward reason. In most environments it works fine. The same app runs well on all Macs tested.
View 1 Replies
Jul 15, 2011
I thought this question would answer my question, but I have applied the following fixes:
.as
Security.allowDomain("*");
Security.allowInsecureDomain("*");
html
param name="allowScriptAccess" value="always" />
[Code]...
And I am still seeing the ExternalInterface.addCallback method fail locally. It works on a web server, or in the dev folder. But not in an arbitrary local folder.
View 3 Replies
Apr 6, 2012
When I run the flash player (from flashdevelop) the images are loaded and everything is fine.But when I run the swf from a browser the requests are sent (using chrome's tools for programers - network tab) but nothing is loaded. The size/content column shows 0/actual size of the file
View 1 Replies
May 22, 2011
I am currently trying my 5. workaround to get my menu done. . I want to move a series of 4 buttons up, after a click and when all buttons finished their movement I want the bottom 3 to move down again.
My big problem ist, that I dont get a check working to see if the function move() hast finished in order to fire the function open(). Is there any listener or so?
Here is my code:
Code:
//Setup and register with Zego Engine
import com.mosesSupposes.fuse.*;
ZigoEngine.simpleSetup( Shortcuts, PennerEasing, Fuse );
[Code].....
View 1 Replies
Apr 9, 2009
I am using System.security.allowDomain in both files.The tween in movie2 fails to work when the swf loads from an external domain. However, it works perfectly when this swf is loaded locally. Also strange is that the movie2 tween does work externally if the tween libraries are commented out of movie1.The Challenge: Get both the red and blue boxes to fall when movie2.swf is loaded from an external domain.[code]
View 2 Replies
Dec 1, 2010
I have a series of symbols on my stage which represent lamps. Once a frame, I want to randomly select a lamp and switch it on if its off, or off if its on; I already have a working function which does this.
I have tried to use the onEnterFrame function to try and fire this function once a frame, but I don't seem to be having much luck, largely because I do not know how to use onEnterFrame correctly. So I have a movie where my function is fired only once when it is first run.
View 4 Replies
Feb 18, 2009
I've managed to design myself a pretty awesome little conundrum and I know there are some kickass Flash peoples here I'm working on site for a friend of mine in class. I built a Flash website for them, but I didn't want to make Flash based MessageBoards and Blogs, so I built those in PHP. You can see the website at: [URL] I can simply link away from the Flash website to the Messageboards [URL] But instead, i want the boards to slide down OVER the Flash website using Ajax and Mootools and Absolute positioning the div containing the Messageboard. That part's not important, what's important is...
How do I get my "the.BOARD:" btn, in the Flash site, to fire the Javascript function that'll make the ajax call and slide the div out over the flash site? Lets say the function is called "moveBoard();" Does anyone know of a way to fire this js function from the CLICK of a moveiclip in Flash? Let me know if anyone needs alittle more information.
View 2 Replies
Jun 18, 2005
I'm starting to learn classes and I'm doing a class that loads a textfile with a variable, using loadVars, followed by pure html text, then it applies css to the html text and displays it in a target textfield...I'm still new at this as I said so the code is very rough. I've worked out all the little kinks up to now..I'm stuck at one thing:When the text loads, the "loadVars.onLoad = function" is supposed to fire the css function that applies the stylesheet to the text, but I simply can't get the function to run...Is it impossible to call a private function from another private function in a class block?code:
Code:
class LoadHtmlText {
/**
[code].....
View 4 Replies
Jul 9, 2011
My document class is Controller It's constructor addChilds an instance of MenuScreen
MenuScreen has 1 button called 'gallery'. Clicking on it removes the MenuScreen from the document class and adds galleryScreen to the Document class.
After the galleryScreen becomes a child of the document class I add a keyevent listener like so:
ActionScript Code:
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
Here's a snippet of keyDownHandler:
ActionScript Code:
public function keyDownHandler(event:KeyboardEvent):void{
[Code]....
The Problem is: 1) I'm pressing LEFT arrow key like mad and nothing happens UNTIL I left click anywhere on the screen, THEN keyDownHandler works.
View 7 Replies
Jun 19, 2007
I am having problems with a ChangeWatcher.Everything seems to be set up correctly.The canWatch method returns true, the isWatching method returns true and if I query the return value of the getValue method I get the correct information, including changes. But for some reason the handler function just doesn't fire.
View 1 Replies
Apr 26, 2010
I've set up a function to pause the sound in an mp3 player whenever certain things are clicked on the page, using ExternalInterface, but I'm having a problem in IE.The setup is this: I have a video page that calls up a list of YouTube videos using RSS.he most recent video is displayed on the page in a div called "display". Then all the rest of the videos in the feed are displayed as thumbnails and links...If you click one of them, then the main 'display' video is replaced and it starts playing. All of that works fine.hat I want is for the mp3 player on the page to pause the music whenever a video is started.The ExternalInterface function works properly. Whenever one of the LINKS is clicked, the mp3 player stops and the video starts, etc.
The problem is that I also want it to stop when the MAIN video is clicked. Obviously, since this is an external video loaded from YouTube, I can't access the FLA to add its own ExternalAccess code.I've tried adding an ID to the video object and then using it as the selector in jQuery to call the stopMovie function...no go. I've tried adding a class to it, and then calling the stopMovie function when the class is clicked. I've tried putting the click function on the div that the video loads into...nothing works. If I remove the main video and just have an empty div, then click the div, the mp3 player stops...but if I load the video into the div and click it, nothing happens (in IE...it DOES work in FF).The Actionscript:
import flash.external.ExternalInterface;
ExternalInterface.addCallback("stopMovie", pauseSound);
function pauseSound(str:String):void {
[code].....
View 2 Replies
Jan 29, 2010
I need to fire and event when a function is called ...... And catch that event somewhere else.How can I do this?
View 4 Replies
Aug 15, 2009
using windows xp I.E.7, when prompt to install directX i start to download but failed everytime with error and suggest to visit adobe.com/go/tn_19166.I follow all the steps for trouble shooting but not work. Even i downloaded [Install_Flash_Player_10_ActiveX] install but it also failed. hence i unable to see the falsh contents on the net.
View 1 Replies
Jul 6, 2011
The keyBoard event listeners call on the rotate and unrotate functions and based on the key inputs(A and D) will implement either of the functions and rotate the image or return it to the original upright position. However, I haven't been able to get the function to work. When I press the A or D keys on the keyboard nothing happens. I even put trace() in one of the functions to see if the function will even be implemented but I don't get anything. I put in my Scripts below. Why are the functions not working? Do the eventlisteners fire or are there conflicts?[code]...
View 1 Replies
Jan 9, 2010
It seems that this is quite easy to do but ... I can't get it.
I have on the stage 3 Btns that set my:
Templates.data.templateTxt :
my Templates.as package is:
ActionScript Code:
package {
public class Templates {
public static var data:Object={};
[Code].....
View 3 Replies
Apr 29, 2011
Can someone point me to a desktop app (Windows and Mac) that can play local FLV files?
View 4 Replies
Dec 22, 2009
ARCITECHTURE:the way I've set up this Flash doesn't work properly.in my html I load a preloader.swf.this preloader.swf is build with ActionScript in the first frame.this preloader.swf loads a content.swf this content.swf is build with ActionScript in a Document Class...
everything works properly this far.MY PROBLEM:my problem comes when I - using JavaScript - try calling a function in my content.swf the function I try to call is this:
public function playThisMovie(theMovieToPlay:String):void {
var newM:String = theMovieToPlay;
ExternalInterface.call("alert", "the new movie is = "+newM);
}
when calling this function nothing happens, even though I know the function exists..can it be, that I cannot call my function because it is inside my content.swf..and if yes, is there a workaround I can use?
View 6 Replies
Jan 7, 2011
A project has various local HTML & video files for pages. We need to be able to embed these videos in HTML pages - but because all are local files we have no server-side streaming.
Can I still just use SWFObject? Are there other well-known controls that will let us play .mp4, .swf/flv, .wmv files? This solution is targeting HTML4 across Chrome, FF and IE (I don't know if IE6 is needed).
View 2 Replies
Jul 9, 2011
I realize it is possible to play audio with Flash and HTML5 by passing a URL.
However, is it possible to get a reference to an audio file using a file browser (either with HTML5 or Flash), to then play this local file, again using either Flash or HTML5?
Of course, this should happen without the interference of a server. Since the file is already on the local system, it does not make sense to route it through a server only to receive the same file again.
View 1 Replies
Jul 6, 2011
I have a program A that loads another swf B, and after B is loaded, A will call a function of B.It used to work when B creates a TextField and uses TextFormat, but when I changed to creating a TLFTextField, I got this error:[code]I got Error #1069 again, but when I changed TLFTextField back to TextField, it works again.Test A can now find the function "changeText()" in Test B.
View 8 Replies
Jan 18, 2010
Basically I discovered its no problem at all to draw lines or shapes or whatever directly onto an mx:Text object using its graphics property (Text.graphics.lineTo, etc.). If just displaying that text, then any such drawn lines are displayed as well. However, if that Text object is used as a mask, then any drawn lines on that text object are merely ignored when the mask is rendered. And its hard for me to see the reason behind this, if anyone else is able to. I mean you're designating the Text object itself as the mask. It seems like any visual change to that text object should be part of the mask.
View 1 Replies
Dec 7, 2009
I have this script in a movie clip. It should go to the keyframe shown after sound completes, but it doesn't and I'm wasting too much time trying to figure it out.
FYI - the sound does play and the trace does appear. It just won't go to the frame I want.
//script***********************************************
applause= new Sound();
applause.attachSound("applause2.mp3");
[Code]...
View 1 Replies
Jul 1, 2010
We would like to build a flash video player into our corporate intranet site, currently we are evaluating JW Player and have come across and issue accessing the FLV files stored on a mirrored share drive that all users have access to on the local intranet.From what I can tell the Adobe flash plugin will not allow a SWF file hosted 'online' (intranet) to access a shared directory that the user has access to. Is there any way around this?
View 1 Replies
Aug 2, 2010
It doesn't load during the first load.
myVars= new LoadVars();
myVars.onLoad = function(works)
{
if(works){
[code].....
I am tryin to hit a servlet to get the data.
View 1 Replies
Jul 4, 2010
I'm trying to load a local xml file:
xmlLoader.load(new URLRequest("../xml/xmlData.xml"));
But I'm getting this security sandbox violation:
#2148: Only local-with-filesystem and trusted local SWF files may access local resources.
I don't get this error when I embed the XML file directly with the EMBED metadata tag.
View 3 Replies
Jun 30, 2008
I don't have the cash right now to get Flash CS3, so I'm limited to using Actionscript 2 and that's what I have here. What I'm trying to do is use the onSoundComplete(); function, or something similar but not getting any results.
I'm doing a basic sort of mp3 player, though it only rotates between 3 songs. I have a character walking on stage as a movie clip, he's carrying a radio which is a nested movie clip within the first, and within the radio movie clip is where I have it set that you can manually advance from one song to the other by hitting a forward button, and there's also a volume slider. The first default song playing is "letsDance", The second song playing is "outtasite" and the third song playing is "please". They all work perfectly, the forward button to advance works, and the volume slider works.What doesn't work is when one song finishes, I want the next song to start. For now, I only included code for going from song 1 to song 2, but that's not working so I decided to stop there.
Unfortunately, with the three .mp3s included even at 20 seconds each, my compressed .zip file is 1.2mb, bigger than the allowed 146kb .zip on the kirupa forum. Therefore, I cannot post it on the forum, but have it hosted on a web server. Anyone willing to look at the file, you can find it at:
http:[url]...
What's in this .fla file right now is just the radio button and the volume slider, nothing else. I didn't want to include any unnecessary extras so even the three songs that are included are even shortened down to about 20 seconds each. Each of these songs are located externally from the .swf file and are called in through the "loadSound" command.Anyone who could shine some light or advice on why this isn't working or a better way to follow on what's going on here. I've read other things online about onSoundComplete(); like being used with music in arrays which I guess I could do, but I want to be sure I have control of advancing one song to the next and also adjusting the volume. Other things I've read about onSoundComplete(); is that it just doesn't work.
View 8 Replies
Mar 7, 2007
I currently have random external swfs of "Buttons" loading and unloading into mc_containers into my main movie. These load and unload every couple of seconds.
What I would like to do is have sounds associated with these.. So if you was to click on one of the buttons, it would play a sound.
I have tried this by placing the sound in the button "down" section. However, it starts to play the audio and then as soon as the SWF unloads to load the next, the audio stops.
My question is: Is there a way that when you click on the external SWF loaded button - that it would then link to an audio file in the "main" timeline/library ? This way the audio would continue playing even though the SWF has unloaded.
View 1 Replies
Sep 28, 2010
like at the object, i have a class like that:
class myClass
{
var sound:Sound;
var num:Number;
public function MyClass()
[Code]...
View 2 Replies