ActionScript 2.0 :: Triggering A Sound Object Once The SWf Is Loaded Into A Container SWF
Jun 23, 2003
I have a created a sound object like so:
//Creating the Sound Object
sliderSound = new Sound();
[Code].....
It works great when viewed. the problem is that when I load this SWF file into an container SWF file (using loadMovie) the sound will not play.
View 1 Replies
Similar Posts:
Oct 11, 2009
I have a swf that I'm compiling for flash player 9. There's a few text fields on it that are selectable. When the page first loads, I want the first field to already be highlighted and ready for input.I've added this in the main function, and it works when I run the debugger or load it on my windows machine:[code]However, when I run the same swf on my linux machine the first field doesn't "highlight" until I click somewhere on the screen. Must be a linux thing.What's an alternate method to trigger an event when the stage has finished loading that I can try?
View 5 Replies
Oct 17, 2011
I'm currently working on a project which has a swf (zoom) which zoom/pan a loaded swf of a map (carte_web.swf). Everything went well until I got more requests. There is now two maps, same background, one with images and one with only a road. I'm trying to add code to two buttons on a toolbar generated by the zoom.swf, to switch between the two maps, without loosing it's zoom/pan My maps are both object-oriented Flash programming. I have spent 27 hours, trying to find a way and I'm definately at my wits' end!
I got a suggestion " in loading both your swfs into one sprite separately. Then switching between the swfs by removing and adding them to their parent sprite. The parent sprite is what you'll be zooming. " I tried everything!!!
View 3 Replies
Jan 14, 2005
Does anyone know of a way to dynamically read the sound levels of a loaded MP3 to help produce dynamic sound visualization in Flash?
View 5 Replies
Sep 1, 2009
I have a simple MP3 file that I am attaching from a library and playing using Sound object.When testing SWF on it's own, it works fine, but I have to embed the SWF into another SWF (container) using loadMovie, AND, the sound not playing??? What can be wrong?
child.swf code:
var mySound:Sound = new Sound();
// in the library MP3 is set for export as "voiceoverclip"
[code]....
View 2 Replies
Oct 29, 2009
How can i draw sound spectrum inside a display container other than stage?I tried to display it inside the rectangle movieclip but end up in failure.[code]...
View 2 Replies
Jan 31, 2012
Is there any AS3 library or code-snippet that can create altered versions of a Sound object on-the-fly (at runtime)? Either based on:
An existing Sound object; A ByteArray object;
For example, say you have a "dry" sound of a gun-shot. You could:
[Code]...
View 1 Replies
May 20, 2011
I am using the following to extract the byte info from a sound object - however if I go back to the same sound object and run this again, The byteArray has no bytes available.
var data:ByteArray = new ByteArray;
sound.extract(data,sound.length*44.1);
data.position = 0;
return data;
Is this the correct behavior? Is there not a way to do this multiple times on the same sound object?
View 3 Replies
Mar 15, 2008
I have been at this for about 19 hours straight! I am going to go to bed immediately after this post, but for crying out loud, I have NEVER had this problem before today! Before anyone reads ahead and says 'you have to attach your sound object to a completely separate mc to be able to control it independently from all other sound/root volumes.' see if the following code accomplishes just that:
[Code]...
View 2 Replies
Jan 22, 2010
scrolling TN that I purchased for $10. I want to create many different galleries (many swfs) using this XML gallery and then load them into a container inside a "master gallery swf" if that makes sense.The problem I am having is that the swfs are getting re-sized smaller when loaded in the container (maybe 70% of the original size) even though the container and swfs have the same dimensions.I've actually had this problem before where a swf displays smaller, even if it's just inserted into an HTML page. I'm wondering if there is a simple solution
View 0 Replies
Jul 18, 2011
I need to communicate from loaded swf to the container swf in AS 3.0. This is the code for document class of loaded swf followed by code for source swf document class. How I can call the method xyz() from the external swf?
ActionScript Code:
package com.scottgmorgan {
import flash.display.Sprite;
public class ExternalMovie extends Sprite {
public function ExternalMovie():void {
Code] .....
View 1 Replies
Mar 24, 2009
I used guestbook form here:[URL] and when I load it into a container in the flash website the guestbook doesn't read the data from txt file. It works ok when it's alone.
View 1 Replies
May 8, 2009
I have three btns on stage, clicking on each one i want them to load an external mp3.The problem is the previous loaded sound doesn't stop when a new one is loaded so I have all sounds playing at the same time
View 3 Replies
Nov 15, 2010
Is it possible to take two Sound objects and combine them into one Sound object so that one Sound plays, and then the second plays right after it? I can just play the first Sound and then the next right after it, but it would be much cleaner to combine them before playing the audio.
View 1 Replies
Jun 14, 2004
I have a streaming sound that is loaded into my flash movie (will end up on CD) that is very distorted, it sounds like someone is slowing down the audio, the voice sounds deep and slow
View 1 Replies
Oct 14, 2010
I have a main swf that will load external swfs into a container. I need to detect the end of the loaded external swf in order to start to load and play a new one into the same container. The problem is that i do not know what the length of the external swfs will be, and will have no control over the development of them, so i cannot place a variable at the end of their animation which would allow me to detect from the main movie its end. I also cannot rely on the _totalFrames property because the loaded swf might not have all the animation inside its main timeline.
View 5 Replies
Sep 16, 2009
I need a fairly foolproof way to check from a child swf whether it is loaded into a container swf through a loader object or if it is just loaded through html. I would like to do this without requiring a flashvar or any kind of function call from the parent swf that may be there. Any quick and simple solutions? I looked for something with loaderinfo but came up empty.
View 4 Replies
Jul 5, 2010
I have a container on the stage in which a swf is to be loaded when you click a button. This works fine when the content of the .swf being loaded into the container does not have content floating outside of its stage, this is a problem for me because the .swf being loaded in has content that exceeds the width of its stage, but is masked. The masked content on that page will be made visible when the user mouses over the masks. So its essential that the .swf being loaded in exceed the dimensions of its stage.
Initially, when I click a button that is a child to the menu_mc, the swf loads into the container correctly, but when I MOUSE_OUT of the menu_mc the content within the swf scales to reflect any content that exceeds the width of its stage. I'm not sure if this is the result of the way I am the loaded swf. The swf is designed to scale up and down when the user MOUSE_OUT or MOUSE_OVER of the menu. The menu is designed to be hidden when not in use.Here's my code:
ActionScript Code:
import caurina.transitions.*;
import caurina.transitions.properties.DisplayShortcuts;[code].....
Additionally, I ran into a problem when I moused over the buttons that are children to the menu_mc. Whenever I rolled over them the content in the menu would hide itself off stage. So I came up with a solution that may not have been the appropriate course of action, but worked. In the MOUSE_OVER function of the buttons, I provided y coordinates for the other movie clips to prevent them from moving off stage. For the sake of better coding practices, would there have been a much more appropriate coarse of action.
View 0 Replies
Oct 1, 2010
I'm trying to somehow target a MC being loaded into an empty container MC. I've tried everything I could think of.
Basically, I'm making a movie editor. Right now clips are added to the stage on initial load, then when they are clicked on they are added to the "reel" and they can be previewed in the order that they are added. Now, I'm trying to get it so that when they are on the "reel" they can be click and dragged and rearranged.
Here's how the clips are added to the stage in a function called loadClips():
ActionScript Code:
addChild(clip1);
clip1.name = "1";
Here's how they are being added to the "reel" in addClips():
ActionScript Code:
if (currentTarget.name == "1")
{
clipCopy = new Clip1();
[Code]....
Now, I just want the clips that are on the reel to be click and drag-able (along the X axis but I'll worry about that later). I realize now they're all being added as clipCopy. That's going to be an issue huh? Is there a way that I can target the container and make that mobile?
View 2 Replies
May 14, 2009
i'm a designer trying to step up my flash skills and have a scripting problem that's causing me trouble. essentially i have a child swf loaded into a container in a parent swf and want the child to be able to instruct the parent. to explain in full, the child contains an flv with bespoke video player components. it's container sits in one frame of the parent. when the flv finishes playing, i need the parent swf to move onto another frame.
as it's a controllable flv, it isnt possible to predict the exact length of time the child will need to be present, so it literally needs to tell the parent it's finished playing at that very point.
[Code]...
View 9 Replies
Sep 2, 2009
Running into an issue where the if I add a Bitmap image into a movieclip the bitmap will appear slightly Blurry.When I add the Bitmap directly to the scene it appears normal. Is their a property for a movieclip that would explain this behavior? or is their some other solution to keep bitmaps from becoming blurred?
View 2 Replies
Jan 9, 2008
I am creating a site where there is a portfolio section with icons for each piece of artwork.Regardless of which icon 1-10 is clicked, for the first time ONLY, I want to load a swf which "draws in" a portfolio "background", and another swf on a higher level which corresponds to the icon clicked (lets say a sample artwork).
However, if the user has previously clicked another portfolio icon and is currently viewing one of the portfolio pages, there is no need to load the "background" swf again (it would be tedious watching the drawing in animation over again).
I've designated a target container movieclip for each.The icons swf file with the buttons is another swf on the timeline.Is there some code which can check to see if the background swf is already loaded into its container? And in which swf would I attach the code?
View 3 Replies
Oct 3, 2002
I have several external SWF (child) movies that are to be loaded upon demand into another SWF container (parent) movie file. Pretty straight forward. Each of the child movies has MCs communicating with other MCs within the same child movie. For instance the timeline of one MC will have a frame action, which targets another MC instance to play(). Again, Pretty straightforward stuff.
These files work beautifully when viewed independently. The problem is when they are loaded into the parent container movie the target MC functionality no longer works. I believe it's because once the child movie is loaded into the parent movie the absolute path of the targeted MC has changed and what was once the '_root' in the child movie is no longer the actual root?
I have tried both methods in the child movie:
//method without using 'with'
_root.ContentWindow.play();
And using the 'with action like so:
//method using 'with
with (_root.ContentWindow) {
play();
}
It would seem that in theory once the Child SWF file is loaded into the Parent SWF file the targeted path would have to have another level in it - cuz now the MC 'ContentWindow' is no longer one level down from the '_root' but two levels?
For example: _root.LoadedChildMovie.ContentWindow.play()
View 3 Replies
Mar 9, 2010
I am trying to load a swf(as3) into another As3 Swf with the Movieclip loader. After loading however Loader.width/loader.content.width returns an exaggerated value than the actual width of the swf being loaded. Any pointers on where to begin looking for the discrepancy?
More Details (if it helps)
The swf being loaded has UI components like dropdowns, input boxes and combo boxes (its a Form to fill up), and a coded one-time tween. When the child MC loads into the parent movieclip, the Loader.width value returned is exaggerated by about 28 pixels (although the height remains the same). Loader.content.width also returns a 28 pixel exaggerated value. The Exaggerated value is more than even the stage width of the child MC. The extra ~30 px are upsetting subsequent code in the parent movie to scale and center the loaded swf.
update:
stage.stageWidth returns the correct Value.Code used in the parent MC, to load external SWF:
private var deadURL = "child.swf";
private var deadReq:URLRequest = new URLRequest(deadURL);
private var deadLoader:Loader = new Loader();[code].....
View 2 Replies
Nov 29, 2009
Is it possible to place two or more instances of the same loaded from a loader Bitmap in one container?
View 1 Replies
Jul 28, 2004
I have one swf called main.swf which has a container movieclip that gets external swf's loaded into it.
my external swf is called hosting and it calls an array of data that is loaded into a movieclip that is duplicate for each element from the database. The elements from the database are as follows:
Business
Economy
Power
Standard
Each one of these has a button over it that when press loads information from the database into a movieclip that contains a textbox. My button code is: _root.movieclip.loadVariables("url to database");
This works flawlessly when I run the hosting.swf by itself, but when it is loaded into the contianer in the main.swf the buttons dont work. I believe that it is the _root in the button call that is causing this but I dont know how to fix it. I think the _root variable changes when hosting is loaded into the main.swf.
View 1 Replies
Oct 11, 2010
I need to scale the loaded image or movie in a flash container without loss of quality, how to do it?
View 1 Replies
Jun 23, 2009
One movie, named Gallery_1, with hotpots via which external swfs are loaded into a container mc of the main timeline of the Gallery_1 movie, works perfectly by now. Via another button function the Gallery_1.swf is loaded into a container mc on the timeline of the main swf, which works alright as well, but when one then clicks the hotspots of the Gallery_1.swf one gets following error message:
[Code]...
View 1 Replies
Jan 21, 2010
I have a movieclip that is loaded into a container movieclip. When I click on it, I want it to goto a particular frame and play. Have tried using the name of the container MC (LiftPlaceHolder.gotoAndPlay(10)) but this has no effect at all.
View 1 Replies
Oct 21, 2009
Is there a simple way to completely empty a display object container regardless of what it contains, including if it's already empty? In other words, without determining its children and using removeChild on each?
View 2 Replies