[MX] Pause/play Externally Loaded Swfs?
Hi,
I've found a few threads about doing this for audio, but they don't seem to work with a full swf? Basically I have a selection of swfs that load into targets and what I want to be able to do is have a button that either says 'stop this specific swf' then next time you click says 'play this specific swf', or, as they all play on their own frames one that says 'stop any external swfs' and then 'start any external swfs'. It sounds pretty simple, but for some reason nothing I've tried seems to work and the threads I've found asking the same thing have no responses?
Any help with this would realy be appreciated as I've spent all day messing about with it and still no luck..
Tom
FlashKit > Flash Help > Flash ActionScript
Posted on: 07-08-2008, 10:19 AM
View Complete Forum Thread with Replies
Sponsored Links:
Loading External Swfs Into Externally Loaded Swfs.
ive got some buttons on my main timeline that im using to load external swfs into an empty mc. the buttons are coded with the following:
on(release){
if(_root.currMovie == undefined){
_root.currMovie = "1";
emptyMC1.loadMovie("1.swf);
} else if (_root.currMovie != "1") {
if (emptyMC1._currentframe >=
emptyMC1.midframe) {
_root.currMovie = "1";
emptyMC1.play();
}
}
}
1.swf also has some buttons that load external swfs into a second empty mc. those buttons are coded with the following:
on(release){
if(this.currMovie == undefined){
this.currMovie = "2";
emptyMC2.loadMovie("2.swf");
} else if (this.currMovie != "2") {
if (emptyMC2._currentframe >=
emptyMC2.midframe) {
this.currMovie = "2";
emptyMC2.play();
}
}
}
1.swf loads into emptyMC1 ok, and 2.swf loads into emptyMC2 ok.
when i press any of the buttons on the main timeline, the outro animation of 1.swf plays correctly, but the outro animation of 2.swf does not. is there a way to the buttons so that the emptyMC's unload sequentially?
View Replies !
View Related
Here's A Dilly...how Do I Pause An Externally Loaded Swf..
Ok, so I've put my soundtrack into a separate swf document and I have a sound on/off toggle. What I need to do is when you click on the movie clip with the on/off toggle button I'd like the soundtrack swf (which is loaded immediately upon opening the main swf) I'd like to PAUSE that soundtrack swf.
In other words, how do I pause and again play an externally loaded swf? I hope I'm saying this right
View Replies !
View Related
Making An Externally Loaded Swf Pause
Hi All,
I have a base movie (base.swf) that loads an interface movie (buttons.swf) on level 10. When you click on the first button (play) it plays another swf movie (film.swf) on level 5. When you click on the third button (stop) it unloads level 5.
How do i actionscript (in a simple manner) for it to pause the film.swf (thats loaded on level 5) when the second button is pressed (pause)?
I've attached the files,
thanks for any help - jeff
View Replies !
View Related
Externally Loaded SWFs
I'm trying to load swf1 in swf2, which works, using a scrollpane and this little bit of actionscript:
_root.main1.loadScrollContent("../test/swf_main/swf1.swf");
But, swf1 contains a dynamic text box in a movie which should load an external txt file, using this code:
loadVariables("welcome.txt", this);
Now, when I open swf1, it displays the text from welcome.txt, but when I open swf2, welcome.txt isn't displayed.
Is this even possible? Or what am I doing wrong?
View Replies !
View Related
Cant Unload Externally Loaded Swfs Please Help
Hi guys...I have searched the board and read everything to do with loading and unloading external swfs yet I am still having problems unloading some swf's.
My main stage starts by loading an intro.swf and a menu.swf into level1 and level100 respectivly. The menu.swf then has a slideup menu system with buttons that load other external swf's which all work fine. However when I try to unload some of the swf's they dont work.
If I click on a button within the menu I then load a movie into level1 replacing the intro.swf and another set of buttons appears next to the main menu which are loaded into level3.
If I then click the home button to return to the start it should unload the content on level1 and load the intro.swf again whilst unloading the swf on level3 to appear like it is back to the start...the main content unloads fine but the buttons in level3 do not.
on (press) {
unloadMovie("_level3.bottommenu1.swf");
unloadMovie("_level1.op01.swf");
unloadMovie("_level1.patientsleftbox.swf");
unloadMovie("_level4.video1.swf");
loadMovieNum("intro.swf", 1);
}
this is the code to return to the start basically the home button...to see this working please goto http://www.gallstone-surgery.com/site/index.html you can also download the fla's
View Replies !
View Related
Sizing Externally Loaded .swfs?
kind of a newb to scripting. how do you size a movie clip that you want to load into a movie? also, how can i control the location of the loaded .swf? this is the script i've been trying to use:
loadMovieNum("http://www.blabla.com/bla.swf",1);
^not the real url.
i tried putting the code in a movie clip, then scaling the MC on the stage, to no avail.
any help greatly appreciated!
View Replies !
View Related
_totalFrames And Externally Loaded Swfs.
Im working on a cd-rom application in Flash for my portfolio which will feature heavy video (enhanced music cd)
Using Sorenson Squeeze I have exported mpeg video directly to a swf.
I have about 10 swfs and each are circa 30mb.
As such they are brought in using loadMovie when requested and attached to movie_mc (a placeholder).
Because I used sorenson I have no ability to add functions (preloader to pass back a totalFrames variable to the main timeline)to these external swfs.
I need to determine the totalFrames in a loaded swf in order to determine when it has finished playing so that it can be replaced with a standard mc.
using a combination of this code:
Quote:
enteredTrack = audioFields_mc.songInput;
loadMovie("musicVids/"+enteredTrack+".swf", moviePlayer_mc.movie_mc);
dynamicTitle = enteredTrack+".swf";
dynamicTitleFrames = moviePlayer_mc.movie_mc.dynamicTitle._totalframes;
Im having no luck.
I know for a fact that this line is wrong
moviePlayer_mc.movie_mc.dynamicTitle._totalframes;
and it is infact reading "dynamicTitle" as part of the path instead of adding its value to the path. How to fix this, I dont know.
Im also concerned that requesting the _totalframes immediately after loading the video in wont work because it will not be fullyloaded from the CD when the function is called.
Help!
View Replies !
View Related
Targeting Externally Loaded Swfs
Ok guys here is my problem
I have an empty Movie which i named main.swf. on the first frame of main.swf i load another movie called shell.swf into _level100 of the main.swf this has stop and play buttons located in it....now on this timeline i load another movie into _level2 which is the animation to be controlled by those stop and play buttons. However i cant seem to target the animation correctly whne the stop button is clicked the animation continues to play...
any ideas guys?
View Replies !
View Related
Controlling Externally Loaded Swfs
Hello-
I am using AS 2.0 and MX 2004. I have a movie that loads in external swfs and images using the MovieClipLoader to load the element in to a clip called "container".
Now I've been testing within flash with test movie and it works great. as soon as I export my commands that toggle within different frames of the external swf fail.
what I have is:
container.gotoAndStop(frameLabel);
is there an obvious reason why this would stop working on export? or things I could try to figure this out.
I tried loading on to levels instead so I would have:
_level25.gotoAndStop(frameLabel);
and I still have the problem.
I am exporting as Flash 8 and testing in Flash Player 8.
ideas?
View Replies !
View Related
SWF Object And Externally Loaded .swfs
Anyone know of any difficulties using the SWF Object method (http://blog.deconcept.com/swfobject/) to place a .SWF which loads external .SWFs into itself into an .html document?
The project is a Flash only site that in which the .SWF file displayed on the .html page is a shell for various externally loaded .SWFs. All .SWF files reside in the same folder and the file structure was not changed when the main .SWF was placed in the .html file using SWF object.
Thanks
View Replies !
View Related
HTML And Externally Loaded Swfs
I have a Flash movie where I'm loading in external swfs. When I preview in Flash, it works fine. When I publish in HTML (from Flash), it works fine. When I try to embed my Flash movie into a different HTML page using Dreamweaver, the external files don't load. I've done this a hundred times in the past, but I'm having this problem with a few different Flash Movies -- Only the ones that load external content -- any ideas??
View Replies !
View Related
Communication Between Externally Loaded SWFs
Hi
I have a problem with working with loading different SWFs into a main SWF file. I have one main SWf file (menu.swf) and then several external files (Game1.swf, Game2.swf, Game3.swf etc).
The main SWF starts off and loads Game1.swf into the main SWF. After a user finishes Game 1 he clicks on a button inside the Game1.swf and thats supposed to unload Game1 and loads Game2 into the menu swf.
The trouble is I have no idea how to reference methods in the main SWF with the loaded SWF. Anyone have any ideas?
I tried root.parent but that wouldn't compile.
Maybe there's a better way of doing it?
Any help would be greatly appreciated.
View Replies !
View Related
Masking Problems With Externally Loaded Swfs
I'm loading external swfs into a target movieclip ("clip a"). That target is nested inside another movieclip ("clip b"). I have an animated mask applied to "clip b" (the animated mask is contained within a graphic symbol). When I do this the mask layer doesn't seem to work properly (sometimes it doesn't use the animation, other times the externally loaded swf doesn't show up at all). I have tested to see if it would work without loading the movie from an external swf and it works fine. Its only when I use loadMovie() that it seems to fail. I've also noticed that if I publish as flash player 6 it works fine (I can't use 6, though, due to client restrictions). Has anyone had this problem before and created a work around for version 5? Any help or a simple explanation of why this happens would be greatly appreciated.
View Replies !
View Related
(Simple?) Problems With Externally-loaded .swfs...
I've got a jukebox thingy that allows the user to choose a track (an external swf) into a target mc (using loadMovie). Only one target is used. It all works, but...
...5% of the time they just don't load.
Could this possibly be because the button has a fair chunk of code on it (if track == 1 if quality == "high" loadMovie "track1url", _root.swfholder etc.) and Flash occasionally fails? Does this happen? Do I need to repeatedly ask for the swf until I'm sure it is loading? Or is the server simply not processing the request?
...if I change track too quickly (as some users presumably will...) the connection slows to a crawl.
This is the bigger of the two problems. If I load a swf into a target and then unload it before it is fully loaded will it continue loading regardless? If I quickly select track-one-then-three-then-seven is my connection receiving three swfs simultaneously? Shouldn't they replace each other?
Help please!
View Replies !
View Related
Controlling MCs Inside Externally Loaded SWFs
I am loading a SWF file on layer1 of my project, and I'm attempting to position it from my _level0 "root" timeline with:
_level1.pledge._x = 256;
_level1.pledge._y = 144;
Alas, I can't make it work. The only MC inside the loaded SWF file has the instance name "pledge", so I figure this should work. What am I doing wrong?
View Replies !
View Related
Using SendAndLoad And OnLoad() From Externally Loaded SWFs?
My site basically uses movieclips to load things in a similar method to HTML frames...I have set up a simple forum using php and mySQL, and everything works fine...provided that the forum's swf is loaded as _root...however when i have the index.swf up and load in the forum's swf as a movieclip, nothing works properly...what it is supposed to do is through a sendAndLoad kick out the forum name that should be retrieved to a php script, then return the text and display it in a dynamic text field...simple...and working when layers are not in the way...it still sends the data properly...but the text does not return, or at least does not display...
on (release) {
sendout.forum=topic.getValue();
sendout.sendAndLoad("HIDDEN FOR POSTING", read, "POST");
}
is the button's code and
read = new LoadVars();
sendout = new LoadVars();
read.onLoad = function(success) {
if (success) {
forumtext.text = read.displaycomment;
}
};
is on frame 1...the variable returned by php is 'displaycomment' and on the stage the dynamic text box is 'forumtext'....
as i say, when this swf is loaded in the browser all is well...but when it is loaded into the main swf, it all falls appart...
any help would be greatly apperciated...
index: www.ancalagon.net/index.swf
standalone: www.ancalagon.net/whatwassaid.swf
View Replies !
View Related
How To Access Vars From Externally Loaded SWFs
Hey all,
Pretty much as stated. I have an FLA I'm working on, and I want to load several SWFs into it, with the paths being generated by a PHP page query, which spits out an XML file.
I got all this working just fine, but I can't quite get to the next step. There are some variables that reside in each of the SWFs that I need to get access to (reason being, I would like to have specific events happen based on which clip they are, but be controlled by the "MotherSWF"). So as I said, I have this all working, up until the point that I try to get the vars from the children (Imported SWFs). Tracing the var itself results in the whole "undefined property" mumbo jumbo, and trying to trace the var via the Loader simply returns "undefined". Here's the code (Note, I'm NOT classing this out at this point, as I'd rather learn the methods of how to do everything prior to trying to hotwire a bunch of classes right now. I think that's just opening up another can of worms, which I don't need to do at this point. More worms == more problems):
ActionScript Code:
stop();
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.xml.*;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
import flash.net.URLRequest;
var avatarBuilder_stage:Stage = this.stage;
var avatarBuilder = this;
var myResult:XML;
var testingNum:Number = 0;
var loadArray:Array = new Array();
var buildHolder:MovieClip = new MovieClip();
buildHolder.x = 410;
buildHolder.y = 150;
buildHolder.scaleX = 1.40;
buildHolder.scaleY = 1.40;
avatarBuilder_stage.addChild(buildHolder);
function LoadingXML() {
this.loadXML();
}
function loadXML():void {
var loader:URLLoader=new URLLoader();
loader.addEventListener(Event.COMPLETE,completeHandler);
var myRequest:URLRequest=new URLRequest("test/stephen/avatarBuilder/swfParser.php");
try {
loader.load(myRequest);
}
catch(error:Error) {
trace("unable to load requested URL");
}
}
function completeHandler(event:Event) {
var loader:URLLoader=URLLoader(event.target);
myResult=new XML(loader.data);
avatarBuilder.gotoAndStop("loaded");
}
function initMovie() {
var headHolder_mc:MovieClip = new MovieClip();
buildHolder.addChild(headHolder_mc);
headHolder_mc.x = 97;
headHolder_mc.y = 100;
var headLoader_mc:MovieClip = new MovieClip();
headHolder_mc.addChild(headLoader_mc);
var mouthHolder_mc:MovieClip = new MovieClip();
buildHolder.addChild(mouthHolder_mc);
mouthHolder_mc.x = 98;
mouthHolder_mc.y = 134;
var mouthLoader_mc:MovieClip = new MovieClip();
mouthHolder_mc.addChild(mouthLoader_mc);
var noseHolder_mc:MovieClip = new MovieClip();
buildHolder.addChild(noseHolder_mc);
noseHolder_mc.x = 96;
noseHolder_mc.y = 104.1;
var noseLoader_mc:MovieClip = new MovieClip();
noseHolder_mc.addChild(noseLoader_mc);
var eyesHolder_mc:MovieClip = new MovieClip();
buildHolder.addChild(eyesHolder_mc);
eyesHolder_mc.x = 97;
eyesHolder_mc.y = 67.5;
var eyesLoader_mc:MovieClip = new MovieClip();
eyesHolder_mc.addChild(eyesLoader_mc);
var hairHolder_mc:MovieClip = new MovieClip();
buildHolder.addChild(hairHolder_mc);
hairHolder_mc.x = 97.5;
hairHolder_mc.y = 80;
var hairLoader_mc:MovieClip = new MovieClip();
hairHolder_mc.addChild(hairLoader_mc);
loadArray.push(noseLoader_mc);
loadArray.push(headLoader_mc);
loadArray.push(hairLoader_mc);
loadArray.push(mouthLoader_mc);
loadArray.push(eyesLoader_mc);
for (var i:Number=0;i<loadArray.length;i++) {
loadPiece(i);
}
//avatarBuilder.gotoAndStop("allContentLoaded");
}
function loadPiece(i) {
var mcl:Loader = new Loader();
var tempClip:MovieClip = loadArray[i];
var loadURL:String = myResult.swfPath.(@id==i).piece.(@id=="0").path;
var loadURLReq:URLRequest = new URLRequest(loadURL);
mcl.load(loadURLReq);
mcl.contentLoaderInfo.addEventListener(Event.COMPLETE,initImage);
function initImage(event:Event) {
trace(mcl.content); //returns [object MainTimeline]
var loadedClip:MovieClip = new MovieClip();
tempClip.addChild(mcl);
switch (i) {
case 0 :
tempClip.x = -25;
tempClip.y = -25;
break;
case 1 :
tempClip.x = -100;
tempClip.y = -100;
break;
case 2 :
tempClip.x = -140;
tempClip.y = -115;
break;
case 3 :
tempClip.x = -60;
tempClip.y = -37.5;
break;
case 4 :
tempClip.x = -60;
tempClip.y = -37.5;
trace(mcl.eyeNum); // This is where I have been trying to grab the var values...
//blinkInterval = setInterval(blink, 333);
break;
}
}
}
/////////////////////////////////////////////Load the XML file in the first frame////////////////////////////////////////////
LoadingXML();
So that's for the parent. This is for the child. They live in frame 1 of the SWF:
ActionScript Code:
var eyes1 = this; /*not sure if this will work, but I used to get around
complicated timeline pathing and having to load vars in from external SWFs
with an "_global.myTimeLine = this;" in the first frame. Then I could simply
access anything in that SWF by accessing the _global... But those are
gone... :( However, I want to see if something similar will work. If you have
a better/cleaner solution, I'm all ears on that too!! :D*/
var eyeNum:Number = 1;
Thanks in advance!
S
View Replies !
View Related
Properly Closing Externally Loaded SWFs
Hey,
Leading on from my previous post, how is the correct way to go about completely removing an externally loaded swfs?
I ran a test by having a simple SWF with a timer that runs every second, then another SWF that loads it up...
Code:
var thisRequest:URLRequest = new URLRequest("flash_1.swf");
var thisLoader:Loader = new Loader();
thisLoader.load(thisRequest);
stage.addChild(thisLoader);
So then once it loads up flash_1.swf and you see the traced messages popping up every second you then click a button in the main SWF and it runs the following code:
Code:
thisLoader.unload();
stage.removeChild(thisLoader);
thisLoader = null;
I thought that would remove the SWF from the scene, as the SWF vanishes from the stage, however the timer keeps ticking, so it is still using up resources behind the scenes... Do i have to wait for the GC to clean it up or is there a "correct" way to clean up after yourself?
View Replies !
View Related
Button Addressing In Externally Loaded Swfs
I have a swf loaded into a container swf that has buttons and various other interactive elements. I'm seem to be having issues with addressing. I can't get the buttons within these loaded swfs to work the way I want them to. How would addressing be handled in these situations? Any help in this regard is greatly appreciated.
View Replies !
View Related
AS3 - Stopping Sound In Externally Loaded SWFs
Hi folks...I've spent hours trying to solve this; to no avail.
I've built a Flash movie that demos a new website. The Flash movie loads 14 external SWF files, each of which contains a single narration sound clip.
I can get the external SWFs to load just fine, but when I load the next clip, the sound from the first clip keeps playing. I can use SoundMixer.stopAll();, but that has the unfortunate effect of also stopping my soundtrack, which plays in the main timeline of the container file.
I've heard there is a way to stop sounds contained in external SWFs, something about NetStream, but haven't been able to get it to work.
Complicating the matter: I can't edit the set of 14 external SWF files. Whatever solution I use must be implemented from the main container Flash file.
Can anyone help me with this? Here's a sample of the code I use to load in each SWF:
one_mc.addEventListener(MouseEvent.CLICK, go1);
function go1(myevent:MouseEvent):void {
myLoader.load(myRequest);
myLoader.contentLoaderInfo.addEventListener(Event.OPEN,showPreloader);
myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,showProgress);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,showContent);
}
And here is the preloader code I use:
function showPreloader(event:Event):void {
addChild(myPreloader);
myPreloader.x = stage.stageWidth/2;
myPreloader.y = stage.stageHeight/2;
}
function showProgress(event:ProgressEvent):void {
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
myPreloader.loading_txt.text = "Loading - " + Math.round(percentLoaded * 100) + "%";
myPreloader.bar_mc.width = 198 * percentLoaded;
}
function showContent(event:Event):void {
removeChild(myPreloader);
addChild(myLoader);
myLoader.x = 20;
myLoader.y = 155;
}
Thanks!!
View Replies !
View Related
Access Properties Of Externally Loaded Swfs?
Once an external swf is loaded onto my currently running swf using the Loader class:
1) Can the loaded swf access properties of the swf that loaded it?
2) Can the swf that perform the loading access properties of the loaded swf?
If any or both of the above is true, I would also appreciate a word or two about the process of access the other swf's properties/methods.
Thanks.
View Replies !
View Related
Externally Loaded .SWFs - Button 1 -> Movie 1
New question.
I understand the concept of the loadMovie() function. My issue now is that I've created several segments to the interface - The two I'll name here is A. the navigation movie which incorporates all my buttons and is loaded externally to the main movie and aligned accordingly with AS, B. the first movie I've created in a series of movies which has no other function than to look pretty and transition from photograph to photograph - also which is currently being loaded/positioned into the mainmovie directly under the navigation bars.
So my conundrum is now, how can I make button 1 call movie 1 when both are externally loaded and button 2 call movie 2, etc.? I became lost on a few AS tutorials that seemed to hint on how to make this happen, uncluding the Random Movies one I read on kirupa.com that doesn't seem to apply so much.
(please understand, the external loading effect will go hand in hand with a number of preloaders I plan to put into the site to direct the eye to each frame and basically individualize each piece of content as it appears)
View Replies !
View Related
Killing Processes In Externally Loaded SWFs
Hi,
I'm working on a page and I have found a little problem.
The splash page loads an external SWF containing a timed slideshow. When I unload that SWF and load a new one, the timer still loads images in the background.
Is there a way to kill all processes of an external SWF on unload??
Thanks
KD
View Replies !
View Related
Cross Fading Externally Loaded Swfs
Hey All,
I know this sounds similar to other posts. But, this is alittle different. I have used transitions between swfs where the first swf plays the intro, when the user clicks a button the first swf plays the 'outro' and loads the second swf intro. This not what I am looking for. I want the swfs to cross fade. I was thinking of using different layers. I have found a tutorial that seems to work but the action is on a button that loads the next swf in the array. I want to be able to pick any swf and have it cross fade with the one loaded in the holder.
Any Ideas? I will have at least 5 swfs to load.
//tutorial by Rich Shupe, FMA. http://www.fmaonline.com
/*
array of possible content to pick from. This article answered a question about swapping loaded SWF files with a transition, but this technique will also work with jpgs, without having to make swf files from them.
*/
swfArray = new Array("red_bird.swf", "chinatown_dragon.swf", "working_beast.swf");
//create two MovieClips that will hold the loaded files
this.createEmptyMovieClip("target1", 1);
this.createEmptyMovieClip("target2", 2);
//load first movie into clip 1 to start with the first image
target1.loadMovie(swfArray[0]);
//set clip2 alpha to zero so it can fade in
target2._alpha = 0;
//variables that store current clip and current content index
activeTarget = target1;
currentIndex = 0;
/*
movie-level enterFrame event handler that will fade down object 1 (if it's alpha is higher than zero), and fade up object 2 (if it's alpha is less than 100)
*/
this.onEnterFrame = function() {
if (obj1._alpha>0) {
obj1._alpha -= 10;
}
if (obj2._alpha<100) {
obj2._alpha += 10;
}
//enable trace to watch memory used by each loaded movie. this will illustrate the
// benefits of unloading the faded movie.
//trace("clip1: " + clip1.getBytesTotal() + " clip2: " + clip2.getBytesTotal())
};
//button script that swaps load target focus and loads the next movie
nextButton.onRelease = function() { // I want to put the action on individual buttons
//toggles values of object 1 and 2 between clip 1 and clip 2
if (activeTarget == target1) {
obj1 = target1;
obj2 = activeTarget=target2;
} else {
obj1 = target2;
obj2 = activeTarget=target1;
}
//assigns content of object 2 as next item in the content array, unless the
// end of the array has been reached. in this case start over at first item
if (currentIndex<swfArray.length-1) {
currentIndex++;
} else {
currentIndex = 0;
}
//load content into second clip
obj2.loadMovie(swfArray[currentIndex]);
//to reduce possible RAM and performance overhead, add an onEnterFrame
// event handler to object 1 to unload it once it has faded out.
//once the movie has unloaded, delete the onEnterFrame event handler
// to prevent future loads from unloading.
obj1.onEnterFrame = function() {
if (this._alpha<=0) {
this.unloadMovie();
delete this.onEnterFrame;
}
};
};
View Replies !
View Related
Externally Loaded SWFs Display Objects Outside Their Border
I have a MC on my master SWF that's say, 500x300 pixels. I'm loading other SWFs into this MC, and I noticed that, if the loaded SWF has objects that move off the stage during the course of its animation, then those objects are visible outside the boundary of my placeholder MC on the master SWF. Why in the world would that happen? How do I prevent it?
View Replies !
View Related
Syncing Sound In Multiple Externally-loaded Swfs
hey ho peeps,
i need your advice.....
i'm making a sound toy at the mo, and i've got three blocks in a horizontal line, that each load in a choice mini swf from 33.
Each of the 33 plays a different audio-visual loop when clicked. on clicking on one of the blocks to load in a swf from the 33, i need it to wait for the others (if they've already been clicked on and something's subsequently been loaded in and started playing), to come to the start of the loop before it starts to play. each mini swf will prelaod on click, so after this it then needs to queue up to wait for the next point to start playing. this will be every 2000ms or so. Imagine the swf waiting for the next bus to come along, to hop on to join his/her other two swf friends, if you would (if they're on the bus at this point).
I know setInterval is notoriously bad at accurately calculating loop lengths on different pcs/macs of different processor power, so onSoundComplete seems like the best bet, though the code for each sound is set in each mini swf, where each's library mp3 loop is stored and attached from.i think this might be an issue?
here's the structure:
blockHolder.swf
blockA.swf
mini1.swf...
mini33.swf
blockB.swf
mini1.swf...
mini33.swf
blockC.swf
mini1.swf...
mini33.swf
i've checked Franky B's bits which, though they're very informative, i'm not sure of how specific they are to this issue..
any help would be much appreciated.
thanks boys and girls
khav
View Replies !
View Related
Externally Loaded SWFs Make Movie Slower
I'm having a weird problem with some externally loaded SWFs that contain only audio. They were created with Squeeze 4.3.
When I load them into my movie they drastically slow down the animation of the entire movie. As soon as I stop the audio in the external SWF the rest of the movie's animation goes back to normal. But if I start the SWF again it slows down again.
My questions are:
- Is anyone else encountering the same problem with audio only SWFs?
- Does anybody have any advice on publishing settings for the audio SWFs that may fix the "slow down"? Or any other methods for publishing audio only SWFs?
View Replies !
View Related
Distinguishing Between Externally Loaded MovieClips And SWFs In The DisplayList
Hi. I hope the answer to this question is not so obvious that I have overlooked it.. but...
I am trying to create a graphical representation of the DisplayList of a flash site that is loading many external swfs. I want to be able to filter what is displayed (ie. Show only textfields, or show only images, or show only whatever). I have not been able to find a way to distinguish or select only the swfs. I would like this to be able to list ALL the swfs that are used in this projects and nothing else...Im sure this is possible - but it is escaping me,,,Thanks!
View Replies !
View Related
Having Problems With Externally Loaded Swfs When In HTML [renamed]
alright.
i've got a flash site that uses externally loaded .swfs to change the pages
(i.e. news.swf, shows.swf, merch.swf - that are loaded in when you press the corresponding button)
when i open the main .swf that the external .swf's are loaded into the site - it opens, animates and runs perfectly.
when i put the .swf into a HTML page (using Dreamweaver) the external movies stop loading at all.. when a button is clicked or when AS tells it to load a movie.
WHY IS THIS HAPPENING?
furthermore, there is an eCard that is used for the splash page. it's been done for weeks and has been online with people viewing it. it works perfectly where it's been online for the past few weeks AND works fine on my computer.
however NOW that i'm putting it into another HTML page to use it for a different splash page it's not loading external .swf files either!!! nothing was changed about the eCard, it's been done for weeks!!!!!
WHY IS THIS HAPPENING?
this is all completely new and out of left field. i've built SEVERAL flash sites using the exact same configuration and Dreamweaver.. and they've all been totally fine.
WHY IS THIS HAPPENING?
thanks,
mikey
View Replies !
View Related
Syncing Sound In Multiple Externally-loaded Swfs
hey kirupers,
i need your advice.....
i'm making a sound toy at the mo, and i've got three blocks in a horizontal line, that each load in a choice mini swf from 33.
Each of the 33 plays a different audio-visual loop when clicked. on clicking on one of the blocks to load in a swf from the 33, i need it to wait for the others (if they've already been clicked on and something's subsequently been loaded in and started playing), to come to the start of the loop before it starts to play. each mini swf will prelaod on click, so after this it then needs to queue up to wait for the next point to start playing. this will be every 2000ms or so. Imagine the swf waiting for the next bus to come along, to hop on to join his/her other two swf friends, if you would (if they're on the bus at this point).
I know setInterval is notoriously bad at accurately calculating loop lengths on different pcs/macs of different processor power, so onSoundComplete seems like the best bet, though the code for each sound is set in each mini swf, where each's library mp3 loop is stored and attached from.i think this might be an issue?
here's the structure:
blockHolder.swf
blockA.swf
mini1.swf...
mini33.swf
blockB.swf
mini1.swf...
mini33.swf
blockC.swf
mini1.swf...
mini33.swf
i've checked Frank Baumgartner's bits which, though very informative, i'm not sure of how specific they are to this issue...though maybe i'm wrong here...
any help would be much appreciated.
thanks boys and girls
khav
View Replies !
View Related
Flash MX Problem W/ Music Playing & Externally Loaded Swfs
Hi,
I was wondering if anyone could offer any advice on a problem I am having. I have 2 movies, one which holds a navigation menu and some music playing options, and the other which is my main movie. The main movie has an empty clip which loads the navigation and sound into it. However the music does not play in the main movie
Does anyone have any advice on why this may be?
Thanks!
Nelly
View Replies !
View Related
Storing Externally Loaded Object (swfs, Images, Sounds)
Hi
hopefully someone can help me with this.
I am creating a full site in flash... with a gallery and a media page... everything is working as it is... but the question i have is this.
If you load any external file into flash like an image or a sound file how do you make it not have to reload evertime you move to another page and then go back to it?
example
i have a gallery page that loads in images using xml... the each have there own preloader so it shows that its loading and thats great...
the problem is if i go to another page on the site example the news page... then i return back to the gallery page, the images have to reload again... is there anyway to fix this so if you load it once you dont have to load it again?
Any help would be appreciated
Thanks
View Replies !
View Related
Flash MX Problem W/ Music Playing & Externally Loaded Swfs
Hi,
I was wondering if anyone could offer any advice on a problem I am having. I have 2 movies, one which holds a navigation menu and some music playing options, and the other which is my main movie. The main movie has an empty clip which loads the navigation and sound into it. However the music does not play in the main movie
Does anyone have any advice on why this may be?
Thanks!
Nelly
View Replies !
View Related
Attached Sounds Don't Play When SWF Is Loaded Externally
Well, as the title states, I'm having this problem
I am importing a swf that has attached sounds to it, but the attached sounds do not associate when the swf is loaded. The sounds on my timeline stay intact however.
is there an attached sound import method??? or something?? I couldnt believe if flash was designed to not allow this. But I dont know what to do.
Thanks for any help.
Mark
View Replies !
View Related
Actionscript To Track Play Progress Of An Externally Loaded SWF File
I'm working through the tutorials in Flash Professional 8: Beyond the Basics to teach myself the skills I need to build a project for my day job.
The project is basically a slideshow presentation. I have controls loading into one level, an animated background into another, and then swf files loading into _level5 that the controls can pause, rewind, fast forward, and so forth. All that is in place. I have built a preloader, so I understand that part. What I am unable to figure out is how to track the totalframes and frames played on an existing level so that I can update a scrubber bar with percent played.
So, here's a snip of code:
Code:
function loadSlide() {
this.myMCL.loadClip("slide" + curSlideNum + ".swf", 5);
}
I run loadSlide() whenever I want to progress to the next portion of the presentation. What I would like to know, again, is how can I track the play progress of slidex.swf in _level5 so that I can present this information visually.
Thanks in advance for any help. I hope that I can become a productive member of this community over time. I hate feeling like an idiot like I do right now. I'm not much of a programmer, more of a designer, but I am enjoying actionscript so far.
View Replies !
View Related
Pause/play Loaded Swf
ok I have a swf loading into an movie clip, but I would like to make it stop and play with 2 different buttons.
tellTarget ("mc") {
loadMovieNum("behypno.swf", 1);
}
(I can't use the ''target'' option in the loadMovieNum)
what should the code of the stop/play button be?
View Replies !
View Related
Play/pause Multiple Loaded .swf
I have a flash project that uses lots of .swf loaded and unloaded into the main movie to keep file size down but I need a play/pause buttons that control multiple .swf loaded in the movie and the action on the main timeline. I can't seem to find anything on the internet other play/pause on the main timeline.
If anyone has any ideas would be grateful.
thanks
Joff
View Replies !
View Related
Pause, Play, Control Audio Loaded MC Help
hi guys,
I can't believe how basic this is, at least it should be basic. I can't seem to figure out the code. Essentially i've loaded an external swf into a movie clip on my main timeline called "dropzone" and I have buttons that I would like to:
Pause, play, turn audio on/off
I've tried
on (release) {
_root.dropzone.pause();
}
on (release) {
_root.dropzone.play();
}
But it's not working :/
Any help would be greatly appreciated, not sure where to go with this. I have absolutely no clue how to turn the audio on/off either.
HELP!! Thanks so much.
View Replies !
View Related
How Do I Get Sound To Begin Play Versus Pause When Loaded?
I am new to 3.0. My play/pause button for sound is functioning, but it begins on pause where I want the music to begin playing when movie is loaded Help! I am sure this is super EASY!
The Code is below and I will also post the file. Thanks soo much (in advance)!
var soundReq:URLRequest = new URLRequest("nameofsoundfile.mp3");
var sound:Sound = new Sound();
var soundControl:SoundChannel = new SoundChannel();
var resumeTime:Number = 0;
sound.load(soundReq);
sound.addEventListener(Event.COMPLETE, onComplete);
function onComplete(event:Event):void
{
play_btn.addEventListener(MouseEvent.CLICK, playSound);
}
function playSound(event:MouseEvent):void
{
soundControl = sound.play(resumeTime);
pause_btn.visible = true;
pause_btn.addEventListener(MouseEvent.CLICK, pauseSound);
play_btn.visible = false;
play_btn.removeEventListener(MouseEvent.CLICK, playSound);
}
function pauseSound(event:MouseEvent):void
{
resumeTime = soundControl.position;
soundControl.stop();
play_btn.visible = true;
play_btn.addEventListener(MouseEvent.CLICK, playSound);
pause_btn.visible = false;
pause_btn.removeEventListener(MouseEvent.CLICK, pauseSound);
}
pause_btn.visible = false;
View Replies !
View Related
Problem With "Flashing" Between Externally Loaded SWFs
I have the buttons at the bottom of my site load each "section" of the site from external swf files in the same directory as the main movie. When you switch back and forth between the sections there is a flash (like its loading the swf file every time you press a button maybe?). I have each section loading into the same container. I tried multiple containers but I couldn't figure out how to stop one from loading over the other, then you couldn't see the previous swf anymore (once a new one loaded it was on top of the others and I don't know how to fix that). Basically I just need some help with loadMovie and containers I guess. Here is the work in progress. The buttons load the external movies on release into a container.
>>> Flashing External SWFs <<<
What I want is a nice transition that you don't notice. With that flash you can basically tell its loading a new clip in. I want it to be seemless to the viewer. Any help is much appreciated.
View Replies !
View Related
Problem With "Flashing" Between Externally Loaded SWFs
I have the buttons at the bottom of my site load each "section" of the site from external swf files in the same directory as the main movie. When you switch back and forth between the sections there is a flash (like its loading the swf file every time you press a button maybe?). I have each section loading into the same container. I tried multiple containers but I couldn't figure out how to stop one from loading over the other, then you couldn't see the previous swf anymore (once a new one loaded it was on top of the others and I don't know how to fix that). Basically I just need some help with loadMovie and containers I guess. Here is the work in progress. The buttons load the external movies on release into a container.
>>> Flashing External SWFs <<<
What I want is a nice transition that you don't notice. With that flash you can basically tell its loading a new clip in. I want it to be seemless to the viewer. Any help is much appreciated.
View Replies !
View Related
How Do You Play And Stop External SWFs Loaded
Hi,
I am seeking advice or help on how to control the Playback, Volume of an externally loaded SWF.
PHP Code:
var slideRequest:URLRequest = new URLRequest("YourMovie.swf");
var slideLoader:Loader = new Loader();
slideLoader.load(slideRequest);
addChild(slideLoader);
slideLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
function onComplete(event:Event):void{
slideLoader.stop();
}
Can anyone help or point me to a useful tutorial. Basically I want to emulate a FLVPlayback class that only plays SWF movies.
Thanks for your help.
View Replies !
View Related
Externally Loaded Text Prob In Externally Loaded Swf
hi.
so i have a swf that has externally loaded text in it that is being loaded into another swf. the text loads properly when the swf is opened by itself but when the swf is loaded into my main movie the text ceases to appear
my code to load the text is
loadText = new LoadVars();
loadText.load("dates.txt");
loadText.onLoad = function() {
event1.text = this.event1;
date1.text = this.date1;
location1.text = this.location1;
address1.text = this.address1;
cost1.text = this.cost1;
event2.text = this.event2;
date2.text = this.date2;
location2.text = this.location2;
address2.text = this.address2;
cost2.text = this.cost2;
event3.text = this.event3;
date3.text = this.date3;
location3.text = this.location3;
address3.text = this.address3;
cost3.text = this.cost3;
};
any help would be much appreciated
View Replies !
View Related
Externally Loaded Text Prob In Externally Loaded Swf
hi.
so i have a swf that has externally loaded text in it that is being loaded into another swf. the text loads properly when the swf is opened by itself but when the swf is loaded into my main movie the text ceases to appear
my code to load the text is
loadText = new LoadVars();
loadText.load("dates.txt");
loadText.onLoad = function() {
event1.text = this.event1;
date1.text = this.date1;
location1.text = this.location1;
address1.text = this.address1;
cost1.text = this.cost1;
event2.text = this.event2;
date2.text = this.date2;
location2.text = this.location2;
address2.text = this.address2;
cost2.text = this.cost2;
event3.text = this.event3;
date3.text = this.date3;
location3.text = this.location3;
address3.text = this.address3;
cost3.text = this.cost3;
};
any help would be much appreciated
View Replies !
View Related
|