Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








How Do I Target A Scene From Inside A Movieclip?


As in the subject: How do I target a scene from inside a movieclip?

I'm in scene 3 called game.... how do I get a movie clip to goto scene 4 named looser?

I tried
Code:
_root.nextScene ();
Any ideas?




FlashKit > Flash Help > Flash ActionScript
Posted on: 07-13-2001, 11:17 PM


View Complete Forum Thread with Replies

Sponsored Links:

Button Inside A Movieclip Inside A Scene Help
i have a button inside a movieclip inside scene 1. i want to have the it so when the button is released, it will go to scene 2. can someone help.

View Replies !    View Related
Target Scene With Button In MovieClip?
Using flash mx,

how do I target a Scene with a Button that is inside a MovieClip?

Al

View Replies !    View Related
Target Movieclip Inside A Uploaded .swf
Ok I am a first time user so please take it easy on me.
What I am looking to do is target a movieclip that inside a loaded .swf. from my flash home page. The part I am targeting is a movie clip that scrolls. The actionscript for the load movieclip and button to example contained in loaded movie clip are below. This just may require someone looking at actual .fla file?

Here is the script for the button to load the movie clip:
on (rollOver) {
gotoAndStop (2);
}
on (release) {
_root.sections=1;
gotoAndStop (3);
loadMovieNum ("print_final.swf", 1);
_root.lab.gotoAndStop(5);
}

on (rollOut) {
gotoAndStop (1);
}

Here is an example of the script for a button inside the loaded movie clip:
on (rollOver) {
if (_root.pF <> 3) {
_root.button3.gotoAndStop (2);}
}
on (release) {
_root.button3.gotoAndStop (3);
_root.pF = 3;
setProperty ("/scroll", _y, -(mh*2)+startY);
}
on (rollOut) {
if (_root.pF <> 3) {
_root.button3.gotoAndStop (1);

}
}

