Controlling frame rates of loaded movie clips
Is it possible to control the playback rate of movie clips
that are loaded with a Loader() call?
…that which we call a rose by any other name would
smell as sweet.
With AS3 it seems that we shouldn't get as hung up on names
as we have been in the past. From my brief experiments, I don't
think it is that the loader is dynamically creating a movie, but
that the timeline of the external clip is an instance of MovieClip.
And it is "time-line" placed by definition. When I trace the
this.name from my external movie it traces "root1" by itself, but
when loaded into something else it gets that "instance" name.
You can name your loader and just access its content property
(cast as a MovieClip).
Similar Messages
-
Controll the ROOT timeline from externally loaded movie clip?
does anyone know how to controll the root timeline from an
externally loaded movie clip?
I have loaded a movie clip, which has buttons on it that I
would like to controll the main original website timeline with.
something like this.parent.parent?
thanks a lot
harkyfeedmeapples <[email protected]> wrote:
> does anyone know how to controll the root timeline from
an externally
> loaded movie clip?
>
> I have loaded a movie clip, which has buttons on it that
I would like
> to controll the main original website timeline with.
>
> something like this.parent.parent?
_root.doStuff;
Freundliche Grüße,
Franz Marksteiner -
Whenever I load a movie clip into the target and test my
movie, the loaded movie clip always loads in the bottom right. I
think this is a registration error but I am not sure how to fix it.
My target is 835px by 635px, same as the movie clip I want to load.
Any help would be much appreciated.Position the blank movie clip in the top left corner where
you want to have
the external movie clip loaded.
Note that if the external movie clip has dynamic content
creation via AS or
different content size on higher numbered frames you may find
it will show
content to the left and top of the blank movie clip because
initial size is
not detectable. In particular if you are loading Flash movie
that you
created that you used a third party tool such as xCelsius. In
this case you
need to MovieClipLoader and once the onLoadInit event fires,
manually
position the blank movie clip which is passed as an argument
for coding
convenience.
Lon Hosford
www.lonhosford.com
May many happy bits flow your way!
"northstar_86" <[email protected]> wrote in
message
news:e27cer$5i2$[email protected]..
Whenever I load a movie clip into the target and test my
movie, the loaded
movie clip always loads in the bottom right. I think this is
a registration
error but I am not sure how to fix it. My target is 835px by
635px, same as
the
movie clip I want to load. Any help would be much
appreciated. -
Different frame rates in one movie
Hi there... have a flash movie at 18 frames p/s, have had to
embed video which is at 25 frames p/s (obviously this means that
the video itself is slower than the sound). Is there any way i can
use action script to control the frame rate of a movie - have it at
18 fps for a certain amount of frames, then up to 25 fps for the
next couple of frames, and then back down to 18fps??
Any help would b greatly appreciated.Import with progressive steaming and it will not matter, and
you shouldn't embed FLV files unless it is absolutely necessary.
You can't change the frame rate with actionscript. -
Is this how i control frame rate with IMAQdr property node?
Is this how i control frame rate with IMAQdr property node? if not, can someone point me in the right direction? for some reason, it doesnt work..
Attachments:
pic.JPG 75 KBPlease see this related thread http://forums.ni.com/t5/LabVIEW/IMAQdr-Property-Node/m-p/1642950/highlight/false#M590168
Matt
Product Owner - NI Community
National Instruments -
Having a loaded movie clip talk to another movie clip
Here's what I want to do:
Load a clip into my main movie - "loadedMovie"
at the end of the timeline in "loadedMovie" i want a
function, perhaps setColor, which will change the colour of another
movie clip which sits in the main movie.
Does this make sense? for a loaded movie clip to change the
color of an instance of another movie?
Many thanks,
Rayponch wrote:
> Here's what I want to do:
>
> Load a clip into my main movie - "loadedMovie"
>
> at the end of the timeline in "loadedMovie" i want a
function, perhaps
> setColor, which will change the colour of another movie
clip which sits in the
> main movie.
>
> Does this make sense? for a loaded movie clip to change
the color of an
> instance of another movie?
Sure make sense.
If the clip you like to target is on main timeline of the
movie than
you will use something like :
on (release) {
var my_color:Color = new Color(_root.SomeMC);
my_color.setRGB(0xFF00FF);
You can also refer to it by level:
(_level123.SomeMC);
Best Regards
Urami
!!!!!!! Merry Christmas !!!!!!!
Happy New Year
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami> -
Controlling a loaded movie clip
I'm trying to load a clip (flash with video) and then as soon
as the movie is loaded I want the movie to stop... right now the
movie plays immediatelly... I tried putting _root.stop(); but that
didn't work...
This is my code:
this.createEmptyMovieClip("clip_mc",
this.getNextHighestDepth());
var clip_mcl:MovieClipLoader = new MovieClipLoader();
clip_mcl.loadClip("knockoutbag13.swf", clip_mc);
This is what I tried:
clip_mc.onLoad = function()
clip_mc.stop();
and this:
clip_mc.stop();
None worked...
Please helpOk try this.
You should be able to control the clip now after this code. -
Controlling main timeline from loaded movie
I have loaded an external movie onto the main movie in a
movie clip called "mainholder" - In the main timeline on the main
movie there is a "stop" command on frame 1. From the loaded movie,
I want to control the main timeline and tell it to go to frame 2.
Can someone tell me the actionscripting to do this, I have tried
several commands and getting frustrated. ;-)
Thanksmovies are loaded into levels. The main movie is always
considered level0 a.k.a _root in the AS. When you load a movie into
another, the main movie is also considered the parent of that
loaded movie a.k.a. this._parent in AS where this refers to the
loaded movie. If you want something in the loaded movie to control
the main timeline you could call it like this...
_root.gotoAndStop(2); or _root.gotoAndPlay(2); depending on
what you want.
but because of the parent/child relationship, it can also be
done like this....
this._parent.gotoAndStop(2); or this._parent.gotoAndPlay(2)
Although the first method is less to remember, the second
method proves the most friendly and re-usable. Let me explain...
Say that you did something like this....
[MAIN MOVIE]
[LOADED MOVIE]
{Loaded Movie with buttons to control LOADED MOVIE}
Your main movie loads a movie and when this loaded movie
reaches it's 10th frame, it loads another movie where the buttons
reside for controlling that clip. If you used _root in the button
movie, it would cause the main movie (_root) to be called and not
the LOADED MOVIE as you had intended during its design prior to
trying to make this new main movie (and it would work as intended
if you opened the LOADED MOVIE's fla file and exported). If you use
this._parent in the button movie, it will always make it's calls to
the LOADED MOVIE's timeline and not the main clips timeline.
Sorry if this confuses you but it's important to
understand. -
Problem with non loading movie clips in CS3
Hi.
I am making an animation ( Trailer for an upcoming handheld
game i am working on ).
And i have encountered a problem when i play back the
animation with Flash player.
There is two movie clips in the animation ( Normal vector
drawing but with effects applied on it ( color adjustment , and
blur ) ) and when i play the published swf back with flash player
the two movie clips are in their normal Vector mode ( without the
filters ) until the middle of the animation when they finally
"load" , the filters finally have an effect on the two vector
drawings.
i use a very high end computer so that couldn't be it.
And when i am going to upload the flash film there's going to
be a loading screen ... i have no clue if it's going to fix this.
But for now this is really odd and looks really awkward.
If this problem persist i will not make the deadline. please
help fast.
Thanks everybody.
-Jimmy Gonzo
EDIT: oh and i also noticed that when the stuff isn't loaded
yet... the animation goes too fast.It seems to me that you need to put a preloader in the first
frame of your whole .fla. It seems that all your assets are not
being loaded before the .swf playhead moves forward.
A simple preloader could be something like:
frame 1 label this as "preloader"
frame 2 (insert the following commands)
if (this._framesloaded >= this._totalframes) {
this.gotoAndPlay("init");
}else{
this.gotoAndPlay("preloader");
} -
Can't get Simple button to Load Movie Clip
Hi I've looked around for the answer to my question on this
forum
but havent found it so here it goes. I am working on this
company's
Flash site that was built by an outside studio. I am using
CS3.
The url to the site is
http://www.bubbakeg.com.
(this link will take you to the main page click the shadow
graphic
on the left under Bubba and this will take you to the site I
am speaking
of. The site is basically 5 different pages or movie clip.
What I am
trying to do is basically change the "Spring Break" middle
graphic
(which is a Movie Clip) on the HOME page and add a simple
button
that will direct the user to a new page. When I replaced the
graphic
with a new Movie clip there was no problem but I have added
a
button to load a new page (movie clip) and nothing happens.
This
button is in the movie clip of the new graphic which is
called up
when the page loads. If i take this button and just put it
on the
Main Stage in Scene 1 by itself it works and loads the page
(movie clip). It does not however when it is embeded in the
Movie
Clip. The Flash site is basically 5 different Movie Clips
loaded into
an "Empty Clip". This empty clip has a timeline with each of
the
clips labeled and with their respective sized placeholders.
And
when you click on either the links on the Nav bar or the
graphic
for each page it loads that movie clip on the main page. It
seems
like the button only wants to work on the main timeline. I
have
even replaced the code for the "Contact" button with the code
for the new button and it worked (opening new page). Here is
the
code for the new button that does not work:
on (release) {
_root.contentHolder.myHeight = 307;
_root.contentHolder.newLoc = 9;
heightAnimation();
I know the location and height from the above code are
referring to the placement and sizing of each movie clip
in the "Empty Clip". As i said before this heightAnimation
and the resizing of the new clip works fine when the
button resides in Scene 1 on the Main Timeline but not
within the new movie clip (graphic Ive created.)
I will upload the main chunk of the code that resides
in Scene 1 on the first frame of the "Actions" layer.
If anyone has any ideas I would appreciate it very much!
Please let me know if I can provide anymore info.
Thanks!
Gregchange:
function newLayerBT_CLICK(MouseEvent):void{
to:
function newLayerBT_CLICK(e:MouseEvent):void{ -
Going Back to the main frame, from inside a movie clip time line.
In flash CS5 I want to go back to the main time line, from inside a movie clip button, so when i click the the movie clip it goes to another frame on the main time line..
Can anyone help me?
Thanks
Daniel Derrickyour can use _root to reference the main timeline from anywhere though that can lead to problems if your swf is loaded by another swf. because of that eventuality, it would be better to use a relative path back to the main timeline.
so, from a movieclip's timeline (when the movieclip is on the main timeline), you can use _parent to reference the main timeline.
but even better would be to use no code on that movieclip's timeline and keep all your code on one timeline (the main one). -
Preserve frame rate when loading one swf into another
Is there a way to preserve the frame rate of a swf when
loading it into another swf that plays at a higher frame rate. I'm
loading some flash ads that mostly run at around 12-15 frames a
second into a portfolio site that runs at around 40 frames per
second. All my ads play too fast. The link is:
www.dg8tal.com/portfolioidea.html
Thanks!As far as I understand it, there is no option to override the
frame rate designated by the main movie you are loading into. The
SWF file you are loading always inherits the framerate of the SWF
you are loading it into. Here are some suggested work-arounds that
might help:
1) Lower the frame rate of the main movie on the website that
you are loading into.
2) Expand the timelines of the advertisements just for use in
your portfolio
3) Put your menu and thumbnails in one HTML frame that can
then load each item in another HTML frame above it. Since each SWF
would load on its own, the framerate of your main swf would not
matter. You would lose your nice resizing effect though unless you
did some more complicated integration with javascript I imagine.
I would recommend going with option 2, since that will take
the smallest amount of work while preserving your overall design.
However, with the faster framerate, your advertisements would have
difference performance characteristics that you'll need to assess.
I'm trying to think of more options, but these seem to be the
first things that come to mind. -
Loading Movie Clip from a button
Hi,
How do I load a movie clip from a button? So far on my button
(b1), I have this AS: and I want the button to load the movie clip
"char1." My button already has some AS:
b2.onRollOver = function() {
_root.captionFN(true, "Hi!", this);
this.onRollOut = function() {
captionFN(false);
How would I go about adding more script to load a movie clip
to my button b2?
ThanksHey - Unfortunately I'm going to be in meetings for most of
the day, so
it'll take me a while before I can go through this in any
detail. One thing
that struck me though is that your two functions (captionFN
and
hoverCaption) are in the main1_mc not on the main timeline.
Then the
buttons are calling _root.captionFN(); which refers to the
main timeline.
I would expect that they should be calling
_root.main1_mc.captionFN(),
because that is the path to where the function is. Does that
make any
sense?
One thing that I do when I'm writing code is to always keep
all functions on
the main timeline. That way you are sure that they are being
registered
(i.e. if you call a function before the playhead reaches
where that function
is written, the function won't work. If the function is in
the first frame
of the main timeline, you know that the playhead has reached
it). What you
might want to do is to move all your functions to the very
first frame of
your movie. Then you can call them with the path:
_root.myFunction() and
you are sure that they will be found.
Maybe give that a try and let me know if it helps. In the
meantime, I'll
try to go through your code, but like I said, today's a bit
of a gong show
for me.
Sorry - I don't mean to just sluff you off or anything.
Cheers,
Brock
"respondplease" <[email protected]> wrote in
message
news:[email protected]...
> Hi Brock,
>
> Thanks again, your sample file really helps but I'm
still having problems.
> What it boils down to is that my buttons don't fully
function properly. It
> works correctly sometimes, but not consistently enough.
So if I fast
> forward
> too much or rewind and then FF, the buttons aren't
either isn't clickable
> or
> the hover text and caption box doesn't show up, etc.
This usually happens
> when
> I press FF too many times or too fast. But regardless of
how many times I
> press
> FF I would like my buttons to work
>
> Your sample file is very useful but unlike mine I have
perhaps too many
> MC's
> w/in MC's, etc. I will try to clarify my setup in hopes
of finding a
> (better)
> solution to my problems. My main timeline has my "prev",
"next", and
> "pause"
> buttons which also has the actionscript for my NEXT
BUTTON, PREV BUTTONS.
> And
> now I've added your SHOW BUTTONs function as well. I've
minorly modified
> your
> showButtons function adding a couple of more lines and
actually deleting
> the
> _root because I found that it doesn't work sometimes.
Anyhoo, here it my
> entire
> code in one frame on my main timeline:
>
> // ===== NEXT BUTTON ===== \\
> next.onPress = function() {
> _root.screen.showButtons();
> _root.createEmptyMovieClip("controller_mc", 1);
> controller_mc.onEnterFrame = function() {
> _root.screen.gotoAndPlay(_root.screen._currentframe+10);
> if
(_root.screen._currentframe+10>_root.screen._totalframes) {
> _root.screen.gotoAndStop(_root.screen._totalframes);
> }
> };
> };
> next.onRelease = function() {
> controller_mc.removeMovieClip();
> _root.screen.showButtons();
> };
> next.onReleaseOutside = function() {
> controller_mc.removeMovieClip();
> _root.screen.showButtons();
> };
>
> // ===== REWIND BUTTON ===== \\
> prev.onPress = function() {
> _root.createEmptyMovieClip("controller_mc", 1);
> controller_mc.onEnterFrame = function() {
> _root.screen.gotoAndStop(_root.screen._currentframe-10);
> if (_root.screen._currentframe-10<1) {
> _root.gotoAndStop("screen");
> }
> };
> };
> prev.onRelease = function() {
> controller_mc.removeMovieClip();
> };
> prev.onReleaseOutside = function() {
> controller_mc.removeMovieClip();
> };
> // ===== SHOW BUTTONS ===== \\
> function showButtons() {
> for (i=1; i<=6; i++) {
> _root["b"+i]._visible = true;
> _root["char"+i].removeMovieClip();
> chars._visible = true;
> cap.desc._visible = true;
> cap._visible = true;
> }
> }
> Still from my main timeline, my main1_mc is called from
the frame labeled
> "screen." My main1_mc has the b1 - b6 buttons which has
the HOVER CAPTIONS
> and
> HIDE BUTTONS FUNCTION coding. And each button calls each
movie clip ie.
> char1_mc, char2_mc, etc. Here's all my code on one frame
(in my main1_mc):
> // ===== HOVER CAPTIONS =====
> b1.onRollOver = function() {
> _root.captionFN(true, "pick me!", this);
> //display the function (true) or to hide the function
(false)
> this.onRollOut = function() {
> captionFN(false);
> };
> this.onRelease = function() {
> hideButtons();
> _root.attachMovie("char1_mc", "char1",
_root.getNextHighestDepth(),
> {_x:595,
> _y:345}); //this attaches movie to the _root timeline,
and renames it to
> "char1".
>
> _root.char1.swapDepths(_root.cursor_mc);
> //swaps the depth that the cursor is on and the new
movieClip is on. So
> the
> cursor will stay on top.
> };
> };
> b2.onRollOver = function() {
> _root.captionFN(true, "Hi!", this);
> this.onRollOut = function() {
> captionFN(false);
> };
> this.onRelease = function() {
> hideButtons();
> _root.attachMovie("char2_mc", "char2",
_root.getNextHighestDepth(),
> {_x:605,
> _y:345});
> };
> };
> b3.onRollOver = function() {
> _root.captionFN(true, "Get Jac'd Up!", this);
> this.onRollOut = function() {
> captionFN(false);
> };
> this.onRelease = function() {
> hideButtons();
> _root.attachMovie("char3_mc", "char3",
_root.getNextHighestDepth(),
> {_x:605,
> _y:345});
> };
> };
> b4.onRollOver = function() {
> _root.captionFN(true, "Boo!", this);
> this.onRollOut = function() {
> captionFN(false);
> };
> this.onRelease = function() {
> hideButtons();
> _root.attachMovie("char4_mc", "char4",
_root.getNextHighestDepth(),
> {_x:605,
> _y:345});
> };
> };
> b5.onRollOver = function() {
> _root.captionFN(true, "I'll be your guide", this);
> this.onRollOut = function() {
> captionFN(false);
> };
> this.onRelease = function() {
> hideButtons();
> _root.attachMovie("char5_mc", "char5",
_root.getNextHighestDepth(),
> {_x:605,
> _y:345});
> };
> };
> b6.onRollOver = function() {
> _root.captionFN(true, "Welcome!", this);
> this.onRollOut = function() {
> captionFN(false);
> };
> this.onRelease = function() {
> hideButtons();
> _root.attachMovie("char6_mc", "char6",
_root.getNextHighestDepth(),
> {_x:605,
> _y:345});
> };
> };
> _root.captionFN = function(showCaption, captionText,
bName) {
> if (showCaption) {
> createEmptyMovieClip("hoverCaption",
this.getNextHighestDepth());
> cap.desc.text = captionText;
> // cap._width = 7*cap.desc.text.length;
> cap._alpha = 75;
> if ((bName._width+bName._x+cap._width)>Stage.width) {
> xo = -2-cap._width;
> yo = -17;
> } else {
> xo = 2;
> yo = -17;
> }
> hoverCaption.onEnterFrame = function() {
> cap._x = _xmouse+xo;
> cap._y = _ymouse+yo;
> cap._visible = true;
> };
> } else {
> delete hoverCaption.onEnterFrame;
> cap._visible = false;
> }
> };
> // ===== END OF HOVER CAPTION ===== \\
>
> // ===== HIDE BUTTONS FUNCTION ===== \\
> function hideButtons() {
> for (i=1; i<=6; i++) {
> this["b"+i]._visible = false;
> }
> chars._visible = false;
> cap.desc._visible = false;
> }
> Sorry for copying and pasting all my code - I know it
must be annoying,
> but I
> can't seem to find what's wrong. Again, ANY help would
be greatly
> appreciated.
> Thanks for your patience. Your talent is very much
appreciated and I'm
> very
> grateful for all your help.
>
> Kindest regards
> -
Loading movie clip to stage with button click AS3
I'm trying to figure out how to load a movie clip to the stage with a button click and have the movieclip close again using a close button. Does anyone have a step by step on how to do this or links to some tutorials.
Below is an example of what I'm trying to do.Alrighty I changed the publish settings to as3. I'm still getting two errors:
Scene 1
1046: Type was not found or was not a compile-time constant: Popup1Btn.
Scene 1, Layer 'as', Frame 1, Line 3
1061: Call to a possibly undefined method addEventListener through a reference with static type Class.
So my setup on my main timeline is I have an actionscript layer with this code now:
var popup1:Popup1
Popup1Btn.addEventListener(MouseEvent.CLICK,addF);
ClosePopup1.addEventListener(MouseEvent.CLICK,closeF);
function addF(e:MouseEvent):void{
popup1=new Popup1();
addChild(popup1);
function closeF(e:MouseEvent):void{
removeChild(popup1);
popup1=null;
On the stage I have a button with the isntance/AS linkage name Popup1Btn. Inside my Popup1 MC I have a box with text and then a button with the instance/linkage name ClosePopup1 to close the popup.
What am I missing? -
Premiere elements 13 changing the frame rate of the original clips
Hi,
I'm trying to make a gameplay video for YouTube... The clips I'm using are at a low frame rate (13-15 fps). When I put these clips into the editor, they get sped up to 30 fps. This increases the speed of the video and the preview window jumps back and forwards in the video.
This is highly frustrating because I can not change the speed of my video, and I can't see what I'm editing... I've tried rendering the video but this makes no difference... Is there any way of getting around this problem???Excellent! I'm pretty sure that will solve the problem. The files are in raw "movie clip" format. That usually causes problems. I can't beleive I didn't think of that before! I'll convert the files to mp4 or avi and post again to comfirm that that really was the problem.
Thanks for the quick response
--> Just to comfirm, changing the format to mp4 worked!
THANK YOU!!!!!!!!!!11
Maybe you are looking for
-
- How do I setup a DMZ zone with PIX 501 firewall? Do I need to use an additional router? I have CISCO 1605 at my disposal. - If I can't do that, what would be an alterantive way to set an FTP server similarly to the DMZ way. (We're using IPsec/GRE V
-
How to print values in a HashMap
Hi I am new to Java I am using a HashMap where key is a String and the Value is again a HashMap.. Firstly can I use it this way ...If not could you please suggest an alternative... If I can use it ... I am unable to print the values in the HashMap..
-
Hi, we are trying to install Oracle Rac on Unix sun solaris Sparc 64 bit I have installed Oracle software base version 10.2.0.1 and applied Opatch and a patch to 10.2.0.5. Now my software is 10.2.0.5 next i have downloaded 10.2.0.1 clusterware softwa
-
I just downloaded episode 3 of Top of the Lake and there is no audio for dialogue. How can this be fixed?
-
Using a Moog Voyager with Logic
Greetings, all I was just informed by Moog tech support that there is a known issue caused by several Voyager knobs sending Midi CC #'s which are hard-wired within Logic. Here are the ones which are biting my butt: 1. On the Voyager, Oscillator 1 wav