Loading A Page Upon Movie Completion
Having trouble in Flash 5 getting an image map to work, so what I want to do is have the movie play and upon completion of the movie it loads a new page. How can I do this?
FlashKit > Flash Help > Flash General Help
Posted on: 08-18-2003, 09:04 AM
View Complete Forum Thread with Replies
Sponsored Links:
Preloader Problems - Not Loading On Completion...
Hey,
I have a problem with my flash movie, it's not loading. I get the preloader and the bar goes along, but i think it gets to 99% or 100% and never loads.
Below is a screenshot of my scene1 - the actionscript layer is only to load a few html pages, the middle layer is the preloader - first frame script below...
onClipEvent (load)
{
total = _root.getBytesTotal();
}
onClipEvent (enterFrame)
{
loaded = _root.getBytesLoaded();
percent = int(loaded / total * 100);
text = percent + "%";
gotoAndStop(percent);
if (loaded == total)
{
_root.gotoAndPlay("s1");
} // end if
}
the lowest layer, second frame contains the main movie, but like I say it never loads on html ftp'd up to the site! It works on a preview and even html piped through on the pc, but as soon as it's up there it never hits s1.
Someone please help me!!!
View Replies !
View Related
Automatic Progrssion Of Movie After The Completion Of A Movie Clip
I've embedded several large Quciktime movies into there own seperate .swf files. I'm loading (loadMovie) these .swf file into a blank movie clips on my timeline. This works well however the required stop action at the end of the stream in the quicktime .swf's also stops the timeline. I would like to movie to progress automatically once the movieclip has finished without inserting a million frames on the timeline for it. Any hints would be greatly appreciated.
View Replies !
View Related
Making FLV Movie Disapear(close) Upon Completion?
Hello there!
Have problem for that I just can´t find a solution anwhere...(Googling for about 4+h for sure...)
Here is what I would like to do:
Create an Flash-movie site, Load an FLV movie (Steam or paked-in-SWF doesn´t matter) in the way that after the movie has been loaded and seen (comes to end of it) the movie should disapear and "flash page" continues... So that FLV movie would act as an Flash page INTRO ONLY! How can I do that?
Thx for help in advance!
T.B.
Berlin
P.S. I know I could just convert FLV to a SWf and than import, but that is not the option because of Sound issues in Imported FLV files, just spoilis the whole movie...
View Replies !
View Related
Loading A Web Page Into A Movie Clip
hi all. im having trouble with loading a webpage into a movie clip
i know you can load a swf into a movie clip but is it possible with a web page that is PHP?
i have been trying this but it opens in a new window and not the Movie clip "targetMc"
getURL ("file.php", "_root.targetMc");
Any ideas peoples?
Thanks
View Replies !
View Related
Loading Movie Into HTML Page
i was following this site, but it didn't work.. im sure i made an error.. .. i get a script error on this _root.loadMovie(_root.path,0);
and heres the html i was using
HTML Code:
<object type="application/x-shockwave-flash"
data="c.swf?path=movie.swf"
width="400" height="300">
<param name="movie"
value="c.swf?path=movie.swf" />
</object>
the site i followed it from:
http://alistapart.com/articles/flashsatay
View Replies !
View Related
How Can I Tell What Page Is Loading A Flash Movie
I've got a site that hosts a Flash movie. I allow other sites to include that movie on their page, but I need to know what domain that movie is appearing on.
I tried _url but that comes up as my domain, since that's where the movie resides. Is there an actionscript variable for the page (including domain) a movie is in?
Security is an issue. The domain has to be reported without having an easily-editable text or javascript line in the <object> or <embed> code that others put on their site.
The movie regularly calls a PHP page. But $_SERVER variables all refer to the location of the Flash movie (my server) and not the page it's on (thier servers).
Is there a way to get this information?
View Replies !
View Related
Loading A Flash Movie From Html Page
Hi all
Is this possible?
I want to launch a flash movie (800 by 600) from an html page - fairly straightforward I guess!
However here is the tricky bit - when the user clicks on the button to launch the flash movie, instead of opening a new window with the flash movie as soon as the user clicks the button, I would like to display a loading bar (possibly a small flash movie embedded into the html page) on the html page. When the loading bar gets to 100% i.e when the flash movie has completely loaded, I would like then to launch the 800 by 600 flash movie in a new window...
If this is indeed possible - can anyone suggest how to do it?
Thanks in advance
Chucky
View Replies !
View Related
Loading External Web Page Into A Flash Movie
I'm trying to build a site using Flash MX 2004, i want to intergrate an external web page into my movie. Is this possible? I have a movie nested within a movie, kinda like a frame, and i want to load the webpage into that movie. The on (Rollover) function would almost do what I'm looking for i think but there isn't anything to rollover. Any help would be appreciated.
View Replies !
View Related
Loading Html Page In To The Flash Movie
this might be a difficult question to answere
but is there a way to load a html baced webpage
in to the flash movie
like i would like my falsh website to stay on the screen
and when i click on the links that open up an html page
that html page opens up inside of the flash movie clip.
if there is no way to do that
is there another way to work around this?
please help
thank you
Vahe
View Replies !
View Related
GoToFrame In Movie When Loading HTML Page
Hi,
I have a navigation bar produced in Flash with five options. The rest of the page is in HTML.
When I first go to the site, option 1 is set to be highlighted (from within Flash). If I then click on option 2, a new html page is opened.
What I want to know is how to tell the Flash movie to go to 'frame 2' from within HTML so that when the new page appears, 'option 2' is highlighted in the movie.
Does anyone know a simple way of doing this?
Thanks for your help,
Andy
View Replies !
View Related
HELP--Automatic Loading Of HTML Page From Flash Movie
I'm having trouble getting an HTML page to load automatically upon the end of the flash intro. I'm wondering if this is possible by using ActionScript at the end of the flash movie or if I should be using some sort of JavaScript on the actual Dreamweaver page. If someone could give me some info on this and the code if it's necessary I would GREATLY appreciate it.
View Replies !
View Related
Loading A Movie Into A Specific Spot On A Static Page
hi. i'm having a bit of a dilemma on this. I want to build this whole site in flash. i want the entire page to be static, except for where the movie will play. see this page, i can draw out what i'm saying better than explain.
http://www.ro-toons.com/brian.html
anyway, i want to load a different movie into that predetermined space, and be able to shuffle forward, and back between the movies. like in doodie.com. i kinda learned that there is a script, or command where you have to target an empty movie clip...but i'm not good at programming, so i really couldn't comprehend. anyway, i'm in flash 4.
if you can help, it would help the cause - for me to put my cartoons up...
thanks much in advance.
View Replies !
View Related
Problem With Loading Movie Into A Main Flash Page
on (release) {
loadMovie ("content_aboutus.swf", dummy);
}
whats wrong with the code above?
the thing that i want it to do is to load the movie file into a target call dummy.
when the code above is executed, the movie is loaded but replaced the entire movie (the main flash page disappear and was replaced by content_aboutus.swf)
is there anything i should do?
View Replies !
View Related
Loading An Html Page Inside A Movie (urgent...)
Hello, first off, thanks for reading this message... I have a slight problem, I am a rookie or a flash newbie, and I really want to know how to load up an html page of a fixed size inside a flash movie. I'm guessing it is load variables, or get url, but i know with geturl i can only make it open the page in a new page or in the same page, but I want the html page loaded directly into the movie. It's really urgent, so if you could just reply or email me, my email is bite_yo_rhymes@yahoo.com. I have done research and I know that this technique I am using by integrating paypal buttons into my flash movie has been used by many other sites. My site is for two other students at a university, so they are getting pissed at me for not getting a view cart button up. Anyways, uh, sorry if I lost you with all my ramblings.
Thanks, JJ
View Replies !
View Related
Loading A Html Page Into A Flash Movie Clip
lets say that I have an account on a site that generate a page with some informations like this
http://www.thissite.com/index.php?us.................
Can I load this page in a flash movie clip
If I use a projector I am able to load this page in my projector
so I want to know if I can make this on my flash site
->to load this web page in in my main swf
?????????????????????????????
View Replies !
View Related
Page 2 - Loading A Movieclip That Always Stays Center Into My Flash Full Screen Page?
Tann, regarding the proportion resize, do you know if there is a way to make it so that when you drag the browser window, you are restricted to dragging it at its flash proportion. Just like if you are in photoshop, and if you decide to transform an image and I think press control or alt while you drag the corners, it will resize it proportionally.
Right now, if you drag the browser window, you can drag it any shape, and if the browser window height exceeds the flash height, it will allow you to do it, but the empty space is filled with the background colour of the html page.
Would like it, so that the window is not draggable anymore if its proport width or height has exceeded.
I hope that makes sense.
View Replies !
View Related
Sliding Page, Loading External .swfs By Button In Slidng Page
Hi
I have a sliding page navigation system and am trying to dynamically load external .swf's into that movieclip and am having major problems can anybody tell me how to load them.
I basically want it so that once the user clicks the button on the main screen a sliding page MC slides open (which I have done) and within that sliding page MC lies a button I want to load an external.swf after the button is clicked
on (release) {
_root.contents.loadMovie("myexternal.swf");
}
I've given the empty MC a instrance name of "contents" and have the external .swf in the same location)
I've also tried
on (release) {
contents.loadMovie("locations.swf");
}
I can get an external swf to load directly into the sliding page MC without the button but when I try and control it via the button it doesn't work. P.s. the actions abvove were applied directly to the button
hope somebody can help
thanks in advance
Dips
View Replies !
View Related
On FLV Completion...
Hey Gang,
So I'm here programming in AS3. I am still pretty new to it, but I friggin' love it. So easy and nice!
Of course though, I have hit a snag I cannot get by.
I have an FLVPlayback going on and it works fine. It is on a movieclip and it plays when said movieclip is clicked. My issue is that after the video plays, if I try to play it again, it loads up but then just pauses and won't play (I don't have the play/pause controls built just yet, but the video should just play, there is nothing that should pause it).
Basically I call a play method which does this...
_flv.play(_source);
_flv.seek(180);
I am seeking because that's close to the end of the video and I'm really just working on the video complete code at the moment... Anyways, I just want the video to play again if it's clicked.
When the video has completed I have tried using
_flv.stop();
Which just gives me the same issue...
and
_flv.closeVideoPlayer(_flv.activeVideoPlayerIndex) ;
which throws an error because I cannot delete the default video player...
Can anyone help me out here and tell me what I am doing wrong?
Thanks!
--d
View Replies !
View Related
OnRoll Completion
I have small images (mc's) together.
When the curser goes across the images, I want them to fade in and fade out.
The code I am using for that part is below:
var depth = 0;
for (var i = 0; i < 10; ++i) {
this["image" + i].onRollOver = function() {
this.play();
};
this["image" + i].onRollOut = function() {
this.onEnterFrame = rewind;
};
}
function rewind() {
if (this._currentframe > 1) {
this.prevFrame();
} else {
delete this.onEnterFrame;
}
}
This is my question, is there a way for the mc to keep on playing, then rewind if the curser is only over it for a split second?
Thanks!
View Replies !
View Related
GotoAndStop Following Flv Completion
I've searched here and Google and found a lot...that doesn't work. Or I'm doing it wrong which is a definite possibility.
I'm intermediate Flash but brand new to AS3. I've been able to cod buttons and such but...
I can successfully built a custom flv player that streams and plays an flv.
What I can't do is gotoAndStop once it completes.
Any help?
View Replies !
View Related
Test For .swf Completion
I am loading an external .swf file into a movie clip. When the .swf file has finished playing, I want something else to happen.
Is there any way I can test to see when the .swf file gets to the end of it's main timeline?
TIA,
Carolyn
View Replies !
View Related
Course Completion Not Registering In LMS
A vendor had built courses for us a few years ago. There are 5 modules. The courses are SCORM and are tracked in the LMS from Learn.com.
We recently had 60 students sign up for a course, but they are not getting completion tracking for 4 of the 5 modules. The students are using IE7 and Flash Player 9.
Completion works for the module where the completion code is send from an HTML page. The completion does not work from any of the pages where the completion is sent from Flash. The flash files were coded with AS2, here is the code on the "Finish Button":
finishBtn.onPress = function()
{
import flash.external.ExternalInterface;
ExternalInterface.call("modCompCall");
trace (score);
trace (maxScore);
_root.finalScore = int((_root.score/_root.maxScore) * 100);
trace (finalScore+"final");
getURL("javascript:var value = mm_adl_API.LMSSetValue('cmi.core.lesson_status', 'completed')");
var mycall:String;
mycall = "javascript:var value = mm_adl_API.LMSSetValue('cmi.core.score.raw', '";
mycall = mycall.concat(finalScore);
mycall = mycall.concat("');");
getURL(mycall);
trace(mycall);
trace(finalScore);
}
Does anyone know if this problem is caused by the getURL function?
We do not know when this problem appeared as no one has registered for this course for over 2 years.
This is the code from the HTML page that works...
<input type="button" name="mm_finishBtn" value="Finish Lesson" onClick="modCompCall()">
and the supporting .js function:
function modCompCall() {
if (mm_adl_API != null){
// set status
mm_adl_API.LMSSetValue("cmi.core.lesson_status", "completed");
}
Thanks in advance for any ideas.
Text
View Replies !
View Related
Advance To Next Soundfile On Completion Of Another?
hi, I made a script that plays mp3's and shows the title in some dynamic text. After one song is done, I want it to automatically progress to the next one and update the dynamic text with the new title. How would I do this? Thanks for any help.
Here's what I have so far.
soundToPlay = new Sound();
title1= "testing - track1";
song1="track1.mp3";
title2= "nextsong - track1";
song2="track2.mp3";
text2.text = title1; //dynamic text
soundToPlay.loadSound(song1, true);
View Replies !
View Related
AS Movement - Detecting Completion?
I have a movie clip on the main timelinewhich moves smoothly to different _x and _y coords according to which button gets pressed. The movement is AS controlled, rather than tweened. I need to detect when the clip has arrived at the specified coords in order to activate a loadMovie action.
The movement is specified by the following script:
onClipEvent (enterFrame) {
Xsquare = _root.plan._x;
Xdiff = Xpos-Xsquare;
Xmove = Xdiff/3;
_root.plan._x = Xsquare+Xmove;
Ysquare = _root.plan._y;
Ydiff = Ypos-Ysquare;
Ymove = Ydiff/3;
_root.plan._y = Ysquare+Ymove;
updateAfterEvent(enterFrame);
}
View Replies !
View Related
For Loop Completion Listener?
Is there an event listener for a completed "for each" loop? or should I increment a variable each time round and add an if statement at the end of the for loop set to trigger my onComplete function after so many iterations?
View Replies !
View Related
Ping Function Again After Completion
I'm running this function with a setInterval, but that's not working. Instead of pinging the function on a time base, I need it to start again after it has finished.
Code:
var items:Array = new Array("artExchange", "austinVentures","axcelis","broadCloud");
function switchimage(){
box.attachMovie(items[random(items.length)], "thang", 1);
box._alpha = 1;
box.Wait = 20;
box.onEnterFrame = function() {
if (box._alpha<100 && box.Wait>0) {
box._alpha += 5;
trace("Fade In "+box._alpha);
}
if (box._alpha>=100 && box.Wait>0) {
box.Wait--;
trace("Waiting "+box.Wait);
}
if (!box.Wait) {
box._alpha -= 5;
trace("Fade Out "+box._alpha);
}
if (!this.Wait && this._alpha<0) {
delete this.onEnterFrame;
trace("END");
}
}
};
timer = setInterval(switchimage, 0);
How can I make the function start again after it completes?
View Replies !
View Related
Firing An Function On Completion Of Another
Hello all!
quick and easy question, i'm sure:
i would like to fire a function upon the completion of another function, but i'm not sure how. what i want to do is add a TextField to a MovieClip after a tween has occurred on that MovieClip. would some sort of Event.COMPLETE listener be appropriate? can an event listener listen for the completion of a function? if so, how would i go about that? I'd post the code, but there's a bunch of extraneous stuff in there, so i don't want to distract from what I'm sure is a very simple question with a very simple answer. Any help would be greatly appreciated.
View Replies !
View Related
After Completion Of Current Function Run Next
Hi All,
I am attempting to run a particular function upon the completion of the another function. If anyone has any ideas it would be greatly appreciated!!
This is what I attempted but I believe this only works for movieclips.
==============================
slide_left();
slide_left.complete = function() {
slide_down();
};
--------------------------------------
or
--------------------------------------
slide_left();
if(slide_left = complete) {
slide_down();
};
==============================
neither seems to work, but its probably because these are intended for movieclips
developmental
View Replies !
View Related
Completion Of FLV - Video Object And FMS
I am creating a simple video player with the video object but I am using Flash Media Server.
I can not figure out how to determine the completion of the FLV. Can anyone help?
Here is my code:
Code:
var nc:NetConnection = new NetConnection();
nc.onStatus = function(info)
{
trace("#NC# " + info.code);
}
function init()
{
ns = new NetStream(nc);
vid.attachVideo(ns);
ns.OnStatus = function(info)
{
trace("#NS# " + info.code);
}
_root.loadCurrentCC("bunnel");
ns.play("Welcome");
}
play_btn.onPress = function () {
init();
play_btn.gotoAndPlay(2);
if (_root.pageFlipOn == true){
_root.pageFlipOn = false;
}else{
_root.pageFlipOn = true;
_root.loadCurrentCC("blank");
}trace(_root.pageFlipOn);
}
pause_btn.onPress = function () {
ns.pause();
}
var id:Number;
ff_btn.onPress = function():Void {
var dest1:Number = ns.time;
id = setInterval(function():Void {
ns.seek(dest1 += 2);
}, 100);
}
ff_btn.onRelease = function():Void {
clearInterval(id);
}
rw_btn.onPress = function():Void {
var dest:Number = ns.time;
id = setInterval(function():Void {
ns.seek(dest -= 2);
}, 100);
}
rw_btn.onRelease = function():Void {
clearInterval(id);
}
nc.connect("rtmp://wdmdfms-live.uwsp.edu/DESTREE_J/");
View Replies !
View Related
Shape Completion Test?
Hi,
This task has been driving me crazy for the past two weeks...
I'm trying to figure out how to program a shape completion test and whether an object is inside that shape. I'm making a game where the goal is to draw a line around a moving opponent, trapping it inside.
Any ideas on how this can be done? If I end up using an idea/concept suggested by you, I'll definitely credit in-game.
Thank you!
View Replies !
View Related
Completion Of FLV - Video Object And FMS
I am creating a simple video player with the video object but I am using Flash Media Server.
I can not figure out how to determine the completion of the FLV. Can anyone help?
Here is my code:
Code:
var nc:NetConnection = new NetConnection();
nc.onStatus = function(info)
{
trace("#NC# " + info.code);
}
function init()
{
ns = new NetStream(nc);
vid.attachVideo(ns);
ns.OnStatus = function(info)
{
trace("#NS# " + info.code);
}
_root.loadCurrentCC("bunnel");
ns.play("Welcome");
}
play_btn.onPress = function () {
init();
play_btn.gotoAndPlay(2);
if (_root.pageFlipOn == true){
_root.pageFlipOn = false;
}else{
_root.pageFlipOn = true;
_root.loadCurrentCC("blank");
}trace(_root.pageFlipOn);
}
pause_btn.onPress = function () {
ns.pause();
}
var id:Number;
ff_btn.onPress = function():Void {
var dest1:Number = ns.time;
id = setInterval(function():Void {
ns.seek(dest1 += 2);
}, 100);
}
ff_btn.onRelease = function():Void {
clearInterval(id);
}
rw_btn.onPress = function():Void {
var dest:Number = ns.time;
id = setInterval(function():Void {
ns.seek(dest -= 2);
}, 100);
}
rw_btn.onRelease = function():Void {
clearInterval(id);
}
nc.connect("rtmp://wdmdfms-live.uwsp.edu/DESTREE_J/");
View Replies !
View Related
Preloader After Project Completion
Hi
I have recently completed a free learning language program in flash, it works well and everything, but then being an amateur in flash, I forgot to make a preloader. Now, I know how to make a preloader, but how do I make space on the first frame on the timeline so that I can put the actionscript there? I tried selecting all the artwork, etc and moving them forward one frame, it doesn't work!! If I do that, the program doesn't work. Any suggestions will be highly appreciated.
Thanking All for their time.
View Replies !
View Related
Hide Video On Completion
Noob, trying to figure out how to hide a .flv and/or the movie clip it is contained in, after the video has played through completely . The .flv is loaded vis a vis Lee's tutorial on loading videos in AS 3.0.
I see in Flash Help that a NetStream object does have a "NetStream.Play.Complete" status event but it seems to want to attach that to an addEventListener via a 'client' object??? Do I ?access? the play.complete event info through NetStreamStatus? (Curious minds want to know!) (I kinda got the NetConnection and NetStream concepts, but working with NetStream in AS 3.0 has me confused.)
I just don't get it. Also, in the "NetStream.Play.Complete" statement, Play and Complete are capitalized in the help guide, but they only turn blue when play and complete are lower case. Again, confused. If someone could show me the code to hide the .flv and a brief explanation for how/why it works, I'd really appreciate it. Thanks, Eric.
View Replies !
View Related
Cursor Disappears In .aspx Page When Using Flash Movie On Same Page
Dear friends,
I am facing this problem when I am using .swf file on my sites login page, there is 2 text box of User Name and password and submit button it is all are web controls, i want cursor at user name control when user comes to login page but it is not showing there but when I remove the .swf file from the login page then default cursor comes there, please help me.
View Replies !
View Related
Code Completion For Elements In Array
Does anyone know how to activate code completion for elements in an Array. For example
var user:Object = new Object();
var myArray:Array = new Array();
myArray[0] = user;
myArray[0]. // no code completion here
It appears Flash has no idea what data type is in myArray[0], so code completion don't work.
View Replies !
View Related
Running A Function Upon Song Completion
I'm working on a project that plays random song tracks. Right now it just randomly plays a track and then stops. Is there any way for Flash to start the next song after one song completes.
Here is the script I have so far. BTW, a couple people on this forum helped me with this. They were a HUGE help with helping me understand how this works.
Code:
var songs:Array = new Array("music/track0.mp3", "music/track1.mp3", "music/track2.mp3", "music/track3.mp3", "music/track4.mp3", "music/track5.mp3", "music/track6.mp3", "music/track7.mp3", "music/track8.mp3", "music/track9.mp3", "music/track10.mp3", "music/track11.mp3");
var songPlayed:Array = new Array();
function randomSong() {
var randomNumber = random(songs.length);
var notinList = true;
for (i=0; i<songPlayed.length; i++) {
if (songPlayed[i] == randomNumber) {
notinList = false;
}
}
if (notinList) {
songPlayed.push(randomNumber);
playSong(randomNumber);
} else if (songPlayed.length == songs.length) {
songPlayed = new Array();
randomSong();
} else {
randomSong();
}
}
function playSong(randomNumber) {
track = new Sound();
track.loadSound(songs[randomNumber], true);
track.onSoundComplete = function() {
randomSong();
if (_root.soundOff_mc._currentframe=2) {
track.setVolume(0);
}
};
}
randomSong();
View Replies !
View Related
_visible = False Upon Tween Completion?
I have a movie clip on my stage with an On and Off button. Its on (visible) by default, and I'm using this code for my Off button which causes the movie clip to fade away:
Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
function pilotOff() {
var pilotOffAlphaTween:Tween = new Tween(_root.pilotmc, "_alpha", Regular.easeOut, 100, 0, 15, false);
}
I call the function when the button is pressed and it works fine.
My On button code is similar, only it fades in instead off:
Code:
function pilotOn() {
var pilotOnAlphaTween:Tween = new Tween(_root.pilotmc, "_alpha", Regular.easeOut, 0, 100, 15, false);
_root.pilotmc._visible = true;
}
Now notice my "_root.pilotmc._visible = true;" in the On function. I have that there because what I WANT to do is have the _visible property set to False when the Off button is pressed. However, I don't know how to do that because it would need to wait for the alpha of the Off animation to be 0 before setting it's visiblity to false, or else you'd never see the fade out animation.
Ideas?
View Replies !
View Related
On Completion Of Drawing A Loaded Image
im adding a loader as a child to a movieclip using the addchild function. the loader has preiousley loaded an image via the url. the movie clip has another child movieclip within it which contains a loading graphic. i want to delete or otherwise make invsible this graphic once the image has finished drawing.
how can i do this?
thanks
View Replies !
View Related
Check Tween Transition Completion
I was wondering. Is there some method of checking if a tween transition is complete?
Say I have this:
ActionScript Code:
new mx.transitions.Tween(my_mc, "_x",mx.transitions.easing.Regular.easeIn,my_mc._x,my_mc._x+100,2,true);
I usually check in some onEnterFrame handler if the transition has come to an end(by checking the start _x with the end _x). Then I call some function that is supposed to be launched when my transition is over.
Is there a fancier way of doing this?
Thanks guys
View Replies !
View Related
Stop All Aounds Upon Completion Of All Functions
Hi,
I am building something in Flash CS3 where each rollover of a movie clip launches a sound. I would like to stop all sounds once every clip has been rolled over, but I don't want to just use a stop all sounds actionscript that I assigned to a random button, assuming it would be the last rolled over.
Is there any actionscrip to stop all sounds once all functions I've written have been (collectively) completed?
Thanks for your help!
Edited: 10/07/2007 at 08:31:33 AM by GollyAlexandra
View Replies !
View Related
Check Loaded SWF Playback Completion
So, I'm not sure the best way to do this in AS3 and need guidance. I am loading an SWF into a holder clip, and it's a linear animation. When it's donw playing, I want to do something else. My research seems to indicate the best way is to count frames and compare with total frames. But my code is giving me 0 for currentFrame. What am I doing wrong?
Attach Code
// loader object
var the_loader:Loader = new Loader();
var current_animation = null;
// load the first clip
function load_animation():void {
the_loader.contentLoaderInfo.addEventListener( Event.COMPLETE, animation_loaded );
the_loader.load( new URLRequest( base_url + '/' + clips[current_clip].c_url ) );
}
function animation_loaded( evt:Event ):void {
// add the clip
current_animation = the_loader;
holder_clip.addChild( current_animation );
}
load_animation();
// timer object (for counting frames played)
var myTimer:Timer = new Timer(50);
myTimer.addEventListener(TimerEvent.TIMER, watch_animations);
myTimer.start();
// ALWAYS SHOWING ZERO FOR currentFrame
function watch_animations( event:TimerEvent ):void {
trace( 'current frame: ' + the_holder.currentFrame );
}
View Replies !
View Related
|