Targeting a loaded movie clip
Here's my problem, I have navigation buttons on the root
timeline that load different swf's into a target movieclip.
Example:
loadMovie("Videos2.swf", Target_mc);
Is there a way I can tell the the loaded movie Videos2.swf to
go to a certain frame and play from the root timeline?
I can adjust all the parameters of Target_mc, _x, _y and
_alpha but Target_mc.gotoAndPlay(50) doesn't work, neither does
Target_mc.play(). Any help would be greatly appreciated.
Thanks in advance
you must wait until loading is complete (use preloader code
or use the onLoadInit() method of the moviecliploader class
listener) before trying to direct the loaded swf to its frame
50.
Similar Messages
-
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> -
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. -
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 -
One script for multiple loaded movie clips
Hello,
I am sure that this has been asked or answered before, but
could not locate the correct response.
Problem:
There are 20 movie clips loaded onto the stage through
actionscript. I have 20 different onPress scripts to start the drag
for each (which also contain custom variable).
Problem, I have one single onRelease script which is to be
used for each, but do now wish to give 20 custom handled scripts.
Can I somehow use certain scripting for using one single
generic script for the onRelease? So no matter what was released it
will go through this one script.
Thanks
Dlike this...
activate
set the_folder to choose folder with prompt "Select the folder you want to add folders to..."
tell application "Finder"
set the_name to "Name"
set the_count to 3
repeat with this_num from 1 to the_count
set new_num to this_num as string
if (count new_num) is 1 then set new_num to "0" & new_num
make new folder at the_folder with properties {name:the_name & " " & new_num}
end repeat
end tell -
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{ -
How to load movie clip internal in .fla file
Hi - How do I load a movie clip inside a .fla file?........I
know the script to load a .swf file but I do not know the script to
load a movie clip (New symbo l= movie clip) made in the same .fla
file.
I have a series of movie clips I woud like to load with a
button - can anyone please guide me in the right direction with a
script or some info.....
Thanks
steenDo you mean loading clips that are in the library?
Use MovieClip.attachMovie();
Dan Mode
--> Adobe Community Expert
*Flash Helps*
http://www.smithmediafusion.com/blog/?cat=11
*THE online Radio*
http://www.tornadostream.com
*Must Read*
http://www.smithmediafusion.com/blog
"Jean Bang" <[email protected]> wrote in
message
news:ef88kj$c10$[email protected]..
> Hi - How do I load a movie clip inside a .fla
file?........I know the
> script to
> load a .swf file but I do not know the script to load a
movie clip (New
> symbo
> l= movie clip) made in the same .fla file.
> I have a series of movie clips I woud like to load with
a button - can
> anyone
> please guide me in the right direction with a script or
some info.....
>
> Thanks
>
> steen
> -
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). -
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
> -
I have two dynamic texts, both of them are going to generate numbers. If one has a greater value then the other one, a movie clip must be loaded, else, another movie clip must be loaded.
assuming you meant they're input textfields, use Event.CHANGE listeners to determine when a user changes the text property of those textfields.
tf1.addEventListener(Event.CHANGE,textF);
tf2.addEventListener(Event.CHANGE,textF);
function textF(e:Event):void{
if(!isNaN(Number(tf1.text)) && !isNaN(Number(tf2.text))){
var mc:MovieClip;
if(Number(tf1.text)<Number(tf2.text){
mc=new MovieClip1();
} else {
mc=new MovieClip2();
addChild(mc) -
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? -
Seamless transitions between externally loaded movie clips
I'm building a flash player that loads various movie clips in succession depending on user input. The player should continue to play seamlessly when one clip ends and another starts playing, however there is always a slight noticeable delay between the COMPLETE event for one clip and the actual playing of the next clip. I am using the FLVPlayback component to load the video clips, with successive clips loaded in different players in the component.
I've tried playing the next video a short duration before the current video finishes by adding a cue point just before the end of the currently running clip (about 200 - 300 ms before the end). This improves matters somewhat, but it is not a reliable method as the timings are different for different browsers and computer specs.
I was wondering if anyone here has any experience with smooth transitions between external video clips and could suggest possible optimizations I could use to improve the transitions.Thank you for replying.
The video clips basically continues the same shot only with different directions, so I can't fade out between transitions. It needs to appear as though it's playing a single video clip in that respect (a one-shot scene).
Another major issue is that there is music playing for each video which should continue playing without interuptions. Even a small gap is noticeable with audio. I thought about separating the audio and video streams but that could mean they could go out of sync as the more transitions occur. -
I am trying to load an external swf inside another movie clip
yet, I am new to actrionscript and am not sure how to call the
empty movie clip inside the other movie clip. I have:
conradButton.onRelease = function() {
framer_trail.trailer_mc.loadMovie("einstein.swf");
Where the framer_trail is the movie clip on stage and the
trailer_mc is the empty movie clip inside the framer_trail movie
clip. Any idea how to do this? Thanks for any help!Can this be worked with through a global variable, or is
there an easier way? I seem to be able to load a swf through a
button if the empty movie clip is on the main timeline, but how
would I access the empty movie clip if it is in another movie clip
on the timeline? -
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.
Maybe you are looking for
-
Protecting Folders with a Password
Is it possible to protect a folder with a password? I want to create a sensitive document in OmniOutline. This program does not offer password protection for the files it creates. So I would like to make the folder the file will be in password protec
-
RDP and JAVA (SLOW ON TYPING AND SCREEN BUILD)-CTRL-ALT-END-ESC speeds up
Any news what's the problem in a 2003 environment? Only after using the CTRL-ALT-END-ESC combination things are speeding up. We've got following installed on the server: JNLP Runtime Setiings 1.3.1_19 1.5.0_06 Both enabled and 1.5.0_06 is enabled as
-
Final Cut Express 3.5 vs. Final Cut Express 4?
I am looking at purchasing Final Cut Express for my company. We have iMovie 6 and have been doing some client YouTube videos using it. We'd like to do more with our video editing but don't feel the need for Final Cut Pro, so FCE seemed like good comp
-
One Java-Process over multiple CPUs on Solaris 8
Hello, sorry if this question is trivial. I have a java server software (BEA Weblogic) and use it on a multiple CPU machine (e.g. 4 CPUs) with Solaris 8. This Server runs as one system process and creates some threads. Are these threads spread over m
-
Is't possible to get dvd subtitles into finalcut?
Hi Im wondering if it's possible to rip subtitles from a dvd and to import them to Final cut? Would be really glad if somebody could help me to find a solution to this, would save me alot of time if i dont have to write and sync all de subtitles agai