Constraining A 'zoomable' Movie Clip
Hi there
I'm trying to constrain a draggable movie clip.
Problem is, the movie clip is zoomable - i.e. the constraints will change with the size of the movie clip.
The draggable movieclip holds an image and is under a mask.
At the start, the image is the same size of the mask and doesnt need to be dragged.
When zoomed in, the image is larger than the mask and can be dragged to show the areas outside of the mask.
The problem remains, how can I set the constraints to recognise the change in the image(movie clip) size
Really needing some help with this.
Any time/help/suggestions you can give are greatly appreciated G
FlashKit > Flash Help > Flash MX
Posted on: 01-26-2005, 12:38 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Constraining A Movie Clip
I have a movie clip the follows my curser around. I want to constrain this movie clip to stay inside a circle that I have in the center of the stage. But I can not figure out an efficient way of doing this. HELP! This is what I'm using to have the clip follow my curser around...
onClipEvent (mouseMove)
{
x_pos = _root._xmouse;
y_pos = _root._ymouse;
setProperty (target, _x, x_pos);
setProperty (target, _y, y_pos);
}
Constraining A Movie Clip
I'm using Flash MX to try and make a simple movie clip follow the mouse but be constrained so it is always fixed to 1 on the X axis and can travel between 38 and 270 on the Y axis, and not go beyond these boundaries. I'm nearly there but its not quite right. Should I be using onMousemove? thanks in advance...
[CS3] Constraining An Attached Movie Clip?
Hello,
I am loading a picture into a box, via attachMovie. The size of the image is larger than the box it is being loaded into, so I am trying to constrain it to the size of the object it is being loaded into. Here is what I got.
sight.attachMovie("eye","eye1",sight.getNextHighes tDepth())
eye1._yscale = sight.height
eye1._xscale = sight.width
Constraining A Draggable Movie Clip To A Line
Here's one for you all!
I'm trying to make a small game to include on a site to relieve the boredom of information and incorporate a bit more interactivity.
However I've come across a few hiccups that I can't resolve by myself.
The main problem I'm having is that I don't completely understand the startDrag() command.
I've got an MC with an invisible button in it with the following code:
Code:
on (press) {
startDrag (this, false, (_root._ymouse-70)/6, 70, (_root._ymouse)/6, 280);
this.gotoAndPlay(2);
}
on (release) {
if (this.hitTest(_root.bottle4.bottlelabel) == true) {
_root.bottle4.gotoAndStop(2);
_root.message.gotoAndStop(2);
removeMovieClip ("myEllipse");
_root.empty.gotoAndStop(1);
} else {
_root.message.gotoAndStop(3);
removeMovieClip ("myEllipse");
_root.empty.gotoAndStop(1);
}
}
I hope everyone can understand what it is I'm trying to do here.
What I actually want is to constrain the draggable MC on a line that has a gradient of about 10° within the y values 70 and 280 (I've rounded up a few numbers to make the formula a bit easier on the eyes).
But the actual problem is that it don't work and I can't understand where I'm going wrong, it actually gives me a rectangle (I think!) where that line that I want to constrain the MC to is the diagonal bisector.
Thankyou to whoever can help me out, and congratulations to anyone who managed to read the whole of this post without falling asleep!!!
Constraining A Dragabble Movie Clip With Easing To A Set Of Co-corinates
HI guys
Could someone please help me with constraining a dragabble movie clip with easing to a set of co-corinates
I have used the following code:
On the drag button:
on (press) {
drag = true;
xd = _x-_root._xmouse;
yd = _y-_root._ymouse;
Mouse.hide();
}
on (release, releaseOutside) {
drag = false;
xfinal = _root._xmouse;
yfinal = _root._ymouse;
Mouse.show();
}
On the actual movie clip that drags when the button is pressed:
onClipEvent (load) {
xfinal = _x;
yfinal = _y;
}
onClipEvent (enterFrame) {
if (drag) {
x = _root._xmouse+xd;
y = _root._ymouse+yd;
} else {
x = xfinal+xd;
y = yfinal+yd;
}
_x += (x-_x)/3;
_y += (y-_y)/3;
}
I want to constrain the MC to 1, 1, 300, 500 and have tried using:
startDrag("", false, 1, 1, 300, 500);
however this just balls’s everything up.
I guess something similar needs adding, however my action script is poor and have therefore attached the swf for anyone who can help.
Constraining A Slider In A Movie Clip To Only Small Part Of Screen
I madea a vertical slider that follows the mouse movement. The section were I want the slider is in a sub navigation section that is only about 55 x 72. I have the slider on a constraint so it doesn't go above or below the navigation section. The only problem is, it reacts to your mouse when its in other sections of the screen, not just the small 55 x 72 area. how do I tell the slider movie clip to only respodn to the mouse movement when its in that certain section? I only want it to work when the users mouse is between L: 310, R: 360, T:132 and B: 204.
Heres the script I currently have on the movieclip. I'm guessing I'll just need to add to this
onClipEvent (load) {
_y = 0;
speed = 3;
}
onClipEvent (enterFrame) {
endY = _root._ymouse;
_y += (endY-_y)/speed;
startDrag(_root[arrow], false, 339, 132, 339, 204);
}
I hope somebody can help me out! Thanks.
Constraining A Clip Within A Circle
Could somebody please take a look at this and tell me
the best way to keep this constrained within the circle.
http://www.circumlocus.com/problemfla/circleproblem.zip
I dont want the small circle to be able to go outside the large circle. At the same time i need all of the other actions in the movie to be unaffected.
Also, how do you create a negative number in flash?
the "-" is just a minus sign, is it not? I need to multiply something by a negative 20.
You assistance is greatly appreciated.
IP: Logged
All times are PST (US)
Constraining Clip To A Line
How do I constrain a draggable clip to a curved squiggly line? Also is it possible to measure the distance along the line that the clip has been dragged? Not the linear distance from the start point but the distance along the curved line that the clip has traveled?
Thanks
Patrick
Constraining Draggable Movie Clips
hi
I want to Constrain a draggable movie clip, along the x axis. It follows the mouse, but then goes straight through a wall, does aanyone know he litttle bit of code, which, wil stop the movieclip even when the mouse still moves past that point.
Thanks
Pedros
Constraining Movie To 100% For Use With Pixel Fonts?
Hi
I have a movie that is viewed in a full screen window, however i want the actual movie to stay at 100% when viewed as full screen as i am using pixel fonts, how do i tell the flash player to publish at 100% within the full screen window instead of it stretching to fit?
Thanx in advance
Help Constraining Published Movie Proportions
In the Publish Settings Dialogue, under the HTML tab, how can I lock the proportions of my movie but still have it set to the flexible percentage setting and not the Match Movie setting?
When I use the percent setting and then play around with the opned html window, I like that all the elements remain visible regardless of the size of my window but it also allows for extreme distortion of the movie image contents.
Example is that I have a thumbnail gallery and this setting allows the pictures to be stretched.
Is there a way to let this scaling take place but to retain the movie's dimensional proportions?
Thanks if you can advise.
Michael Sheeler
Constraining The Proportions Of A Flash Movie?
Is it possible to constrain the proportions of a Flash movie? I have a movie that is 300x200 pixels and have motion-tweened graphics that are moving in and out of the stage.
I noticed that even though the movie is at 300x200, if I resize it I start noticing graphical elements outside the stage that are not supposed to be even visible.
How can I prevent this from happening? Should I even worry about this? Thanks.
Constraining Published Movie To Work Area
Hello all,
I have just finished a website that contains images that extend beyond the stage area set for my site. It was my intention for the published movie to crop these images off at the publishing stage, so only the part of the image in my stage area is visible. In reality, the published movie shows everything in the work area beyond the stage. It seems like I've tried everything I know to fix this.
Is there something I can do to remedy this? I would like the swf to be aligned top and center in the window.
Thanks,
Mike
Zoomable Map
hey everyone...
i wanted to add a feature to my map that basically magnifies a certain section to enhance and clarify the map.
think this image describes it best:-
when you drag the small box it enlarges the detail onto the right... can someone point me into the right direction on how to create this???
thanks
cuse
Zoomable Nav
does anyone know of a tutorial or .fla that shows how the navigation on this site> http://www.frostdesign.co.uk works? (particularly the zoom and scrolling bits)
there was a one at http://www.philterdesign.com but it had no tute.
cheers
Zoomable Map
I have to create a zoomable map similar to http://www.flashmaps.com/showcase/ar...or/samples/02/ I already created a map for a past project that I can use in this one. I have each state as it's own symbol and then the map itself is one giant symbol with each state lined up. What I'm not sure how to do is make it so that when someone clicks on one of the states, it zooms in on that state and centers it in the viewing window. Does anyone know of a good tutorial that covers this type of thing? Thanks!
Zoomable Map
hi, guys,
I am creating a project for Canadian Reserves and Natural Wonders (not the seven wanders that you heard of) but something for all of us, canadians and our kids and families to do while we are on weekends.
right now the gallery of the stuff is located at
http://www.freewebtown.com/dunga/mytravels/canada
right now I am using a gallery style for image display, which will definately stay.
what I would like to created is:
a zommable map of Canada (which will include provinces) whereas user when clicking on let's say on Ontario will be "zoomed" into Ontario map from the same map, then the natural reserves will appear, so user then clikin on the particular reserve will be "zoomed" even deeper to "arrive at" the destination reserve, frome there by clicking the button user can navigate to a specified flash scene.
I can create entire thing without any zooming, but I thought it will be very cool idea...
just imagine Planet earth, zoomed into Canada, zoomed into Ontario, zoomed into Bryce Peninsular, zoomed into Cyprus Lake, zoomed into the 20 meters underwater cave...
Zoomable Maps?
Morning all, (UK time)
Does anybody know of any good tutorials for creating zoomable flash maps?
Im after the type where the user can move the map around in the box, zoom in and out, and if possible, print out the map or area they are zoomed at.
If you go HERE and go to the contact section, you'll see a map thingy I found which is basically a componant. This is similar to what Im after, except there's no restriction to how far you can move the map around in the box....plus you can't print it.
So any help is welcome!
Cheers
Andy
Zoomable/Clickable Map?
Hi,
I'm absolutely hopeless at Flash, but here's what I need:
I need to get it so that users can view a 2D map of my virtual world (preferably created in Photoshop or something rather than drawn in Flash itself) and be able to zoom in on a few regions.
Once zoomed in on a region, they can either zoom out again (obviously) or click one of the cities to be directed to a web page.
It doesn't have to be a zoom but some transitional effect would be nice.
The trouble is, being a complete novice I get in such a pickle with any kind of movie clips.
So I was wondering if anyone knows where there are any good tutorials/downloads for something very similar? All I can find is zoomable maps of UK/US or things which are very difficult to customise.
Please help!
Cheers,
~MKK
Panic - Need Bounding Box Gor A Zoomable Map
help!
i need to figure out how to apply a "bounding box" to a zoomable map as at the minute the viewer and drag it anywhere!
The current file is at:
http://www.creativecrucuble.co.uk/ftpdocs/print_01.fla
any ideas? I need to get the site live in the next few hours!!!!!
help!
Contrain Draggable/Zoomable Map
trouble constraining draggable map
How to constrain draggable map w/o startdrag
i am tring to create a draggable map with dynamic zoom and drag and I want to be able to keep the map from crossing a zoom margin mc no matter how big the map gets. Here is the code i'm using some of which i got from another post:
// This is the code on my zoom in button
on (release) {
targetScale = int(ThePic._xscale + ThePic._xscale * .5);
this.onEnterFrame = scaleMap;
call(roadKiller());
call(locationKiller());
call (PosControl());
}
// on main timeline
// this zooms/scales the map
function scaleMap() {
var s = (targetScale - ThePic._xscale) * .3;
if (Math.abs(s) < 1) {
ThePic._xscale = targetScale;
ThePic._yscale = targetScale;
this.onEnterFrame = null;
} else {
ThePic._xscale += s;
ThePic._yscale += s;
}
}
// Turn Roads on and off
function roadKiller()
{
if (targetScale >= 60)
{
setProperty("_root.ThePic.roads", _visible, "1");
}
else
{
setProperty("_root.ThePic.roads", _visible, "0");
} // end if
} // End of the function
// Turn Location names on and off
function locationKiller()
{
if (targetScale > 81.25)
{
setProperty("_root.ThePic.locations", _visible, "1");
}
else
{
setProperty("_root.ThePic.locations", _visible, "0");
} // end if
} // End of the function
// On mc "ThePic" timeline
this.inertia=0.75//Number, 0=no inertia, 1=infinite inertia (imovable)
this.onPress=function(){
this.offset={x:this._xmouse, y:this._ymouse}
this.onEnterFrame=this.followMouseInertia;
}
this.onRelease=function(){
delete this.onEnterFrame;
}
this.onReleaseOutside=this.onRelease;
this.followMouseInertia=function(){
this._x+=(this._xmouse-this.offset.x)*(1-this.inertia);
this._y+=(this._ymouse-this.offset.y)*(1-this.inertia);
}
// On button inside MC
//Current constrain AS -- does not work
on(press){
//boundaries
_root.ThePic.bounds={xMin:0, xMax:200, yMin:0, yMax:200};
_root.ThePic.followMouseInertia=function(){
//calculate values
posX=ZoomMargin._x+(this._xmouse-this.offset.x)*(1-this.inertia);
posY=ZoomMargin._y+(this._ymouse-this.offset.y)*(1-this.inertia);
//constrain values
posX=Math.max(Math.min(posX,this.bounds.xMax),this .bounds.xMin)
posY=Math.max(Math.min(posY,this.bounds.yMax),this .bounds.yMin)
//move mc
this._x=posX
this._y=posY
}
}
The Problem is that i just can't seem to get it to stay within the zoomMargin mc's bounds, and i have tried a few different methods none of which were successful.
PLEASE HELP!!!!!!!!!!!!
Thanks in advance guys!
Here is a link to the map:
http://dev.emeraldcoast.com/seatown...t/flashMap.html
Delicate Question For ScriptMaster Zoomable Map Please
Please help with zoomable map:
if u. start this file u see small display of map above and u can drag ana see teh map, or u can zoom map with slider.
Problem is that my map, that i changed in this file is bigger, than original map an i cant optimize it and thi no works properly:
Problem1:
If u zoom the map, and drag over the display the scalled map is not all visible.
Problem2:
In display above by draging is it te cursor not in the middle of the "magnifier" - rectangle and i no have experince to optimize it in code.
here is the thred where u can find the original file to compare it, what i changed:
http://www.flashkit.com/board/showth...&highlight=map
Navigation In A Large, Draggable, Zoomable Image
I am trying to make a huge zoomable, dragable image simpler to navigate in. The file is too large to upload, so to get an idea of what I'm dealing with, go to the following link:
http://ryu.bsd.uchicago.edu/sh2/clustalalignment.html
The problem with the setup now is that the image is so large that one gets lost when one drags around in it. The user should always know what protein a row belongs to (indicated by the far left column). I see of two possible solutions to this problem, the first being simpler and the second more complicated:
1) Create a box that displays the name of the protein (indicated by the name of the far left column) so that when your mouse is over a row the box will display the name of the protein. The image would still need to be draggable.
2)Attach a seperate column to the left which is not able to be drug left or right, but only display the protein names. This column would have to zoom in and out to remain in alignment with the main image.
My flash knowledge is very small, so please be detailed if you want to help!
Thanks a lot,
Conrad
Dcshoes.com/snow--> Zoomable/dragable Images.. How?
In the boots section you can zoom in and out and drag the image around. What method is used to get this done? Anyone know of any tutorials dealing with this?
Also, if someone could point me in the right direction for creating a "news" section that is easily editable from outside flash and able to have linked images, animations and linked text... it would make my day. thanks.
t
Zoomable Interface Question: Applying A Transform Non-recursively?
I'm building a zoomable user interface in ActionScript. I'm trying to implement the following behavior: All elements are children of one "canvas" object (not the stage, because some static UI elements will be floating on top of the bits that are manipulated). The "canvas" can be "zoomed in/out" (scaled up/down), bringing the centerpoints of child-objects of the canvas closer together or further apart. However, I don't want the scaling to directly affect the coordinate-systems of the child objects -- eg: if two 10x10px rects, rectOne and rectTwo (both drawn in local coordinate space with corners (-5,5),(5,5),(5,-5),(-5,-5)) are children of "canvas" with initial coordinates rectOne.x = -30 and rectTwo.x = 30, after applying the scaling transform (0.5,0.5), rectOne.x = -15 and rectTwo.x=15, but the rects remain the same pixel-size on screen. In other words, the result of the scale is that the objects remain the same size, but appear closer together. Ideally, I'd like to make the objects drawing the rects aware that the zoom had happened, so they could then respond by redrawing, but that seems pretty easy to do with event listeners/etc..
Is there an easy way to do this? My one thought is to apply canvas.scale(ratio,ratio) and then loop through all children of canvas and child.scale(1/ratio,1/ratio), but this seems potentially fragile. Is there a better "best practices" way to code this behavior?
Creating A Zoomable / Dragable Viewing Panel For Photos
Hi all,
I am creating a site for some highquality digital photos, and I would like to make the viewing panel a fixed 500x600px.
However, many of the photos are larger than this, or of different proportions.
So, I would like to put an option on the viewing panel so that clicking a specific button will zoom in on the photo so that the viewer can see the picture in better detail. Any tips on how to do this?
I would also like the panel to be able to move the photo within the panel. I realize this could be done easily with simply adding a scroll bar, but is it possible for this to be done by clicking and dragging the photo with the mouse?
Thanks in advance!
Flash Newbie: Where Can I Find How To Create A Zoomable Timeline?
I'd like to create a historical timeline for a period of time. It will show about 5 years in macro view then the user can zoom in a little and see more detail, zoom in a more and see more detail.
I'd also like some mouse-over pop-ups or the like. For example, the timeline would display a name or event and the user can mouse over that area and something pop-up to give more detail.
Being a newbie to flash, I'd appreciate any links or tutorials on how to do this - I know the above is really two separate questions.
Many thanks.
Making A Movie Clip In A Movie Clip Go To The Next Frame Of The Original Movie Clip
I have a movie clip (for simplicity I'll call it movie_a) in movie_a I have another movie clip movie_b.
in movie_a i have a button that when pressed makes movie_b play (it has a stop frame every once in a while so the button acts as a "next" button)
I want it so that when i get to the last frame of movie_b and press the button, it will go to the next frame of movie_a
I hope that doesn't confuse u and u can help me solve this problem, as i am stumped and I've tried everything I could think of (which isn't that much as I'm not too good with actionscript)
thnx
Movie Clip Buttons Nested Inside Movie Clip Dont Work
Hi people!
im having a problem here.
in my first frame i have a movie clip named "menu_mc".
i have this AS for this movie:
Code:
this.menu_mc.onRollOver = function() {
menu_mc.gotoAndPlay(8);
}
this.menu_mc.onRollOut = function() {
menu_mc.gotoAndStop(7);
}
thats working ok, the menu_mc plays on rollover from frame 8 till frame 12 where stops.
On frame 12 (this is inside the menu_mc movie clip) i have another movie clip, named button1_mc.
and also i have AS controling that MC:
Code:
this.button1_mc.onRelease = function() {
getURL("index.htm", "_self");
}
The problem is that when i rollOver on menu_mc it work fine and the button1 appears, the problem is when i try to click button1...
doesnt work.
the swf you can see it on www.wt.com.mx/menu.swf
can anybody help me please?
what im doing wrong?
or what other ideas can you give me so i can make that work.
thanks!
Mouse Rollover On One Movie Clip Increase Decrease Alpha Of Another Movie Clip..
So I really haven't messed with Actionscript much for a couple years and here is my issue.
I have several movieclips I put together that will eventually be a menu for my website. When you roll over a menu option (movieclip) I am trying to get another movie clip to fade in giving the description of the menu item.
For example - when you roll your mouse over the 'Live Chat' option a brief text description would appear telling you what the live chat is about. This description is a seperate movie clip appearing away from the original menu.
I have made the movieclips for the menu and the movie clips for the descriptions. I tried this action on the menu option to get the description to fade in:
Code:
onClipEvent (load) {
this._parent.mc_text_discussionBoard._alpha = 0;
}
onClipEvent (enterFrame) {
this.onRollOver = function() {
if (this._parent.mc_text_discussionBoard._alpha<100) {
this._parent.mc_text_discussionBoard._alpha += 5;
}
};
}
But the alpha only increases on the description (mc_text_discussionBoard) by 5 when I keep rolling my move over and out and over again. It makes sense why it does that, but I'm not exaclty sure how to get it to continually increase the alpha by 5.
any help would be great and I am anxiously waiting to get this solved!
Kevin
Code 4 MovieClip Button To Load A Movie Clip Into A Placeholder Movie Clip.
Yeah that title sounds a little confusing...so i will explain:
Is there a way to tell a "movie clip button" that once it is clicked on to load a "movie clip" into a "movie clip placeholder". So instead of loading an external swf into the placeholder, it will be a movie clip from within the same library. Putting every single custom clip on the timeline would take a while, so that is why I thought it would be easier like this, and the other movie clips are not that large that I want to load into it so there is no need for external swfs, trying to keep it clean. Here is the code along the lines I am trying to go for.
__________________________________________
this.profile_mc.onRelease = function() {
placeholder_mc.loadMovie("profileSection_mc","plac eholder_mc","_root.content");
}
__________________________________________
- "profile_mc is the button I am trying to activate to load the
"profileSection_mc" into the "placeholder_mc". but so far no good.
- the movie clips are within the same library, not on the timeline or external library.
- Is this possible?
Using A Button In A Movie Clip To Control The Movie(and Not Movie Clip) Timeline
Ok i have a button placed in a movie clip. I want this button, when released, to go in another scene, frame one, on the movie(scene) timeline and not on the movie clip timeline.
So i tried: gotoAndPlay("mission", 1); (mission is the name of my scene)
But it goes to the frame 1 of my movie clip, It would be great if someone could tell me how i can control the movie timeline while my button is in a movie clip
thaks
Vakarm
How To 'stop' A Movie Clip Within A Movie Clip Within A Movie Clip Loop
I've done searches, laughed, cried, and punched holes through the wall, but I can't figure this out.
I'm in Flash MX (pro) and I have a MovieClip on my main timeline (frame 1). Inside that clip is another animation (the static animation scrolling across the screen), and another inside of it of the static animation (6 characters on a train each animated uniquely).
Confused yet? Ha! OK, so I just want the damned animation on the main timeline to run once and then stop (or to 270 frames). I've tried:
myMovieClip.stop()
to no avail. I've tried attaching the script to the movie clip itself, and also to the frame.
Any suggestions?
Making A Draggable Movie Clip Control The Location Of Another Movie Clip
http://www.kineticz.net/jba/residental.jpg that is a picture of what i am trying to do. the white bar at the bottom is the draggable movie clip and the group of 3 pictures right above that is the movie clip that i am trying to control w/ the draggable clip. I am having trouble writing a script that will do this. any help you can give will be much appreciated.
A Button Inside A Movie Clip, Within A Movie Clip, Calling Another Scene:
Is it even possible?
I have been trying to do it for the last few days for a site I am working on.
I have done searches in many forums and it's foolish looking for an answer that way, because quite frankly every thread I opened was something to do with LoadMovie or GetURL, etc.
What I have right now is on the button in my Menu Bar Movie Clip:
on (release) {
gotoAndPlay(285);
}
Which plays a fancy little animation in the movie clip and then on the last frame of that movie clip I had:
gotoAndPlay("Contact", 1);
Which is the Scene for the "Contact Us" Scene named "Contact"
One would think that it would load up the scene and play at frame 1, however all that happens is it reloads the movie clip of the "Menu Bar" at frame 1 and starts over, not even realizing what I asked.
Anyways, I figured there's a script or something that tells it to look outside of the movie clip or to the _Root, or whatever.
If someone has a solution, it would be greatly appreciated.
Sorry I have no example to show, since I have yet to upload it. (It's my company's web site, and I don't think customers would want to see some half-arsed web site that's not complete.
Thanks in advance.
On Mouseover Show Movie Clip, On Mouseout Close Movie Clip *HELP*
Basically what I am trying to do is this...
I have a movie clip that is a name. When you put your mouseover the name I want another movie clip to display to the right of the name. This clip has a photo and bio of the person.
The photo and bio have an animation that fades it in and an animation to fade it out. I have 5 frames for the fade in, then stop frame, then 5 frames for the fade out.
What actionscript do I need to use to make that second movie clip load when a user mousesover the name (first movie clip) and to make the second half of the second movie clip play when the user removes their mouse from name (first movie clip).
NOTE: I tried using loadMovie and unLoad movie but I couldn't do it loading another swf. The reason being this is already an swf loaded inside a main movie. I guess you can't load an swf inside an swf that's already loaded inside an swf. I hope this all makes sense!
I appreicate all the help!
Thanks a lot!
Create An Empty Movie Clip Inside An Existing Movie Clip?
I'm making sort of a tabbed navigation scheme by reading the data for each tab in from an XML file. What I'm wondering is if it's possible to use createEmptyMovieClip() to make a new empty movie clip inside a movie clip that already exists on the stage.
Using
ActionScript Code:
m_anchor.loadMovie(bg_image);
works as I would expect. bg_image is just the relative path to an image file, and m_anchor is a movieclip already on the stage. However, doing a similar thing:
ActionScript Code:
m_anchor.createEmptyMovieClip("textbox", this.getNextHighestDepth());
and then drawing a shape (a rounded rectangle, which I then want to put text on top of) doesn't work. It works if I just say "this.createEmptyMovieClip" instead of attempting to create it inside the m_anchor clip, but if I do that, the "textbox" is created at the root level and I can't unload it along with everything else in the "m_anchor" clip. Is it possible to create a new empty movie clip inside of one that is already on the stage?
Thanks!
Load An Internal Movie Clip To An Empty Movie Clip On The Stage
Can any of you shed some light as to why this is not working:
on (release) {
emptyMC.attachMovie("mrimc","instance1",this.getNe xtHighestDepth());
}
what I want to have happen is when the user clicks a button it loads the mirmc into emptyMC on the stage.
I have double checked that my empty movie clip does indeed have an instance name of emptyMC and that the movie I want to load into does in fact have the name mrimc in the library. Any ideas?
Problem Getting Movie Clip Inside Of Movie Clip To Face Mouse
I used the code below to make a movie clip face the mouse, it works when I use it on a movie clip that's not embedded in another movie clip, but when I used it on an embedded movie clip, it's axis seems to change.
Attach Code
var stickGun:MovieClip = this.stick_holder.stickGun_mc;
//stick_holder.stick_mc.stickGun_mc
stage.addEventListener(Event.ENTER_FRAME, onMove);
//stick_holder.stick_mc.stickGun_mc.addEventListener(MouseEvent.MOUSE_MOVE, onMove);
function onMove(event:Event):void {
// get the radian value of the angle between the clip and the mouse...
var myRadians:Number = Math.atan2(mouseY - stickGun.y, mouseX - stickGun.x);
// convert it to degrees...
var myDegrees:Number = Math.round((myRadians * 180 / Math.PI));
// get the horizontal and vertical distance between the clip and the mouse...
// rotate the clip toward the mouse...
stickGun.rotation = myDegrees;
}
Placing Actionscript Movie Clip Inside A Movie Clip Symbol
I'm loading an external image into an empty actionscript movie clip (holder1) using MovieClipLoader(); on frame one of my movie and is invisible. Then when the movie plays, there is an empty movie clip symbol (image1_mc) that is placed manually on the stage within another movie clip symbol (flash_mc), and is also on a bottom layer of a mask layer which is animated. Is it possible to place "holder1" inside of "image1_mc" so that I can treat it as if it were an embedded image? In other words, have the image in "holder1" inside of the manually placed movie clip symbol "image1_mc" so that I can use it like a regular symbol on the stage?
How Can I A Movie Clip Splash Prior To Attaching The Choose Movie Clip..Help
I have a presentation which I would like to publish on CD. What I want is to have movies attached to the container_mc on the stage upon clicking the desired navigation buttone. But before movie gets attached, I would like to have a logo_mc animation (from the library) to play itself before playing the selected clip.
I think I need to write up a function which will call the animation splash clip prior to attaching the clicked movie.
Appreaciate all the help.
Thanks so much.
Control Movie Clip In Container From Button Inside Other Movie Clip
There are three movie clips involved in this question.
1. A main movie clip that has a target empty movie clip where an external swf loads.
2. A menu movie clip that is built from button symbols and has its own timeline.
3. The external movie.
When a user clicks on the menu, the external swf loads into the empty movie clip target. This part works fine. Here's the code:
on (release) {
loadMovie ("Lesson1.swf", "_root.container");
}
I want to use one external swf for all lesson, versus 20 external swfs. The problem I'm having is controling at what frame the external swf loads. I've tried adding --gotoAndStop (15) -- for example. I've also tried adding, gotoAndStop "_root.container" (15), but that doesn't work either. The gotoAndStop action ends up controlling the menu movie clip timeline instead of the movie loaded into the container. I figure this is because the menu mc has "embedded" buttons and it's own timeline.
Any help you can offer will be much appreciated.
Thanks
Sheila
Creating A Button To Open A Movie Clip From Inside A Movie Clip?
I'm using a hexagon menu to display some images. One image is placed on each slide of the hexagon menu (which can then be rotated left and right to see other "slides").
What I want to do now is to be able to click on the object (image) as a button and for it to go to another scene which shows the image blown up and some description next to it (which is another movie)
I have tried the following which doesn't seem to work:
Created an invisible button (or choosing the image as a button) and having
on(release) {
gotoAndPlay("scene 5", 1);
}
this doesn't work when I use it over the hexagonal menu, but when I move the button to somewhere else on the screen (not over the movie) it works.
Please can someone help with this - Ive been working on it flat out over the weekend and desperately want to make it work. any ideas would be appreciated!! thank you
|