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?
Thanks

Hey - 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
>

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
    harky

    feedmeapples <[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

  • Accessing movie clip from flash swf file

    I have the situation where in flash i created a simple
    animated movie clip with few stop() commands on timeline. Movie
    clip consists of simple animatio played on roll over and on roll
    out which is controlled using actionscript. I loaded movie clip
    into flash using [embed] tag but actionscript code is stripped,
    there is no stop() action so movie clip loops continously. I guess
    that's normal behaviour for embedded flash swf files but i would
    like to know is there a way to still achieve that? Can i load swf
    some other way with its actionscript and then control movie clip
    from flex?

    You need the FLA's to open in Flash.
    You could download the free trial of a flash decompiler
    (www.sothink.com). The free trial won't give you actionscript, but
    it will give you all of the art in the swf.

  • How do I move clips from one Event to another?

    How do I move clips from one Event to another?
    As soon as I got the new iMovie, I started importing clips and making video's. Unfortunately, I hadn't fully understood the Events feature, so all of my clips are in a single "New Event" Event. I have now created several other Events and named them properly and would like to sort all of my clips into their proper "Event" folders. How do you do that?

    Ahh, Ok. I actually had to go to Lynda.com to watch a training video of this highly bassackwards maneuver, but now I have it. In other words, while the intuitive thing is to make a new event to hold the clip you want and then open the old event and drag the clip into it's new event, the only way to accomplish this maneuver is to NOT create a new event, but rather, go to the clip AFTER the one you want to move, select it and then Right-Click on it and select SPLIT EVENT BEFORE SELECTED CLIP (or go to FILE>SPLIT EVENT BEFORE SELECTED CLIP). Then you wait a few seconds while the program thinks a bit (no feedback it is doing this - just a pause) and then it automatically creates a new event with the clip you wanted. Now just double-click the new event and name it something meaningful.
    Thanks for your help!

  • My desktop IMac OSX 10.6.8 : IMovie '11: Trying to upload a home movie clip from my Panosonic camera model PV-DV203D. I've had this camera several years, and used it with Windows desktop. Now trying to work with my Mac. I have a USB cable, both ends fit,

    My desktop IMac OSX 10.6.8 : IMovie '11: Trying to upload a home movie clip from my Panosonic camera model PV-DV203D. I've had this camera several years, and used it with Windows desktop. Now trying to work with my Mac. I have a USB cable, both ends fit, but iMovie '11 does not recognize it. Is there a driver fix for this?

    What kind of Mac to you have?  This camera is a tape based DV one that connects best with firewire and I cannot tell if your Mac has firewire.  If your mac *does* have firewire, get a camcorder firewire cable and try again.
    ETA:  Oops, I am pretty sure that all the "desktop iMacs" have firewire, so you should be good to go.  You will probably need a cord that goes from FW800 to your camcorder.

  • Trouble Copying and pasting a movie clip from another flash scene

    Hello,
    I have been trying to copy a movie clip from the library of one flash and paste it into the library of another.  But when I do this, it always gives me, "One or more library items already exist in the document.
    I have tried finding and renaming those items, renaming the existing movie clip, and even changing it into a graphic instead.  Still it always replaces these certain movie clips in my main flash file.
    I even tried the following:
    Creating a new movie clip in the new file.  Then going into the movie clip of the other file I wish to copy over, and trying to copy its frames and put it into the new movie clip i created in the main file.  Even then, it says I'm replacing library items!
    Can someone help me?
    Thanks

    The easiest way to be sure you are renaming everything is to probably to copy the movieclip into a new empty file's library and then rename each symbol in there.  Unless I am missing something, when you do that, each isolatable symbol inside that movieclip will appear as a separate symbol in the library, making it easier to be sure you have renamed them all.

  • HT2518 I am trying to move across & view my home movie clips from my PC to Mac, but I can't view them.  What do I need to have installed on the MAC to view such files? (Originally put onto the MAC from a Canon video camera)

    I am trying to move across & view my home movie clips from my old PC to my new Mac but I am unsure what software I need to view them.  They are from a Canon video camera originally.  Please advise how this is done!

    Do they have a file extension?
    How about anything on the camera which might indicate what it is, like AVCHD?

  • How do i move clips from home video to roll?

    how do i move clips from home video to roll?

    Ahh, Ok. I actually had to go to Lynda.com to watch a training video of this highly bassackwards maneuver, but now I have it. In other words, while the intuitive thing is to make a new event to hold the clip you want and then open the old event and drag the clip into it's new event, the only way to accomplish this maneuver is to NOT create a new event, but rather, go to the clip AFTER the one you want to move, select it and then Right-Click on it and select SPLIT EVENT BEFORE SELECTED CLIP (or go to FILE>SPLIT EVENT BEFORE SELECTED CLIP). Then you wait a few seconds while the program thinks a bit (no feedback it is doing this - just a pause) and then it automatically creates a new event with the clip you wanted. Now just double-click the new event and name it something meaningful.
    Thanks for your help!

  • Preventing a movie clip from resizing

    Hello:
    How can I prevent a movie clip from resizing while continuing
    to allow the main movie to resize.
    If this is impossible to do, knowing that would also be
    helpful information.
    Thank you in advance for any assistance offered,
    MyMorgaine

    Make an Album of the Photos and Videos and put them in the order you want. Then make a slideshow of that album.
    Regards
    TD

  • Importing movie clips from internet

    I am trying to import some movie clips from the internet. Any suggestions? I tried saving on MAC HD and adding to iSquint, but when I import into iMovie, there isn't anything there. I have the same problem when I try to import clips from a movie (not video, a real movie) I have saved in iTunes. Any suggestions there?

    Try this great free, open source software.
    You can get it from the site or from Apple downloads.
    http://www.squared5.com/svideo/mpeg-streamclip-mac.html
    Run MPEG Streaqmclip.
    Click File > Open URL.
    Copy/Paste the URL of the video into the box.
    Click on File > Export to QuickTime.
    Use 'Apple Intermediate Codec'.
    Convert the movie and save to a folder on your desktop.
    Open iMovie and click File > Import Movies...
    Navigate to the folder.
    Create a new event, name it and import.

  • 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,
    Ray

    ponch 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>

  • Dragging movie clip from Event pane to Project pane

    When I drag a movie clip from Event to Project the top part of the clip is cut off. On body pictures I am losing people's heads! The movie clips play perfectly in the Event panel, so I know they were imported correctly.

    There are two things to look at.
    First, what is the aspect ratio of your project, and is it the same as your camera is shooting?
    If your camera is standard (4:3), set your project to 4:3. If your camera is wide-screen (16:9), set your project to 16:9. You can do this in FILE/PROJECT PROPERTIES.
    Second, if your project contains a mix of 16:9 and 4:3, that is OK. You just pick the aspect ratio that you prefer. Then on each clip, go into the Rotate, Crop, Ken Burns Tool and select FIT or CROP.
    FIT will letterbox (black bars). CROP will cut off the top and bottom. You can decide which you prefer.

  • Import home movie clips from DVD

    Hi all -
    I've been trying to wrap my non-computer brain around the process of importing a previously burned home movie clip from DVD back into iMovie so I can add to it. (I messed up the first burn, but because of limited space, I deleted the original clip.)
    I'd be happy to get it back to tape on my camcorder if that is the only way to do it, but I fear losing quality.
    I've downloaded Mac the Ripper and Streamclip, but I don't want to pay extra money for any software (I'm a poor, starving student mom).
    Can anyone help out?
    Christine.

    Your burned DVD uses MPEG-2 file format. You'll need more software:
    MPEG Streamclip (free).
    Apple's MPEG-2 PLayback Component ($20).
    Use Streamclip to open the DVD contents and export to DV Stream (huge file). Use the .dv file in iMovie.

  • Load movie clip

    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.

  • How do I transfer movie clips from iPhoto to iPad?

    How do I transfer movie clips from iphoto on my iMac, to my iPad?

    You can use a USB flash drive & the camera connection kit.
    Plug the USB flash drive into your computer & create a new folder titled DCIM. Then put your movie/photo files into the folder. The files must have a filename with exactly 8 characters long (no spaces) plus the file extension (i.e., my-movie.mov).
    Now plug the flash drive into the iPad using the camera connection kit. Open the Photos app, the movie/photo files should appear & you can import.
     Cheers, Tom

Maybe you are looking for

  • HP Officejet 6500 e709a, printer offline

    Hello, In our office, several computers are able to print, through the network, from this printer. However, our manager's laptop, (Gateway with 1.6g processor, xp 2002 w/ service pack3) is now not printing from this wirelessly. Problem has persisted

  • Error - Settlement for Production order Co88

    Hello, Before Dec 2009 the FG material xxxxx has been goods movement post without maintained split valuation. Then Dec2009 the material xxxxx has been extended to split valuated. While process of production order settlement against said material thro

  • File preparation Casebound smyth sewn book

    Ello, I've prepared a 288 page book, that is full colour on each page, including background etc which will be casebound smyth sewn.  It's been designed as facing pages with only bleed on the outside edges. I asked the printer to provide PDF specs and

  • How come there is not an apple store in the virgin islands

    Can apple please work on having an apple store in the USVI (United States Virgin Islands) ....here we have more AT&T costumer than anything else for iPhone sales plus there is ppl here that would do whatever just to buy  ANY apple products

  • MSBUILD - Using MSBUILD I would like to add files into the solution AFTER BUILD process.

    Hi,I have the requirement to add files into the project after project has been build. I wish to add some javascript and css files into the project at the PRE BUILD or POST BUILD time.  I specified <Content Include="path\filename"/> in the AFTERBUILD