ActionScript 3.0 :: Controlling Loaded Swf Rewind?
Aug 2, 2009I need to bring the playhead to the begining (rewind) each time the onsound button is clicked. But a loadimage function was used to load the swf.
View 10 RepliesI need to bring the playhead to the begining (rewind) each time the onsound button is clicked. But a loadimage function was used to load the swf.
View 10 RepliesI will try to be as clear as I can. I have an existing swf file that I want to add Play,Pause, FF and Rewind via an externally loaded swf file that has the controls contained in it.I am loading an external swf file that has all of the controls on it via this code:
// Set up the Mouse to use a listener
var mouseListener = new Object();
Mouse.addListener(mouseListener);
[code].....
I have an existing swf file that I want to add Play,Pause, FF and Rewind via an externally loaded swf file that has the controls contained in it.
I am loading an external swf file that has all of the controls on it via this code:
// Set up the Mouse to use a listener
var mouseListener = new Object();
Mouse.addListener(mouseListener);
[Code]....
I am doing this so I can rollover the viewing window and have it appear. I cannot get any code to work to control the timeline (which is broken down into sections with individual MC's in each section.
What I am looking for is the code to apply to the buttons on the external swf file that has the controls to control the playing of the movie.
Problem is that my rewind and fast forward buttons do not work properly in the sense that they start to mess up when you fast forward or rewind past the current scene. It seems to just skip through the whole movie and totally mess up the animation.the code for the controls is on a single layer and reads as the following:
stop();
play_btn.onRelease = function (){
play();
[code].....
I have a controller.swf which loads an external swf into a movieclip.
news_mc = loadEvent.currentTarget.content as MovieClip;
the swf is called "news.swf" and has a movieclip on the maintimeline, frame 1 called "sb".
I have tried everything to access this such as
mews_mc.sb.alpha = 0;
but nothing works?
I'm loading a SWF into a main SWF using the code bellow, from senocular tutorials:
Code:
var request:URLRequest = new URLRequest("home.swf");
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
[code]....
I have buttons inside a movie clip, at the main movie (parent) and I want to control the home.swf movie that I just loaded. How can I do that?I'm trying this, without any result:
Code:
function botao_clique(e:MouseEvent):void{
MovieClip(root).window_mc.textos_mc.gotoAndStop(2);
}
I have several flash swf's that are about 10 - 20 min. each. I load these in a player that I have created as the user selects them from a menu in the main swf (a swf player basically). I can pause start and stop the swf's with no problem, but I can't seem to get a handle on controlling the audio. I have the audio in the loaded swf's timelines because I need to sync the audio with the animation taking place in those swfs. I could, take the audio out of the timeline (after syncing it), and then load it separately, but it would be much cleaner for me to just have it in the timeline.
I've resorted to the SoundMixer of the main swf to mute and change the volume, but I can't get hold of the Sound(), soundTransforms etc. of the loaded swf. To assign a play location for the soundChannel I need to access the loaded swf's Sound().Play() function, but I can't seem to do that. I have exported the timeline audio in it's actionscript, supplied a name (same as it's class name), and then tried to access it, but I can't seem to do it (yes I wrap the loaded.content variable in a MovieClip cast--that's how I can control the pause and play of the animation). Tutorials I have found only seem to work with sounds loaded into variables, and none refer accessing timeline sounds in a loaded swf.
I'm loading assets from a swc and I need to loop through every frame of the movieclip and find a certain instance so I can colorize it. Is this possible? It seems that with a swc I loose the ability to control the movieclips playback. It just plays and repeats no matter what I do.
View 4 Repliesthe .FLA files are attached at the bottom. intro.swf is the actual movie and introLoader.swf is the preloader and it loads intro.swf into it.the problem with the actionscript previously was that itd start playing the external movie halfway through the preloader bar as if it was streaming..however i found a workaround that doesnt really work.. i used xyz.stop(); and xyz.play(); functions to control when the external movie plays.The problem with those functions is that i need a check for them i.e if(percentage <100) etc. which causes problems like if the flash movie is already watched once and cached and you reload the page it wont play.
View 9 RepliesI have a button on my main scene which creates the varaiable "soundoff", then if one of the placed swf's when loaded detect the variable it stops all sounds,
if(soundoff == true){
stopAllSounds();
This works fine but does not target sounds placed in movieclips in the loaded swf's timeline. I've tried targeting them with the _root. command and using linkage but I can only stop the sound in the main timeline level.
Is it possible to control one loaded SWF File e.g.,(MOVIE-1.swf) from another loaded SWF file e.g., (MOVIE-0.swf) on a different level? E.g. with a syntax like:
onRelease
_MOVIE-1.SWF.gotoAndStop (4)
or:
onRelease
gotoAndStop (MOVIE-1.swf, frame4)
I am loading a .swf that a previous developer made (don't have the .fla) but the actionscript at the end of the movie is resolving to home.html. Instead of it resolving to home.html I would like for it to instead have gotoandPlay.
View 4 Repliesis it possible for a loaded swf to control the timeline of the main swf or even to tell the main swf to unload the loaded swf just by pressing a button in the loaded swf.
View 2 Repliesi had made a image gallery using xml in flash MX 2004. some of the images are jpgs and some are swfs. i'm trying to get it so that once the external file, be it jpg or swf, is loaded, it would recenter itself in the middle of the page.so i attached the following code to the container clip that the files were loaded into:
onClipEvent(load){
this._x = ((304 - this._width)/2);
this._y = ((304 - this._height)/2);
[code].....
I'm creating a flash site, navigation is simple, or so I thought. Buttons along the top load external swf's to the stage. As they are loaded and unloaded the swf's animate in and out again on button clicks so the next one can come in.
I have suceeded in controlling the loaded swf's to get them to animate onto the stage, but what I have added to animate them off again does not work. I don't even get error messages, it is just ignored.
I have indicated below what I have added to try and 'animate out'
Actionscript:
stop();
//////// HOMEPAGE CONTENT LOADS ON PAGELOAD ///////////
addChild(loader);
var swfloader:URLRequest=new URLRequest('contentboxhome.swf');
[Code].....
This is a sample of two of the 5 buttons, I have tried using both the 'if' function on all buttons and the 'event complete' function on all of them, and both are just ignored. No error messages, no unusual occurrences at all. The code is just skipped over and the swf I have requested to load, just animates in and replaces the one there currently. Only funny thing is that, despite the 'loader.unload();' being WITHIN the 'complete' function, it still seems to be fired. The swf's never overlap each other.
trying to create a universal fla file (shell.fla) in which I can load any swf file and control it from buttons in the shell itself. The buttons being play, pause, rewind, magnify etc.I�ve done all this in AS2 and now I have to do it in AS3. See my website [URL] E-Training - Motor to get a better idea of what I mean.The shell file has three buttons so far with instances called playMovie, stopMovie changeMovie and a dynamic text field - movieNumber. It is bound to the class Shell. The swf files to be loaded are numerical 1.swf, 2.swf, 3.swf etc. If I can get playMovie, stopMovie to work I can then do the rest.Here is my code so far for the class Shell.as:
package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.events.Event;
[code]....
1. How can I kill, unload, removeChild the preceding swf file which has been loaded? When I load a swf file it creates a new loader.
2. On the onPlayClick and onStopClick buttons I get the following error message:
TypeError: Error #1009: Der Zugriff auf eine Eigenschaft oder eine Methode eines null-Objektverweises ist nicht m�glich.at Shell/onPlayClick()
What I'm trying to do is create buttons in one swf that load another swf and also give instructions to begin playing from a certain frame in that swf. The target swf has a preloader on frame 1 and then a movie clip that contains a video in frame 2. Depending on which button the user presses the video will be cued up ready to play at different frames. think it may need an if statement ie if x=34 then goto frame 34, but I can't seem to pass the variables to the loaded swf.In the zip file is an example of what I'm trying to do.
View 10 RepliesI load a movieclip via:
on(release){
loadMovieNum("detection.swf", 1);
}
So I load it in my current timeline on level 1. Now in the detection.swf is a button that has to controll the first movie. (that loaded the swf)
[Code]...
I have a simple swf called site.swf that loads a menu with UILoader called menu.swf, from menu I'm able to navigateToURL but I also need that it goes to frame 50 in menu.swf.
View 1 Replieshow to assign a volume control component available in the video components library to an externally loaded swf once it's loaded into my main flash movie? I want to feature the volume control at the bottom of my main flash so that when you click a button to load the swf that volume control will be able to start controlling it's volume. Also, I want to be able to load several swfs and once each one is loaded--only one playing at any given time--into the main flash that same volume control can control them. Is this possible and, if so, how do I do it?I'm using CS5.
View 1 RepliesI have loaded a SWF and attached to a MovieClip which exist in my current movie using the following code, and now I just want to access the loaded SWF to send it orders like play() or gotoAndPlay(); I have tried also: container= MocieClip(loader.content); instead adding child, but it trhows an error
View 10 RepliesI have a Loader that loads external SWF. The external SWF has sound. I'd like to stop, pause and play the sound.
[Code]...
This only mute the sound only and the sound is still runnung.
Another question regarding externally loaded .swf's!
In my externally loaded swf.s are a pause and play button which work perfectly using only:
on(release){yanm.play();}
(yanm being the name of my movie file containing my movie!!) and obviosuly the stop is with a stop!
Now I want to add a 'Mute' button so that the user can turn off the audio. What script would I use for this?
I also want to use a 'Rewind' or 'Restart' button to return to the beginning of my movie and begin playback again. What script would be used instead of .play?
I want to communicate with an object within a loaded swf. I know I can use this event listener and function to do so right when the swf has completed loading:
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadSections)
function loadSections(event:Event):void { event.target.content.mc.y+=2
}
But I want to be able to manipulate a given object from the loaded swf at any time not just when the loading is complete. So basically as long as the swf is loaded, is there a way to manipulate objects and call functions within that swf?
Both the external and host swf are AS3.
I have a loaded swf file that is a short animated intro I am using he addChild method. I wold like it to simply move the timeline to a label "menu" after it has played. This is the cde on my main Timeline:
stop();import flash.display.*;import flash.events.Event;import flash.media.SoundMixer;
var Xpos:Number=0;
[Code]....
Can we control the external loaded swf with buttons created on another swf. Let me simplify this: I have one swf in which I have created one small timeline animation and the second swf has the buttons to play and stop the animation.
Now I load this 2 swf in my main file and want to control the animation through that buttons.
I load a movieclip via:
on(release){
loadMovieNum("detection.swf", 1);
}
So I load it in my current timeline on level 1. Now in the detection.swf is a button that has to control the first movie. (that loaded the swf)
I tried:
on(release){
_level0_root.nextScene();
}
Which did not work. Referencing via _root.nextScene() also, because the loaded swf has its own _root. So how can I control the first movie out of the loaded one?
what actionscript could i use to make an movies loaded into a movieclip play. tried _root.holderMC.play(); holderMC being the movieclip the external swf is loaded into, doesn't seem to work! searched the internet too but no lucky
View 2 RepliesI made an empty movie clip and named it "container" and then I made a button.. Here's the code for the button in main movie..
on (release){
container.loadMovie("movie1.swf");
movie1.play();
}
Then I put stop(); on the first frame of the swf to be loaded. What I want is to play movie1 by pressing the button in the main movie..
I hava a move clip called Main in witch I load Interface and than load Content swf clip.I was trying to control a object (movie clip in loaded Content swf clip) with asctionscript in Interface swf and inversely, but nothing happend.I hava a button on the interface which I would like to activate when I click on the some area of the Content swf .
View 5 Replies