Scripting Download Progress for Multiple Movie Clips?
I'd like to insert script in the example below that would indicate the download progress of two successive movie clips on a page. Any suggestions would be much appreciated. Thank you.
import fl.video.FLVPlayback;
import fl.video.*;
explainer.source="movie1.flv"
explainer.addEventListener(VideoEvent.COMPLETE, f);
explainer.autoPlay= true;
explainer.volume=1.00;
function f(e:Event){
var myVideo:FLVPlayback = new FLVPlayback();
myVideo.source = "movie2.flv";
myVideo.addEventListener(VideoEvent.COMPLETE, myHomePage);
myVideo.autoPlay=true;
myVideo.volume=1.00;
myVideo.skin="SkinUnderPlaySeekStop.swf";
myVideo.skinAutoHide=true;
myVideo.skinBackgroundColor=0x000000;
myVideo.skinBackgroundAlpha=0.1;
myVideo.height=405;
myVideo.width=720;
myVideo.x=141.2;
myVideo.y=115.4;
stage.addChild(myVideo);
var urlRequest=new URLRequest("ATRMAIN.html");
function myHomePage(eventObject:VideoEvent):void
{ navigateToURL(urlRequest, '_self');}
the flvplayback component has bytesLoaded and bytesTotal properties.
Similar Messages
-
HitTest for multiple Movie Clip at the same time
I have a movie it is a triangle.I duplicate it and I want to hitTest on the first triangle movie clip and I added 3 different line movie clips on the 3 side of triangle.I tried to write a code something like that.
if(firstTriangle_mc.hitTestObject(line1_mc,line2_mc,line_3mc){
trace("Ok");
but I've got error.I think it is not allowed hitTestObject for multiple Movie Clips.So is there anyone have an opinion about it?What should I do?Here is another test for multiple movie clips for hitTestPoint but only the first work the others don't
uc_mc.addEventListener(Event.ENTER_FRAME,hitle);
function hitle(e:Event) {
if (uc_mc.hitTestPoint(cub1,cub1Y,true)&&(cub2,cub2Y,true)&&(cub3,cub3Y,true)) {
uc_mc.alpha=0.5;
}else{
uc_mc.alpha=1;
The code above doesn't work.What should I do? -
Multiple Preloaders for Multiple Movie Clips
Designed in Flash 8, the site's timeline is all in Scene 1
and is comprised of an introduction, which contains a short video,
and 6 movie clip categories that the user selects to view. Since I
want the intro to play as soon as possible, I'd like to limit the
first preloader to just the video in the intro and not
_root.getBytesTotal. Then, as the viewer watches this short video,
the rest of Scene 1 movie clips will keep on loading. After the
intro, the viewer will choose which of the 6 categories to view.
These categories are identified with buttons which play the
particular movie clip. Since I don't know the order of the
categories they will select, I thought there should be a separate
preloader for each category. Hopefully, after they view a category,
the rest of the categories will have loaded and the loading time
will be nil. The design for the preloader is comprised of a status
bar and a percent loaded. Is there a way to limit the
_root.GetBytesTotal to specific frames? I know I could break these
categories up into separate SWF files but then I loose the
advantage of one loading while another is being viewed.MovieClipLoader is a built in class of functions that will
allows you to easily load Media (swfs/jpgs) from external sources.
This will create a MCL object
var mcl:MovieClipLoader = new MovieClipLoader
We want the MCL object to receive events for any movie that
is loaded into the main timeline
mcl.addListener(this);
Ok. now we have a movie clip loader that is able to recieve
events. Since we want to show the progressive download and want to
do something with that content after it loads, we need to declare
two event handlers onLoadProgress and onLoadInit. onLoadProgress is
pretty straight forward. onLoadInit executes it's action as soon
all of the AS on frame 1 of its time has finished loading. In this
case, we want two different things to happen. 1st, load the first
clip and show it.... 2nd, load all remaining clips into the buffer.
But first, lets declare those next...
function onLoadProgress( target:MovieClip,
bytesLoaded:Number, bytesTotal:Number):Void {
// standard preloader code goes here
function onLoadInit( target:MovieClip ):Void {
// display the clip - this will be as easy as just calling
our loadClip function for the mcl...more on that in a minute
// If you want something special to happen, i.e. movie fades
in or a mask is applied to it, you'd do that here.
Now all we need to do is call the loadClip member function
for the MovieClipLoader. Just replace the two parameters with the
location of the swf and then the name of the instance you want it
to load into
mcl.loadClip( "myswf.swf", targetMovieClip );
The other movie clips are now a breeze as well. For each
button, just add an on(release) or onRelease = function (depending
on your situation) to just call that mcl.loadClip() line from up
above. Just change the movie you want loaded.
Let me know if you need more help... -
Single droptarget for multiple movie clips
I have a movie clip which i use as a drop target. And I have four additional movie clips which can be dragged and dropped into the droptarget movie clip. But when I place a movie clip into a droptarget and I drop the second one too, the droptarget for the second one becomes the first movie clip but not the actual droptarget movie clip.
Please suggest.Thank you for the reply. Can you give me an idea what the below code does?
mainContainer is a movie clip. mc1, mc2 are three movie clips
mainContainer.addChild( mc1 );
and while dropping mc2
mc2._droptarget - what this will refer to? -
Multiple movie clips in variable
Is it possible to have multiple movie clips inside one variable? I want to be able to just use var._totalframes instead of mc1._totalframes, mc2._totalframes, etc... Or is there another way I can avoid copying and pasting dozens of movie clips over and over? Thanks.
You can use the bracket notation in a loop to process multiple similarly named objects such as you described...
for(i=1; i<someNum; i++){
something += this["mc"+ i]._totalframes // not clear on your intent
I can't be sure I am answerng your question when you mention copying and pasting movieclips. -
Multiple movie clips within a button
I'm having trouble with working a movie clip played one after another within a button. Can anybody help? or is there a simpler way of getting multiple movie clips to play?
for my project, when you hover over the button and vines grow out. currently, i have one working in a button but i can't seem to get other vines to work.use a movieclip (or sprite) button. you can then control the child movieclips with actionscript.
-
Targeting Multiple Movie Clips
Hi everyone,
I'm fairly new to ActionScript so I would really appreciate
any help I can receive.
Right, I have a Flash file which contains a movie clip with
an instance called, 'contentHold_mc'. Inside this movie clip are 4
individual movie clips with instances entitled, 'content1_mc',
'content2_mc', 'content3_mc' and 'content4_mc'. I know these are
not the best names for instances, but this is just for simplicty's
sake. At present all movie clips run at the same time. I want them
to run sequentially. On the last frame of the instance,
'content1_mc', I want to stop the instance from playing and start
playing the instance, 'content2_mc'. On the final frame on
'content3_mc', I want to stop the instance from playing and start
playing the instance, 'content3_mc', and so on until 'content4_mc'
finishes playing. I have tried to use the tellTarget function
without success and anyway, I believe this is now deprecated.
Would anybody be able to provide me some guidance please as
to how I can achieve the previous using the 'dot' notation?
I have tried the using the code found at the bottom of this
message in the final frame of the movie clip instance that I want
to play first ('content1_mc'), however get a compiler error because
of the preceding two full stops '..'
Thank you in advance for any help I may receive with this
query.Put a stop(); command at the first frame of each of the
clips. On the last frame of the first clip put:
stop();
_parent.contentHold_mc.content2_mc.play();
repeat as needed for each movie clip.
Tell the first clip to play. -
Dynamic Instance for a MOVIE CLIP
Hi Please help me!!!!!!!!!!
I am creating dynamic Movie Clip using as3, but I don't have
any idea about dynamic Instance name, please give me some idea that
how I can assign Instance name for a movie clip.
I am waiting your reply.
Thanks
Sushil KumarYou can assign a value to the name property of the MovieClip,
but refering to the variable name of your MovieClip instance is
preferable. This code illustrates the difference: -
Play multiple movie clips - with sound
Hello Forum members,
I am a total new comer in terms of flash and action script,
self-educated and Adobe forum and internet educated. I can now
click a button and stop and start a movie clip, use attachMovie,
and even mute sound in a movie clip (not video). I am currently
using Flash 8, and waiting for CS3 (downloaded a trial, and like it
better than Flash 8).
Enough history - now to my question - I have an application
that had 3 scenes. I read in some Adobe article
"Flash Best Practices" that it was not a good idea to use
scenes in an application. I converted my Scene 2 and Scene 3 into
movie clips.
I figured I could either put each movie clip on a separate
layer in my timeline (mc_scene2, mc_scene3)
and play them, one after the other (did not quite work, more
later). Or...
copy the timelines from the scenes, and add those frames to
my Scene 1, making a application with both scenes staggered one
after the other in the main timeline. Or...
Keep Scene 1 and at the end of scene 1,
attacheMovie("mc_scene2", etc) and when scene 2 was done play and
or attach the final movie clip (mc_scene3).
I could not figure out how to tell when mc_scene2 was done
using the attacheMovie method, so I could then attach mc_scene3,
etc.
How would I be able to tell when one attached or loaded movie
clip is finished, and then start the next one?
Or what is the suggested way to use actionscript to load a
movie, play it, and when the clip is done, load and play the next,
etc.
Thanks for a good forum,
eholz1Hello Again - I guess there is much that I do not understand.
I followed the tip above - or so I thought.
I have "buttons" on my movie clips that play the clip when
clicked.
I have placed stop actions in frame 1 of each movie clip.
I tried placing mc_scene2 and mc_scene3 on their own layer
in the timeline,
and put the code above in my actions layer (Scene 1).
it seems that nothing really works - the _visible property
seems not to work,
etc - I must be doing something wrong. What layer should the
two mc's be
placed?
Thanks for the info
Eholz1 -
How to use common event handler for selected movie clips?
I have a 50-state map in a flash movie. Each state is a movie
clip.
Goal: when mouse moves over a state or is clicked in a state,
the state will be highlighted in a bright color and a small box
will pop up near the state and display some information about the
state.
Question: I know I can add mouse event handler for each state
movie clip. But this is simply not good since this has to be done
50 times and codes thus scattered different places. Ideally, I only
want to have one script that determines where the mouse position is
when events trigged and then do right things (highlight the state
and display info. in a pop-up). How can this be implemented?
Thanks!There are a number of ways. Which way is best depends on how
you have things set up so far.
E.g. If they have an enumerable naming convention:
e.g. each clip is like state_0 , state_1 etc.
Then you can loop through them and assign them all to the
same mouse event handler via the loop. You would need properties
other than the name of the clip to identify the state. E.g. each
clip could contain its own data or the index could be a pointer to
the state data (objects with state name and info properties) in a
separate array.
//state clips named
for (var i=0;i<50;i++) {
this["state_"+i].stateindex=i;
this["state_"+i].onPress= statePressHandler;
var stateData:Array = [{name:"StateName,info:"this state
Info"}, name:"StateName,info:"this state Info"}, etc...]
function statePressHandler() {
trace(this);
trace(stateData[this.stateindex].name+"="+stateData[this.stateindex].info);
Other ways are possible too but the best approach depends on
how you have named the clips and whether you're creating them with
code or whether they're already on stage from authoring (my guess).
If they're already on stage and they're called "Alaska" etc, then I
would be inclined to put them all inside a container clip that
contains nothing else other than states. It would avoid the need
for an array of clip names or for checking some other specific
property of each clip to determine if its a 'state' clip and not
something else in a for..in loop. -
Pause Playback for Nested Movie Clips
Anybody know a script solution for how to target pause of a
myriad of different movie clips from a button script on the root
timeline?
I'm using this script which works fine for pausing the root
timeline, but if I've passed off control to a movie clip, you would
have to press this button again to make the movie clip stop.
Here is the button script:
on (release) {
if (global_sound.getVolume() == 100) {
global_sound.setVolume(0);
stop();
Help appreciated. Thanks!kglad,
I mean I've issued a stop(); in the root timeline and now the
movie clip is going to play until it is done. Once it is finished,
I issue a resume back to the root timeline with a _root statement
and the playback continues in the root timeline. Essentially the
movie clips need to complete their playback and then they can
return back to allowing the root timeline to continue. -
wow, this is taking forever to communicate with anyone, I just want my $4.99 back from the movie rental I paid for. I paid for a rental, we were watching it, had to pause it, accidentally hit 'menu' on the apple remote, tried to get back into the movie, wouldn't let us, apple said ' go to settings, click downloads, select the rented movie from there',( not really a quote, but, close enough). So, we went to 'Settings' on main menu, but, there is no 'downloads' icon....I guess it is true: Do Not Rent from Apple TV'.
FionaWelcome to the Apple Community.
You are looking at outdated instructions, you can find the "check the downloads" option under settings > iTunes Store. You may also wish to look on the movies > rentals. -
Where is the date for my movie clips?
In the previous version of iMovie when you clicked on a movie clip you could see the date near the preview window. Now in iMovie 6 you have to double click on the clip to get the date info. Anybody else notice this. I thought it was useful to have the date there for putting clips in time order...
Mac OS X (10.3.9)Notice that the displayed time is the value of the very first frame of the underlying media clip. I.e. if you split the clip at the playhead, ALL the splitted clips still point to the same time.
iMovie 2.1.2 did this right by always showing the correct time even with splitted media clips! -
Multiple Movie clips and rollovers
Hi, I need some help. I am putting together a flash file with
3 movieclips. I have three movie clips I made - one for each of the
3 big circles. When they roll over the other circles are supposed
to disappear under the circle that they have their mouse on. I
placed all 3 movie clips on the first scene, but when they roll
over one of the circles the other circle movie clips stay there
while the other one runs on the mouse over. I need the other ones
to disappear. You can view what I have so far:
http://www.feeco.com/Portals/0/encap.swf.
If you need to see my fla file I can email it to you. Thanks!
Stephanieuse:
stop();
yourplaybutton.addEventListener(MouseEvent.CLICK,playF); // replace yourplaybutton with the name of your play button.
function playF(e:MouseEvent):void{
play();
/* Click to Go to Frame and Play
Clicking on the specified symbol instance moves the playhead to the specified frame in the timeline and continues playback from that frame.
Can be used on the main timeline or on movie clip timelines.
Instructions:
1. Replace the number 5 in the code below with the frame number you would like the playhead to move to when the symbol instance is clicked.
button_19.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_15);
function fl_ClickToGoToAndPlayFromFrame_15(event:MouseEvent):void
gotoAndPlay(2);
/* Click to Go to Next Frame and Stop
Clicking on the specified symbol instance moves the playhead to the next frame and stops the movie.
button_20.addEventListener(MouseEvent.CLICK, fl_ClickToGoToNextFrame_6);
function fl_ClickToGoToNextFrame_6(event:MouseEvent):void
nextFrame();
I also have added a keyframe to the end of my actions to stop(); this does not appear here with this code but on a separte screen but under the same actions folder the stop works just as I want to the last movie clip stops at the end
Just can not figure out how to get the play to not start over from begining but to continue. -
Playing multiple movie clips one after other on main timeline
Excuse the probably simple question but I'm just starting off with Flash.
I have imported a few video trailers directly into flash and saved them as movie clips.
I want to be able to insert these movie clips onto the main timeline and play them one after the other, repeating once they have all played.
On the main timeline I have set a layer for each clip and a keyframe where the clip is inserted for each layer.
When I go to play the flash file, it is showing the first frame from each movie file and then moving to the first frame of the next movie file.
What do I need to do to make flash play the entire movie file in that specific frame before moving to the next frame where the next movie file is and playing all that movie?
Sorry for what is probably a simple thing to ask.
thanksCreate an actions layer on the main timeline and place stop(); commands on that layer in each frame where a movieclip resides.
Within in each movieclip, at the end (last frame) you want to tell the main timeline to play(); so that it moves to the next frame (where it will stop because of the stop() commands you add).
So at the end of each movieclip you will put either:
for AS2: _parent.nextFrame();
for AS3: MovieClip(parent).nextFrame();
For the last movieclip in the lineup you will replace nextFrame() with gotoAndStop(1);
Maybe you are looking for
-
Select from .. as of - using archived redo logs - 10g
Hi, I was under the impression I could issue a "Select from .. as of" statement back in time if I have the archived redo logs. I've been searching for a while and cant find an answer. My undo_management=AUTO, database is 10.2.0.1, the retention is th
-
Passing Javascript Enabled or Disabled value in a custom tag
Hi, In my JSP I am using a custom tag. This custom tag is having one attribute called status(whose value will be jsenabled means true or jsdisabled means false) depending on the browser's javascript enabled or disabled How can i find the value of jav
-
WebLogic 7.0.1 and apache ssl plug-in
I am not seeing any forwarding of SSL requests from Apache to WebLogic once I upgraded from 7.0.0.1 to 7.0.1 and used the new plug-in. I actually found the plug-in size for solaris to be smaller then the 7.0.0.1 which I found to be a little strange.
-
Inter-org / subinventory transfer api
Hello, I am looking for a real-time api that will conduct an inter-org or subinventory transfer. I know there is an option of using the open interface table/concurrent manager but I am looking for a real-time api. I thought process_move_order api wou
-
Ez a gondom: "Hiba történt a következőhöz való csatlakozáskor: www.facebook.com. Nem lehet biztonságosan kommunikálni a partnerrel: nincs közös titkosító algoritmus. (Hibakód: ssl_error_no_cypher_overlap) A megtekinteni kívánt oldal nem jeleníthető m