I am guessing that maybe somewhere after I say loadMovieNum ("print_final.swf", 1); I need to implement the idea of setProperty("/scroll,_y,-(mh*2)+startY); but I am not getting this to work.

Thanks,
Coleman

View Replies !    View Related
Target Movieclip Inside External Swf
Hi, I need help.

I'm trying to target a movieclip inside a loaded external swf from the main.swf. The external swf is loaded into 'holder' and I want to target 'maintxt' mc which is inside of 'main.bg' mc in the external swf.

I've tried:
Code:

backbtn.onRelease = function(){
  holder.main.bg.maintxt._alpha = 0;
}
But flash doesn't detect the main.bg movie clip. How can I fix it?

Thanks,

ayok

View Replies !    View Related
Target Button Inside (attach) Movieclip
Hi everyone,
im trying to get a button working that is inside a movie clip.

the movieclip is given a linkage identifier (container_id and name as container_mc) as it is inside the library and not on the stage.

The movie clip has three buttons inside it.

I have the following code on each of the button

Code:
_root.containerBase_mc.scrollUp_btn.onRelease = function() {
trace("scrol upn");
};

this.containerBase_mc.scrollDown_btn.onRelease = function() {
trace("scrol down");

};
this._parent.containerBase_mc.close_btn.onRelease = function():Void{
trace("close me");
}
as you can see my desperate attempts to get this working

none of the trace actions work...
any help?

thank you.

View Replies !    View Related
How Do You Go To The Next Scene Inside The MovieClip?
Can you please help me with this to finish my animation??

I made a dragging function that you can drag stuff into a box or something, but when I release the drag object onto the box I want it to keep playing onto my next scene.

I control it with ActionScript that if the drag object is released onto the box I will play the MovieClip in the box. But when it FINISHED playing the animation in the MovieClip, I want it jump into the next Scene.

I don't know if this is an ActionScript question so I just put it here. I typed in the ActionScript:
Code:
nextScene();
. It works OUTSIDE of the MovieClip but doesn't work INSIDE of the MovieClip of something. So how can I make it jump off the MovieClip and into the main scene?

Please try to solve my problem!

Thank you very much to people who have helped me!

View Replies !    View Related
Target/access Button Inside (attach) Movieclip
Hi everyone,
im new to flash and actionscript v2.
would be great if i could get a shove in the right direction.

im trying to get a button working that is inside a movie clip.
the movieclip is given a linkage identifier (container_id and name as container_mc) as it is inside the library and not on the stage.
The movie clip has three buttons inside it.
I have the following code on each of the button

Code:
_root.containerBase_mc.scrollUp_btn.onRelease = function() {
trace("scrol upn");
};
this.containerBase_mc.scrollDown_btn.onRelease = function() {
trace("scrol down");

};
this._parent.containerBase_mc.close_btn.onRelease = function():Void{
trace("close me");
}
as you can see my desperate attempts to get this working
none of the trace actions work...
any help?
thank you.

View Replies !    View Related
Goto Next Scene From Inside A Movieclip?
Hi all, is there a way to go to another scene from inside a movieclip?

I tried with gotoandstop scenename frame 1

But it didn't work

Thought because it a movieclip and it's not on the main scene...

so there is a way?

Thank you in advance

View Replies !    View Related
Button Going To Scene From Inside Movieclip
Hi Guys,
I'm trying to help someone with flash roots.
We have a button that wants to go to scene 2.
It is located here:
Scene 1>Rollmov>mov1>button1

All we want it to do is go to scene 2, can't figure out the root thing.
Pdue.

View Replies !    View Related
GotoAndPlay Scene From Inside A Movieclip
I have a movieclip one_mc on stage.
Inside one_mc there is another movie clip two_mc.
Inside two_mc there is a button.

On click of this button, i want to goto a scene called "try".

I tried this:

_root.gotoAndPlay("try",1);// it dosn't work.

Any Idea?

Thanks

View Replies !    View Related
Moving To Next Scene With Button Inside Movieclip
This is probably something easy that I am neglecting, but it's totally driving me nuts:

I have a button within a movie clip which I am using to control the main timeline via "_root". This is working fine except that it refuses to work when I want to to goto a frame in another scene. My syntax is thus:

on (release) {
_root.gotoAndPlay("About", 1);
}

"About" being the scene I want to goto. However when I click the button literally nothing happens. I've tried romoving "_root" but that sends me to the first frame of the movie clip, totally ignoring "About". Any help on this one would be great.

Thanks!

View Replies !    View Related
Go To A Frame From A Button Inside A Movieclip Within The Same Scene
How do i do this again...its been awhile... is it level or root...please and thanks

...i have a movieclip... in it, i have a button that i want when clicked to go to another frame in the scene (only 1 scene)

View Replies !    View Related
Navigate From Button Inside Movieclip To A Scene?
I have a clip called "scrollbar" sitting on the main timeline (a scene called "Main). I am wanting that button to change to the Scene "Project1" from wherever it is.

Here's the code I am currently using:

on (release) {
_root.gotoAndPlay("Project1","p1.01")
}


Any ideas why this isn't working?

View Replies !    View Related
Hi How Make JJumping From Inside MovieClip To External Scene?
Hi! Does someone can help me with such a problem:
http://www.test.w3.com.pl/mikolaj/000mik/xxx.fla
What action should i put at the end of MovieClip [inside] from scene 3, to jump to beggining of Scene 2?
Thanks, Thiefunny.

View Replies !    View Related
Help With GotoAndPlay("diff Scene" 1); On Button Inside Movieclip... Its Not Working
i have a button inside a movieclip with the actions gotoAndPlay("scene 3", 1); and its not working... if i copy and paste the button outside, onto the main stage, it works... and ive tried saying _root.gotoAndsadf and _level0.gotoAndasdf but its not working...

how do you do it?

View Replies !    View Related
Target Frame In Scene From Movie In Same Scene
I know this is probably really basic, but I'm stuck here. Here's what I want to do: I have Movie1 on a layer in Scene1, and Movie2 on another layer in Scene1. In Movie1 is a button that, when pressed, goes to a particular Frame in Movie2. How do I do this!? Thanks!

View Replies !    View Related
Button Inside Swf Needs To Target Label Inside Different Swf
I have two different swf files (valet.swf and transit.swf) loaded into 2 different container MCs on a main timeline. One is in the container MC contentsValet the other is in contentTransit. I have a button inside the transit.swf that when pressed needs to go to the label "valet" inside the valet.swf file and am not having any luck with getting it to work.

Here is the code I tried to use on the button

on (release) {
_root.contentsValet.gotoAndPlay("valet");
}

View Replies !    View Related
What Is The Target Path From Scene To Scene........
The button on the Scene 1 must tell
MovieClip2 (instance name MC2)
wich is in the
MovieClip1 (instance name MC1)
wich is on the scene 2
to play
how to do that
or
what is the target path

View Replies !    View Related
Loading An External Swf Inside A Movieclip That Is Inside Of A Movieclip
I was wondering if anyone could help me!!!! I used the tutorial for loading external swf's into a movieclip off of this site. But what I am trying to do is load another external swf inside of that external movieclip. Not sure if that makes sense. I kind of have it working where it loads the first external clip. But when I press a button to load a different one, it plays the transition then loads nothing. It's just blank.

This is the AS 2.0 that I am using for the external swf button that is inside another:

on (release) {
if (this._parent.currMovie == undefined) {
this._parent.currMovie = "StrategicPlanning2";
container2.loadMovie("StrategicPlanning2.swf");
} else if (this._parent.currMovie != "StrategicPlanning2") {
if (container2._currentframe>=container2.midframe) {
this._parent.currMovie = "StrategicPlanning2";
container2.play();
}


}
}

And this is the AS that I am placing on the last frame in the actions layer

this._parent.container2.loadMovie(this._parent.cur rMovie+".swf");

Please help!!! I am only a Graphic Designer!!

View Replies !    View Related
SCENE INSIDE A SCENE? How Does It Work
Hello out there. I'm trying to make a site with a menu and the buttons link to scenes inside the same scene as the menu. Do you get ot. Maybe it's not too clear. Instaed of changing scenes by ckicking on the buttons I'd like for example the likedn scene to appear underneath my menu. Checi it out for example
http://www.dysby.com
or http://www.rekordsrekords.com

Something like that. Thanks alot already.

View Replies !    View Related
Rotating Movieclip Inside A Button, Inside A Scrolling Menu Bar
Hi all,

I'm pretty new to actionscript, and I'm kinda moving along; up until now.

I've used the the infinite scrolling menu tute at kirupa.com, created my own button graphics, and have a nice scrolling menu. On the buttons, I'm adding an image (which seems to need to be a movie clip to work), so when you rollover the button, the image will spin.

The code for the spinning works. I've tested it on the root frame of a new movie, and in the button of the infinite scrolling menu movie. I've added the code to spin the image on the "over" frame of the button timeline. With the button scene open, I run "test scene", stop it, and move between the frames. When I advance to the rolloever frame, the image spins like a top, but when I test it from the root of the movie, the image does not spin. I've also added a color change "that works" from the root when you rollover the button, but the not the spinning image.

I've added the image by editing the button from the library. I select the image, and add the code inside an onClipEvent(enterFrame) action.

I've also tried adding the code to the keyframe of the root scene in layer 1, and tried calling the image by the full path (_root.one_button.buttons.button1.spin1._rotation= blah) thinking it needs to know exacty where the image(movie clip) is at in the heirarchy to no avail. I've even went back and gave everything an instance name up unto the button I'm trying all this on.


Any help would be appreciated, since I'm about ready to shed tears over this.



Thanks!

-Sam

View Replies !    View Related
OnRollOver() Inside MoveClip Inside MovieClip Doesnt Work
could someone help with this. i dont know why the onRollOver function doesnt work for my submenu button. trace("over main btn") for mainmenu button works fine but trace("over submenu btn"); doesnt work :/


ActionScript Code:
CreateMainMenu = function (x, y, depth, node_xml) {
    var cNode;
    var cItem;
    var cMenu = this.createEmptyMovieClip("mainMenu", 0);
    for (var i = 0; i<node_xml.childNodes.length; i++) {
        cNode = node_xml.childNodes[i];
        cItem = cMenu.attachMovie("mainMenuBtn", "mc"+i, i);
        cItem._x = menu_x+i*(cItem._width+5);
        cItem._y = menu_y;
        cItem.menuname = cNode.attributes.name;
        cItem.node_xml = cNode;
        if (cNode.nodeName != "menu") {
            cItem.arrow._visible = false;
        }
        cItem.onRollOver = function() {
            this.gotoAndStop(2);
            h = 0;
            clearInterval(newInt);
            trace("over main btn");
            subMen = this.createEmptyMovieClip("subMenu",200);
            newInt = setInterval(openSubMenu, 50, this._x,this._y,subMen,this.node_xml);
            }
        cItem.onRollOut = function() {
            this.gotoAndStop(1);
            this.subMenu.removeMovieClip();
        };
    }
};

openSubMenu = function (x,y,clip,node) {
    if(h<node.childNodes.length) {
        subM = clip.attachMovie("subMenuBtn","subBtn"+h,300+h);
        subM.menuname = node.childNodes[h];
        subM._visible = true;
        subM._y = subM._height*(h+1);
        subM.onRollOver = function() {
            trace("over submenu btn");    //<------------- it doesnt work :(
        }
        h++;
    } else { clearInterval(newInt); }
};

var menu_x = alertArea._x;
var menu_y = alertArea._y;
menu_xml = new XML();
menu_xml.ignoreWhite = true;
menu_xml.onLoad = function(succeed) {
    if (succeed) {
        alertArea._visible = false;
        CreateMainMenu(menu_x, menu_y, 0, this.firstChild);
    } else {
        alertArea.alert = "error:  XML not successfully loaded";
    }
};
menu_xml.load("menu.xml");


sample xml file for this menu:

ActionScript Code:
<?xml version="1.0"?>
<menu name="XML Menu">
    <menu name="firm">
        <item name="about" link="http://#"/>
        <item name="portfolio" link="http://#"/>
        <item name="contact" link="http://#"/>
    </menu>
</menu>

does anybody know what is the problem ?

View Replies !    View Related
Rotating Movieclip Inside A Button, Inside A Scrolling Menu Bar
Hi all,

This question is going ignored in some other boards, so I thought I'd try here....

I'm pretty new to actionscript, and I'm kinda moving along; up until now.

I've used the the infinite scrolling menu tute at kirupa.com, created my own button graphics, and have a nice scrolling menu. On the buttons, I'm adding an image (which seems to need to be a movie clip to work), so when you rollover the button, the image will spin.

The code for the spinning works. I've tested it on the root frame of a new movie, and in the button of the infinite scrolling menu movie. I've added the code to spin the image on the "over" frame of the button timeline. With the button scene open, I run "test scene", stop it, and move between the frames. When I advance to the rolloever frame, the image spins like a top, but when I test it from the root of the movie, the image does not spin. I've also added a color change "that works" from the root when you rollover the button, but the not the spinning image.

I've added the image by editing the button from the library. I select the image, and add the code inside an onClipEvent(enterFrame) action.

I've also tried adding the code to the keyframe of the root scene in layer 1, and tried calling the image by the full path (_root.one_button.buttons.button1.spin1._rotation= blah) thinking it needs to know exacty where the image(movie clip) is at in the heirarchy to no avail. I've even went back and gave everything an instance name up unto the button I'm trying all this on.


Any help would be appreciated, since I'm about ready to shed tears over this.

Attached is the zipped fla file



Thanks!

-Sam

View Replies !    View Related
Tell Target / Go To Scene
i have a button within a movie within a movie within the main movie.
i want that button to send the main movie to the next scene names scene2.

ive been using this code and it's not working

on (release) {
tellTarget ("_local0") {
gotoAndPlay ("scene2", 1);
}
}


why?

View Replies !    View Related
Can Not Target Scene HOW?
i seem to be having problems trying to tell a button placed inside a movie clip which is placed in a scene to go to and play another scene WHATS UP WHITH THAT??????????

The main movie has 9 scenes, and each one represents another part of the site, so when i am viewing the scene "figures", the button inside the movie clip placed in the figures scene does not send me to the first frame of the "comics" scene. How can i do this? i tried with _root,_parent, and all.
so, how?

View Replies !    View Related
Tell Target From An Other Scene
I'm having a problem. I have a "back" button in Scene 2 when clicked takes you back to Scene 1. But it also has to tell a MC in Scene 1 (which is on the main timeline of Scene 1) to goto a frame.

But how? I tryed this:

_Scene 1.items.gotoAndPlay(30)

But it doesn't work.

(items is the instance name of the MC)

How should I correct this?

View Replies !    View Related
Tell Target From An Other Scene
I'm having a problem. I have a "back" button in Scene 2 when clicked takes you back to Scene 1. But it also has to tell a MC in Scene 1 (which is on the main timeline of Scene 1) to goto a frame.

But how? I tryed this:

_Scene 1.items.gotoAndPlay(30)

But it doesn't work.

(items is the instance name of the MC)

How should I correct this?

View Replies !    View Related
Again Tell Target From An Other Scene
Help needed.. QUICK!

It didn't work the last time so here it is again.

I have 2 scenes, S1 and S2. When i press a "back" button in S2, it not only has to go back to S1, but it also has to control a MC inside S1 ("items" which is on the main timeline)

This is what I have now:

S2 back button:

on (release) {
set("whichFrame", 30);
_root.gotoAndPlay("labelS1");
}


Frame 1 of S1 (which is labeled "labelS1"):

_root.items.gotoAndPlay("whichFrame")



Because there will be more scenes that have to go back to scene 1 but to an othere frame in "items" it must be done with actionscript..

Can someone help me out here?

View Replies !    View Related
Target From MC To Scene
I have a drop down MC menu made up with buttons dropping down. I'm trying to target the buttons within the menu to the next scene, or a specific scene. It's not working. Any suggestions?

View Replies !    View Related
Target From MC To Scene
I have a drop down MC menu made up with buttons dropping down. I'm trying to target the buttons within the menu to the next scene, or a specific scene. It's not working. Any suggestions?

View Replies !    View Related
Target A Particular Scene
I want to be able to go to and play from a particular scene inside a MC that has been loaded inside of another MC.

is this possible?
attched are the trail FLAs

View Replies !    View Related
To Target A Scene In A Loaded Swf
hey guys..i read all the messages above and feel that there's a lot of u who are knowledgeable on the subject, can neone help me out?

i got some solutions about loading a swf into an MC and then going to a frame label.
it works fine

but how do i go to a frame label on a scene other than the first?
what i want to do is to let the user continue from where he left off by tracking his clicks and storing in database. and then when he comes back he gets a link to his last viewed frame. i plan to assign frame labels and then call them from variables by making the user click on a button with the foll action

- on frame 1 of the parent movie i have:
##
lastmodule = "module2.swf";
lastframe = "Overview1";
##
- on the button the user clicks i have:
##
on (release) {
loadMovie (aa, "_root.callerMC");
gotoAndPlay (2);
}
##
- and on frame 2 i have (for the waiting peroid as some of u have rightly pointed out):
##
_root.callerMC.gotoAndStop(_root.bb);
stop ();
##

Now, if framelabel "Overview1" is in scene 1, it works, but not if it's in a subsequent scene.

flash requires u to enter scene name as a quoted string and not a variable, but the frame label can be a variable as i have done above.

i need to know if we can, in the above setup assign the scene name as a variable as well so that i will keep it in my database and send it to flash along with the last swfname and last frame label.

i'll be really grateful guys if u can provide a soln to this, cuz otherwise i will have to make some huge modules in one single scene!

thanks,
Sammy

View Replies !    View Related
Scene And Target Mouse Help, Please
I have eight scenes on one of my web sites. Every scene shows up except the last one, the e-mail scene. I have the same code on each scene, basically just a stop action. The only time the e-mail page shows up is when I add a /index.swf to the address. Can anyone tell me why that would be?

I also have a problem with the target mouse feature. I can create an object in flash and have it be the mouse, but I'm not sure how to import a small picture and make that the cursor on screen. Any idea how to accomplish this?

Thanks for the imput!!!

Rodney

View Replies !    View Related
Can You Target A Scene From A Get Url Command?
A quickie
I want to click a button to get a url and the file i want to load is a .swf file in the same sub folder.
i.e

on (press) {
getURL ("part2.swf", "_self");
}


Can I target a particular scene in this part2 flash movie that opens... i.e part2.swf scene 3 frame 10???
If so can anyone say how.
Thanks

View Replies !    View Related
LoadMovie...Can Target Be In Different Scene?
Hi,
I am trying to load a file named "portfolio7.swf" into a different scene. The receiving scene is named "porfolio" and the movie clip instance I tageted is named "window".
I seem to be getting confused between levels and targets. Here is the non working code:

on (release) {
loadMovie("portfolio7.swf", "_root.porfolio.window");
gotoAndStop("Portfolio", 1);
}

Any advice would be much appreciated! Thanks in advance.

nick

View Replies !    View Related
Target A Scene From A Level
Why doesn't this work from level2?

on (release) {
with (_level1) {
gotoAndPlay("Main Menu Fall Down", 1);
}
}


I'm trying to play a specific scene on level1 from level2.

"Main Menu Fall Down is a scene and 1 is the frame.

View Replies !    View Related
Target A Scene Within A A Seperate Swf
Hi there.

Can anyone help?

I have a main movie that contains a menu. From the menu headings i wish to be able to target individual scenes within a loaded MC. I am initial loading an swf into a MC holder, then i wish to be able to target a specific scene within the loaded swf!!

Is this possible?

on(release){
loadMovie ("myswfname8.swf", _root.mvClipHolder);
_root.mvClipHolder.gotoAndPlay ("make an appointment", 1);
}

Any help would be greatfully received. Many thanks

Richie

View Replies !    View Related
Target A Scene Within A A Seperate Swf
Hi there.

Can anyone help?

I have a main movie that contains a menu. From the menu headings i wish to be able to target individual scenes within a loaded MC. I am initial loading an swf into a MC holder, then i wish to be able to target a specific scene within the loaded swf!!

Is this possible?

on(release){
loadMovie ("myswfname8.swf", _root.mvClipHolder);
_root.mvClipHolder.gotoAndPlay ("make an appointment", 1);
}

Any help would be greatfully received. Many thanks

Richie

View Replies !    View Related
Tell Target Then Goto Scene?
Ok, here's my problem:

I have a button with this action

on (release) {
tellTarget ("targetclip") {
gotoAndPlay(5);
_root.gotoAndPlay("label");
}
}


What I want is to play the targetclip first THEN goto the other scene.
This script ignore the telltarget and jump directly to the scene.
How do I make it do it in the right order.

View Replies !    View Related
Target Scene Flash MX
I'm trying to get the user to return to the Choose scene after they successfully complete the jigsaw.

I have a movieclip which changes after all pieces have been successfully places to reveal a button saying "next" It is this button that I'm having problems with. The script I have attached is:

on (release) {
gotoAndPlay("choose",1);


}

but this does not seem to work to target the "Choose" scene.

Flash file attached.

I'm sure I've done something stupid but can't see what!

Thanks

View Replies !    View Related
How To Target A Movieclip Within A Movieclip On The Stage (in A Class)
Peepz,

Im building a scroll class which looks like this:

ActionScript Code:
package { import flash.display.Sprite; import flash.events.MouseEvent; import flash.events.Event; import flash.geom.Rectangle; import flash.display.DisplayObjectContainer import flash.display.MovieClip; public class ContentScroller2  {        //eigen code   private var moveSpeed:Number   private var easingSpeed:Number   private var scrollHeight:Number   private var percentScrolled:Number   private var newY:Number            // how much of the movie can be scrolled   private var scrollable:Number   private var initContentPos:Number        // the drag positions that are possible for the mcDragger   private var left:Number   private var top:Number   private var right:Number   private var bottom:Number   private var scrollWheelSpeed:Number        private var _mcContent:Sprite   private var _mcMask:Sprite   private var _mcDragger:Sprite   private var _mcTrack:Sprite      private var dragBounds:Rectangle;   public function ContentScroller2(mcContent:Sprite, mcMask:Sprite, mcDragger:Sprite, mcTrack:Sprite, ease:Number, setDraggerSize:Boolean = false)   {           _mcContent = mcContent       _mcMask = mcMask       _mcDragger = mcDragger       _mcTrack = mcTrack          moveSpeed = 2;     easingSpeed = 5;     scrollHeight = _mcTrack.height ;              // how much of the movie can be scrolled     scrollable = Math.round(_mcContent.mcRegister.height - mcMask.height);     initContentPos = 12          // the drag positions that are possible for the mcDragger     left = _mcTrack.x;     top = _mcTrack.y + 26;     right = _mcTrack.x;     bottom = _mcTrack.height - _mcDragger.height + _mcTrack.y     scrollWheelSpeed = 30;              dragBounds = new Rectangle(_mcDragger.x, _mcDragger.y, 0, _mcTrack.height - _mcDragger.height);          initHorizontal();   }        private function initHorizontal():void     {         // before we do anything make sure the content is even scrollable, if it isn't hide everything and return         if (scrollable<0)         {             _mcDragger.visible = false;             _mcTrack.visible = false             //btnDown.enabled = false;             return;                          _mcContent.removeEventListener(Event.ENTER_FRAME, updateContentPos);         }           else         {             addListeners();         }     }        private function addListeners():void {                          _mcDragger.addEventListener(MouseEvent.MOUSE_DOWN,   draggerDown);         _mcDragger.addEventListener(MouseEvent.MOUSE_UP, removeDraggerEvents);     }        private function draggerDown (me:MouseEvent):void {                          _mcDragger.startDrag(false, dragBounds);                 _mcDragger.addEventListener(MouseEvent.MOUSE_MOVE,   draggerMouseMove);         //_mcContent.addEventListener(Event.ENTER_FRAME, updateContentPos);     }          private function draggerMouseMove (me:MouseEvent):void {         updateContentPos();     }          private function removeDraggerEvents (me:MouseEvent):void {         _mcContent.removeEventListener(Event.ENTER_FRAME, updateContentPos);         _mcDragger.removeEventListener(MouseEvent.MOUSE_MO  VE, draggerMouseMove);         _mcDragger.stopDrag();     }          private function updateContentPos ():void     {         percentScrolled = (_mcDragger.y-top)/(scrollHeight-_mcDragger.height);                 // instead of setting the _y property directly, we simple set newY         // that way we can adjust how we handle the new Y coordinate we'd like to move to         newY = Math.round(initContentPos-(percentScrolled*scrollable));                 trace(percentScrolled)                           _mcContent.y += Math.round((newY-_mcContent.y)/easingSpeed);     } }

i have a code inside my total movie which contains the scroller, the code is:

ActionScript Code:
var myContentScroller:ContentScroller2 = new ContentScroller2(mcContent, mcMask, mcDragger, mcTrack, 3, false)


All the clips like: mcContent, mcMask, mcDragger, mcTrack are on the stage.
To use this MC's well i have to (or maybe not) i have to "re-assign" them in the package like (maybe there is a cleaner and better way?):

ActionScript Code:
_mcContent = mcContent _mcMask = mcMask _mcDragger = mcDragger _mcTrack = mcTrack


but now my final question is how can i target the movieClip "mcRegister" which is inside "mcContent" on the stage? (in AS1 it was like mcContent.mcRegister but that wont work.)
the code in the package is like:

ActionScript Code:
scrollable = Math.round(_mcContent.mcRegister.height - mcMask.height);


Hope somebody can help me out!

Greetz!

View Replies !    View Related
How Do I Target Inside 2 MC's With []?
I have something like this code on the timeline

for(count = 0; count<4; count++){
duplicateMovieClip(mc, "mc"+count, count);

for(count2 = 0; count2<2; count2++){
duplicateMovieClip(mc.sub, "sub"+count2, count2); //the MC sub is inside 'mc'
}

}


Now between that 2nd FOR statement, I want to set the Y position of of "sub"+count2 inside the current MC "mc"+count... how do I do that? Because this["mc"+count].["sub"+count2]._y doesn't work...
The final result should duplicate 'mc' 4 times with 2 'subs' inside them duplicated

View Replies !    View Related
Tell Target / Goto Scene URGENT
i have a button within a movie within a movie within the main movie.
i want that button to send the main movie to the next scene names scene2.

ive been using this code and it's not working

on (release) {
tellTarget ("_local0") {
gotoAndPlay ("scene2", 1);
}
}


why?

View Replies !    View Related
About Tell Target How Can I Talk With The Main Scene
hi all ammmmmmm if iam in a movi clip and i want another movie to play i use this code

tellTarget ("/majed") {
play ();
}

that is ok !!
but the problem is :

how if i am in a movie clip and i want the scene itself

(not the movie clip) to go *****ple to frame 20

i hope i am clear

View Replies !    View Related
Target Main Scene From Loaded In .swf
hello,
I have loaded a .swf into my mainframe, using Loadmovienum(target)
i know have a button in this new .swf, and i want it to tell the Main scene to go and stop frame 4.
Can i do this, if so how?
Thnx

View Replies !    View Related
Target Scene Vs. LoadMovieNum (Levels) ?
A classic newbie question, I'm sure!

I've designed a new site in which I've got my main menu buttons on my 'home' scene.

The loadMovieNum action has been attached to my menu buttons, and each new scene is loaded as an .swf file.

The menu bar still shows up just as it should (along with all other artwork on my main scene) no matter what page I'm viewing.

Problem is, I've had a change of heart in terms of the design for the page. As each menu button is pressed and a new page comes up, I'd like my menu buttons (and other art from the main scene) to vanish.

Here is a great example of the kind of structure I'm looking for:

http://www.mackayandpartners.co.uk/

Once you click on a menu button, you are taken into a completely new environment; which tells me that perhaps the loadMovieNum/levels approach wasn't used, and that a simple Target Scene method was employed.

Any thoughts? Thanks much.

View Replies !    View Related
Linking Movieclip Scene 1 To Scene 2
Hi everyone,
Just wondering how you link from a button in a movieclip in scene 1 to scene 2, this is probably really easy but i can't think right now.

View Replies !    View Related
Accessing A Movieclip On Scene 2 From Scene 1
I am trying to make a movieclip that is located on Scene 2, invisible from Scene 1.

code:
on (release) {
_root.movieclipname._visible = false;
}


Using "_root" doesn't work. How can I do this?

Thanks.

View Replies !    View Related
#1009 Error Movieclip Inside Movieclip Changing The Alpha Property
Problem:
I'm getting this "TypeError: Error #1009: Cannot access a property or method of a null object reference."
What's happening in the flash file is that I've got a movieclip inside a movieclip and when you roll over one of the movieclips the alpha setting for the movieclip inside the initial movieclip is set to 1, then it transitions out back to 0 over a period of time.

var myTween:Tween = new Tween(event.target.parent.ripple_mc, "alpha", Strong.easeOut, 0, 100, 24, false);

It seems to be random but eventually after rolling over the several movieclips on the stage the error comes up. Sometimes the alpha setting stops working and will continue to be visible even though it should have stopped and be invisible after 24 frames.

Would love some help on this.

Cheers

View Replies !    View Related
#1009 Error Movieclip Inside Movieclip Changing The Alpha Property
Problem:
I'm getting this "TypeError: Error #1009: Cannot access a property or method of a null object reference."
What's happening in the flash file is that I've got a movieclip inside a movieclip and when you roll over one of the movieclips the alpha setting for the movieclip inside the initial movieclip is set to 1, then it transitions out back to 0 over a period of time.

var myTween:Tween = new Tween(event.target.parent.ripple_mc, "alpha", Strong.easeOut, 0, 100, 24, false);

It seems to be random but eventually after rolling over the several movieclips on the stage the error comes up. Sometimes the alpha setting stops working and will continue to be visible even though it should have stopped and be invisible after 24 frames.

Would love some help on this.

Cheers,

Sarge

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved