MovieClip onRollOver problem

Dear all,

I add the following codes in the frame1 in the main time line, but it did not work when the mouse on the picture 1. jpg


this.createEmptyMovieClip("mc",1);
{with (MC)}
_alpha = 0;
loadMovie ("1.jpg");
}
{mc.onRollOver = function ()}
This ._alpha = 100;
}


Kind regards

Wing

First off when writing code, make sure you try to stay away from the statement 'by' if possible and do not name your login URLs starting with numbers which could cause errors.

But you can find the full explanation to your problem on the loadMovie function in the help files in flash. Which means that you should make sure to nest a movieclip in a movieclip using the loadMovie function and if you load SWFs make sure you use _lockroot = true.

Tags: Adobe Animate

Similar Questions

  • MovieClip depth problem

    LOC1-loc12 is movieclips on the stage, and they seem to be always on top. Even after this.setChildIndex (MovieClip (e.currentTarget), (this.numChildren - 1)) I do not understand why...

    public void mousedown(e:MouseEvent)

    {

    If (loc is false)

    {

    targetArray.push (loc1 loc2, loc3, loc4, loc5, loc6, loc7, loc8, loc9, loc10, l oc11, loc12);

    Loc = true;

    }

    e.currentTarget.startDrag ();

    this.setChildIndex (MovieClip (e.currentTarget), (this.numChildren - 1))

    }

    Index/depths are managed from the lowest to the highest, where the higher index object appears on other items to lower indices.  The line of code you call into question is to bring the object to the index of hioghest... this.numChildren - 1.

  • Have a specific return on the main timline movieclip finished image

    Hello!

    IM doin a project on the main timeline is only mounts. on the first fram ive coded for a button that directs the user to the next section. frame 2 there is an empty movieclip that is suppused to load random movieclips. the problem is when the movieclip it ends a few loops and doesent load a random.

    I have an eventlistener when the movieclip ends and then heads back to the chassis tuned for. but its framework of djemel go one so the user must press the first button again, or he comes in loop the

    I tried googleing the problem and I spent hours hours at least n change the code on n. I can also say that starting iam in actionscript.

    Here is my code:

    maintimline part 1

    Stop()

    addEventListener ("finished", child);

    function Child(e:Event):void

    {

    gotoAndPlay (e.target.frameVar);

    }

    var movieArray:Array = new Array();


    movieArray = ['bananlrdator', 'hundlrkatt', 'fisklrhand'];
    If ((movieArray [Math.floor (Math.random () * 3)]) == 'bananlrdator') {}

    myMovieClip = new bananlrdator();

    } ElseIf ((movieArray [Math.floor (Math.random () * 3)]) == 'hundlrkatt') {}

    myMovieClip = new hundlrkatt();

    } ElseIf ((movieArray [Math.floor (Math.random () * 3)]) == 'fisklrhand') {}

    myMovieClip = new fisklrhand();

    } else {}
    myMovieClip = new fisklrhand();

    }

    var myMovieClip:MovieClip;
    spelastart.addEventListener (MouseEvent.CLICK, scen2);
    function scen2(event:MouseEvent):void {}
    gotoAndPlay (2);
    Stop()

    emptyMC_mc.addChild ("myMovieClip");

    }

    This is my code in the movieclip endframe:

    var frameVar:int = 2;

    dispatchEvent (new Event ("finished", true));

    MovieClip (parent) .gotoAndPlay (2);

    Thanks in advance!

    Here's a working version of the code.  I changed it slightly to add the event listener 'finished' for the clips.  Everything at the bottom is a link to a sample file that corresponds to the code.

    Stop();

    spelastart.addEventListener (MouseEvent.CLICK, scen2);

    function scen2(event:MouseEvent):void {}
    Child();  to start things
    }

    var myMovieClip: *;

    var movieArray:Array is ['bananlrdator', 'hundlrkatt', 'fisklrhand'];.

    Shuffle (movieArray); using a function of brewing

    var indexCounter:uint = 0;

    function Child(e:Event=null):void / / null value allows to call the function without event argument
    {
    If (myMovieClip! = null) removeChild (myMovieClip); remove the current if there is a

    var ClassRef: Class = Class (getDefinitionByName (movieArray [indexCounter]));
    myMovieClip = new ClassRef();
    If (! myMovieClip.hasEventListener ("finished")) {/ / add this condition}
    myMovieClip.addEventListener ("finished", child);
    }
    addChild (myMovieClip);
    indexCounter += 1;
    if(indexCounter == movieArray.Length) indexCounter = 0; Reset the counter when all played.
    }

    function shuffle(a:Array) {}
    var p:int;
    var t: *;
    var ivar:int;

    for (ivar =. Length-1; Ivar > = 0; Ivar-) {}
    p = Math.Floor ((Ivar+1) * Math.Random ());
    t = a [ivar];
    a [ivar] = a [p];
    a [p] = t;
    }
    }

    At the last frame of each movieclip inside, I have...

    Stop();

    dispatchEvent (new Event ("finished", true));

    Here is a link to a sample file that shows it works.

    http://www.nedwebs.com/Flash/AS3_cycle_random_clips.fla

  • Field Variable problem

    Hello

    Overview: I'm having a confusing time to know what is happening with the scope of a project I'm trying. I mocked a version of what I am looking for and have attached all of the code (as follows). I want to access/modify a var that resides on the timeline of a movieclip.

    Problem: a movieclip (called test) lies in the first frame of the main timeline. To the inside of the test on it is the first image it says a var called test. The main scenario I ask what is the value of the tests , and it returns the value undefined.

    Attempt to resolve: I programmed in Java, and it has what they call accessors and mutators methods. I tried to create accessor/mutator functions in the movieclip, but this does not change the error message. I also thought it might be a problem with the worm AS I use. I have MX 2004 (v7.0) and I checked the livedocs to look on to see if I was on the right track. I can say that I am.

    Thank you for the help,

    Here is the code:

    you encounter a timing problem. the code on the first frame of your main timeline runs before the code in the first frame of movieclips attached to the first frame of the main timeline.

    so, if you want to access the variables in the first frame of the movieclip you must wait until these variables are set by expect an advance timeline or launch a loop that checks to see if the variables are defined.

  • AS2 - CS4 unnullify 'Null '?

    I have created a tutorial of card game (well, a small part of what will be a tutorial) and ran into a wall.

    A movieclip has an onRollOver, onRollOut, State delivery and onRelease, each doing different things (go figure). In the State of onRelease, canceled all 3 States so that the movieclip is frozen, i.e. movieclip.onRollOver = null; etc.

    How to disarm the null when you press a reset button (resetBtn)?

    Attached, is an example of my problem.

    Usually I would not null all event handlers, instead I would just disable the clip.

    myClip.enabled = false;

    The events that will prevent shipping.

    Then it is easy to have a function that runs through all your clips (you will need to keep track of them some how) and the property enabled set to true.

    Or you could do the same type of thing with the reallocation event handlers.

    I'm guessing that you initially set up something like this:

    {myClip.onRollOver = function ()}

    a code

    }

    This is not the best practice. You should do it like this:

    myClip.onRollOver = handleOverClip;

    function handleOverClip() {}

    a code

    }

    Then you can easily he reapply by reassigning just the function.

  • Component of the window of loading with button!

    Hello! I found two tutorials that contain two pieces of what I'm looking for, but I can't seem to understand and get exactly what I want. Here's the first:
    leader = 00004289.html & http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveD ocs_Parts

    In the first, the general idea is what I'm looking for. Except that I want to load a movieclip and not an image. My problem in this case is the button component that is used. I have no idea how the skin or customize the button, and I can't find a good tutorial to help me so I thought that perhaps it would be easier to just change the actionscript for this code. I want to be able to create my own key (instance) and use so that when people release this button, the clip is displayed!

    Now in this second tutorial I found:
    http://www.getw3help.com/2008/07/window-component.html

    Its pretty much exactly what I want and it loads a movieclip. Problem is when I add the code of a button, it does not work!

    Can someone help me? I hope I'm clear in my explanation!

    Thank you!

    I rarely use components, so I couldn't tell without research on this one, but a quick look at the help documentation says that he has nothing to control the content.  If your content is attached to the window of viewing area, you may be able to realign this content compared to the registration of trademarks.  The record is probably not in the upper left corner of the content.

  • Help!  Need help translation AS3 to AS2!

    Good afternoon. I have a very simple roll on the animation that I want to use in Captivate 3. However, my experience with Flash is with AS3, which is not recognized by the C3. My code snippet for the event which is not currently supported is attached. Anyone would be willing to tell me where start to do this in AS2 (or 1)?

    Thanks in advance for any help.

    MrFrankZ,

    Here's the code from your first post, and I understand that you want to
    Convert it to ActionScript 2.0 (or even 1.0):

    > gotoAndPlay ("notRolled");
    > rollBox.addEventListener (MouseEvent.MOUSE_OVER, onRoll);
    >>>
    > function onRoll(event:MouseEvent):void
    >>> {
    > gotoAndPlay ("rolled");
    >>> }
    > stop();

    To do this, someone said:

    > He's using AS 2. You can view all the code?

    ... who turns out to be incorrect. The code that you are showing is AS3.
    Signs include the MouseEvent, the MOUSE_OVER event class reference
    constant and lowercase: void reference.

    > The compiler is "the class or interface 'MouseEvent' impossible '.
    > load. »

    It makes sense for a FLA file configured for AS2, because AS2 doesn't
    have a MouseEvent class. Fortunately, this isn't a simple scenario, so let's
    It degrades.

    The first line does not change:

    gotoAndPlay ("notRolled");

    Who does the same in AS2 or AS3; namely, she calls the
    MovieClip.gotoAndPlay () method on a particular MovieClip instance (that happens
    in the timeline, in which this code appears) and sends this movie clip
    Chronology of a framework called 'notRolled '.

    The event handler wiring is your biggest change. It supports AS2
    the addEventListener() method, but only for the components. In AS2, there is
    (surprisingly) five different ways to assign event handlers, including the
    CA will work here - and feel more this AS3 version - looks like
    this:

    rollBox.onRollOver = onRoll;

    In principle, it does the same thing. I'm assuming that optimally is a
    movie clip symbol, so to see what features has available.
    you will look to the top of the class MovieClip in ActionScript 2.0 language
    Reference. When you do, you will see the (features real estate topics
    of the object), methods (things can be) and events (things the)
    object can respond to). An overview is something that the clip will react
    which makes it an event. What I showed you in my suggestion to sample is the
    MovieClip.onRollOver event, as it is associated with your instance of optimally.

    The syntax is different from AS3, but the basic features are the
    even: "optimally, when the mouse over you, perform the onRoll()."
    function ".

    And now for this function:

    function onRoll (): Void {}
    gotoAndPlay ("rolled");
    };

    Only two small changes: a) file the event parameter: MouseEvent and b).
    change: Sub in: Sub.

    Here, he is altogether:

    AS2
    gotoAndPlay ("notRolled");
    rollBox.onRollOver = onRoll;
    function onRoll (): Void {}
    gotoAndPlay ("rolled");
    };

    And to make this work in AS2, all what you have to do is drop the strong
    type (in this case, the: empty):

    AS1
    gotoAndPlay ("notRolled");
    rollBox.onRollOver = onRoll;
    function onRoll() {}
    gotoAndPlay ("rolled");
    };

    David Stiller
    Co-author, the ActionScript 3.0 quick reference Guide
    http://tinyurl.com/2s28a5
    "Luck is the residue of good design."

  • Video clips play in reverse in AS 3.0

    Hey all. I change all my files in AS 3.0 because of a few new elements, I would like to use in flash CS4.
    Here: http://www.iaw-atlanta.com/IvyLeague1-13-09.html I have the bottom navigation menu with 4 buttons. When the buttons are speckled on they go up and when they are mottled the film plays in reverse so they go down. Essentially in the clip, I stopped him, and the next frame gotoAndStop when the button is wriggle on and then have a script of saying things reverse when wriggle on. I know how to do this in AS 2.0, but how can I translate the script to 3.0?

    DjPhantasy5,

    > Ok thanks, I'll see what he also has to say as well.

    In fact, NedWebs pretty much nailed. :) The approach you have taken
    is an interesting question, because it evolves all the way back to Flash Player 5.
    has not yet supported the MovieClip.onEnterFrame event. Without
    event, you need something like your "controller" - a separate symbol
    a loop of timeline - to run the code that depends on the loops of the frame.

    Available from Flash Player 6, this event allows you to
    consolidate your code a bit by putting everything in a unique setting and avoiding
    the additional movie clip symbol. This does not mean that your approach is wrong, by
    any stretching. In fact, it's good to know your options, because if you always
    need to publish for Flash Player 5, you had probably better to use the installation program
    you took.

    I'll demonstrate onEnterFrame in just a bit, in case you want to take a
    Watch this.

    > There is no mention of _root in AS3, but you can use a
    > MovieClip (this.parent) (which replaces what _parent)
    (> used to do) to find something outside the immediate
    > movieclip.

    The term "parent" in this context, is technically a property of the
    The class MovieClip, which means all the clips in AS3 have access to the
    feature 'parent', which points to the timeline that contains the video
    in question. Buttons have also a property 'parent '. In AS2,
    property has done exactly the same thing, only it was preceded by an underscore.

    In fact, the proposed codification of the NedWebs works the same in your existin file.
    Instead:

    Your existing code...
    If {(_root.animation._currentframe>1)}
    _root. Animation.prevFrame ();
    this.gotoAndPlay (2)
    }

    If (_root.animation._currentframe<=1)>
    this.gotoAndStop (1);
    }

    ... you can use this:

    Alternative code...
    If {(_parent.animation._currentframe>1)}
    _parent. Animation.prevFrame ();
    gotoAndPlay (2)
    }

    If (_parent.animation._currentframe<=1)>
    gotoAndStop (1);
    }

    ... because this range - in other words, from this point of view - this
    MovieClip._parent property points to the same scenario as _root done.
    That changes, of course, based on how deeply nested the current scope are.
    The word 'this' in the code above is optional, because Flash understand
    What place you are in. From the point of view of the present code, _parent is
    interpreted as referring to chronology parent of the current, just as scope
    gotoAndPlay() is interpreted to the timeline of the current scope.
    You might precede either of those of 'this' or not.

    Many people will say that _root is probably best to avoid, only because
    It's a slippery slope. It does not always refer to the main timeline you
    think he does, according to whether or not your file SWF is loaded in another
    SWF when running. Meanwhile, _parent * always * refers to the immediately
    relative chronology.

    Then, when you look at this way, this perfectly valid AS2:

    If {(_parent.animation._currentframe>1)}

    ... is not very different at all from its counterpart of the AS3:

    If (MovieClip (parent).animation.currentFrame > 1) {}

    It would be nicer if you need convert the parent as a reference
    Movie clip here, but if you haven't, AS3 do not realize that the scope in
    This is a clip.

    > You can string them along like...
    > MovieClip (this.parent.parent)

    Exactly.

    > Your _currentframe in becomes the controller
    > currentFrame. That's all. The rest of what I have
    > saw will fly as is.

    Not quite. AS3 does not support on() or onClipEvent(), functions
    you will not be able to reach your management code for the button. Instead,.
    you will have to put in a keyframe - you can also do with AS2. There
    a good idea, anyway, because it allows to put all your code in a
    place, making it easier to find.

    Here's a quick word on the direct attachment:

    http://www.quip.net/blog/2006/Flash/museum-pieces-on-and-onClipEvent

    To convert your existing AS3 FLA structure, you could, for example.
    follow these steps:

    animation.buttonMode = true;
    animation.addEventListener (MouseEvent.ROLL_OUT, outHandler);
    animation.addEventListener (MouseEvent.ROLL_OVER, overHandler);

    function outHandler(evt:MouseEvent):void {}
    controller.gotoAndPlay (2);
    };
    function overHandler(evt:MouseEvent):void {}
    controller.gotoAndPlay (4);
    };

    That supports the code on (rollout) and executed in your current
    Version. The first line (buttonMode) is necessary because I got rid of
    the symbol button and, instead, handlers directly associated with
    your movie clip. (Video clips manage events of type button, too, if you)
    do not need the button.) In AS3, event handling is very simple:
    you are referencing the object (here, animation), invoke its hereditary
    addEventListener() method, then passes two parameters: a) the event to
    Listening and (b) the function to execute when the event occurs.

    You can see that noted above. In AS2, there are several ways
    to handle events, including one () /onClipEvent (), so it is harder to know when
    to use what approach. For the buttons and video clips, the principle works the
    same I just showed, but the syntax is different.

    Let's take a look to reduce all this code using the
    onEnterFrame event. First of all, check out this AS2 version:

    animation.onRollOut = outHandler;
    animation.onRollOver = overHandler;

    function outHandler (): Void {}
    this.onEnterFrame = reversePlay;
    };
    function overHandler (): Void {}
    this.onEnterFrame = null;
    This.Play ();
    };
    function reversePlay (): Void {}
    this.prevFrame ();
    };

    This code would appear in box 1. You don't need the controller
    video clip. The movie clip contains more an orb button, because
    We use the animation itself as the 'button '. (You can still see what)
    a feature that any object is looking toward the top of its class. If you are dealing
    with a clip, see the MovieClip class. See the position properties
    to find out what features of the object, see methods to know
    what the object can do and see events to find out what the object can respond
    (to).

    In the code above, it is prepared quite easily. It is AS2,
    don't forget. We have two events, we are listening to: MovieClip.onRollOut and
    MovieClip.onRollOver. these events are set up for the animated film
    clip using the name of the instance and associated to custom match
    functions. The outHandler() function associates a different function to the
    MovieClip.onEnterFrame event of the animation clip. Very simply, it
    load of animation to make the custom function reversePlay() whenever
    He meets an onEnterFrame event. The overHandler() function that kills the
    Association of suppression outside and saying animation to play, via the
    MovieClip.play () method. Finally, the reversePlay() function simply calls
    MovieClip.prevFrame () on the movie clip.

    Here's the AS3 version:

    animation.buttonMode = true;
    animation.addEventListener (MouseEvent.ROLL_OUT, outHandler);
    animation.addEventListener (MouseEvent.ROLL_OVER, overHandler);

    function outHandler(evt:MouseEvent):void {}
    animation.addEventListener (Event.ENTER_FRAME, reversePlay);
    };
    function overHandler(evt:MouseEvent):void {}
    animation.removeEventListener (Event.ENTER_FRAME, reversePlay);
    Animation.Play ();
    };
    function reversePlay(evt:Event):void {}
    evt.target.prevFrame ();
    };

    It seems wordier, but if you look closely, you will see that there
    essentially the same thing. The main difference is the scope of operation in
    AS3. In AS2, there are many references to "it", because the event
    Manager operating in the same scope as the object to which the
    Association is formed. In AS3, the references are not to "that", but rather to
    the same movie clip by his * name *, because in AS3, the scope
    works in the same scenario in which the code is displayed (IE, in this)
    case, the main timeline).

    In the function reversePlay(), in order to emulate a 'this' kind of
    the installer, I refer to the parameter that is passed to the event handler all the
    functions in AS3. I happened to name "TTE" (for the event), but you can call
    it what you like. In the case of reversePlay(), the evt parameter refers to
    an instance of the event class, which has a property to target. The target
    property refers to the object that sent the event - is be
    animation, in this case. Then evt.target, in this context, refers to
    animation, that's what I call the MovieClip.prevFrame () method on.

    I downloaded some FLA files to my server. I keep them
    it for always... maybe a few weeks, from this post:

    http://www.quip.NET/RewindTestAS3.fla
    http://www.quip.NET/RewindTestAS3_new.fla
    http://www.quip.NET/RewindTestAS2_new.fla

    David Stiller
    Co-author, ActionScript 3.0 quick reference Guide
    http://tinyurl.com/2s28a5
    "Luck is the residue of good design."

  • The ActionScript error

    I have worked with actionscript for a while now, but I don't know what to do with it! I'm doing an effect ultra simple passage of the mouse by using the movieclip.onRollOver method.

    IT WILL NOT WORK

    It's a clip inside a movieclip. The movieclip I want onRollOver animation is called aboutStaff_mc, found at dropdown_mc. I made sure that I wrote everything checked correctly in this document, instance names, but nothing will work. Here is what I tried:

    In the main timeline, layer Actions:

    dropdown_mc.aboutStaff_mc.onRollOver = function() {}
    dropdown_mc.aboutStaff_mc.gotoAndStop (2);
    };


    Dropdown_mc backwards, layer Actions:

    aboutStaff_mc.onRollOver = function() {}
    aboutStaff_mc.gotoAndStop (2);
    };


    On the movieclip itself:

    {run}
    gotoAndStop (2);
    }


    Also, I tried to test with onRollOut and onRelease in three places, all with no effect. I did all the codes, on the other hand, work with dropdown_mc (eg. dropdown_mc.onRollOver, etc.)

    If you have mouse for a parent movieclip managers, no child movieclip will respond to mouse because events that the parent intercepts them.

    to remedy, set mouse for the younger generation managers who needs management or use a hitTest() to one of the generations.

  • Problems with mouse over / mouse on movieclip animations

    Hi, I'm a very inexperienced student working on Flash Professional CC for a school project. I'm supposed to be what actually feeling as interactive as possible, so I'll try to adapt to entertainment as much as possible. However, I sometimes take off trying to animate mouseover / mouse interactions using movieclips, they continue buggy. Could someone work for me what is the problem?

    Is it possible to attach my file flash on this discussion, so that users can see what I'm talking about?

    use:

    Stop()

    myInterviewButton.addEventListener (MouseEvent.MOUSE_OVER, MouseOverQuiz);

    function MouseOverQuiz(event:MouseEvent):void

    {

    interviewoveranim.gotoAndPlay (1)

    }

    myInterviewButton.addEventListener (MouseEvent.MOUSE_OUT, MouseLeavesQuiz);

    function MouseLeavesQuiz(event:MouseEvent):void

    {

    interviewoveranim.gotoAndPlay (31);

    }

  • load image link in movieclip problem

    Hello

    turns out the problem is resolved, be rejected to test the animation but it works on the actual swf.

    second problem 'load link image movieclip problem. "

    I have this code, what it does is ask the text input from the user to the "input text" field, there must be a link to an image from somewhere, and then it will load that link (image) in a movieclip on the stage.

    button1.onPress = function() { < < button1}

    var inputText.text = linkText;    < < inputText is the input text field

    trace (linktext);

    loadImage (linktext);

    }

    function loadImage (imageName) {}

    avatarContainer.avatarHeadOuter.avatarHead.loadMovie (imageName);  < < avatarContainer is an mc on stage

    overlayContainer.overlayHeadOuter.overlayHead.loadMovie (imageName);  < < overlayContainer is an another mc on stage

    overlayContainer.overlayHeadOuter._alpha = 15;

    stats. Text = imageName;  }

    When I run the test Movie (ctrl - enter), loadMovie works.

    When I run on real html after publication, loadMovie does NOTHING. He said something like Flash Player has stopped a security operation.

    My wild guess is file html problem? can I do to ignore that secure bs

    problem solved, it turns out that some pictures and some, probably a server does something to protect their images hosted.

  • Create custom components: lack of problem MovieClip

    Hi guys,.

    I've been creating reusable components customized for a while now, but have noticed a problem with one of my components.

    I have two Clips that represent the status of a phone operator, I want to be able to be styled individually; unavailable, available. The two video clips are found in component assets/_private folder in the library, as well as a container that I use for positioning and swapping/addChild/removeChild every two clips. The bin is emptied when the component is loaded, and then depending on the update settings, the relevant clip is loaded in it, using the AS3 class file.

    Now on the real state of the component I have positioned available clip, and one not available does not exist on the stage.

    When I create the hold and run the MXI to package the component in a distributable ZXP file unavailable clip seems to disappear from the packaging.

    Each video clip in the library needs to exist on the stage so that it can be included in the package? Or I can specify which elements should be included.

    Would be great for this answer! Because it is a very confusing subject!

    I have all of the CBC can send on request, cannot appear to download here.

    Concerning

    Charlie

    OK, I found how to fix this.

    All clips must be placed on the stage in one way or another, either inside the container movieclip (should be deleted on common language runtime) or you can simply place all movieclips on the 2nd picture of a layer on the component, as it is disabled when the component is run.

    Hope this helps anyone else having this problem

  • Problems of scaling of movieclip!

    Hello!

    I m continued to develop my first Anglo-French flash application.

    I created a movieclip with a star. This clip has a motion tween, what moves the star on the left and right.

    Now when the mouse clicks the star I want it intensify.

    I m using these simple commands:

    star_mc.scaleX=1.5;
    star_mc.scaleY=1.5;
    

    The problem is that the trajectory is also be resized. As a result, the star is going to move out of of the window. This behavior is logical, but I manage to fix it.

    How can I change only the star and not the path?

    My idea is to hide this movieclip and display a scale in the position of the mouse. However I m not sure of the 'quality' of this solution.

    Is this a good idea?

    Best rgds

    Looks like you need to scale the star inside the star_mc object. You just have the star in a sprite/movie clip (how you want ot do) so that target with the scaleX and scaleY, something like:

    star_mc. Star.ScaleX = star_mc.star.scaleY = 1.5;

  • referencing MovieClip problem

    I'm having a problem trying to get and use the position X to a Movieclip.

    I have a main movie clip (main_mc), which will contain the other video clips inside.

    In one of these clips (view_mc), I have a script that creates a sphere that can turn.

    (it creates inside the clamp so that I can move it)

    I tried passing the x value of view_mc (view_mc.x) in the script to rotate the sphere based on this x position

    but the script does not include the reference to movieclip.

    What I need to do reference to another clip as well //this (main_mc.view_mc.x) gave me an error as well.

    Any help/direction would be appreciated

    If you write the code on the timeline of the sphere, and view_mc is the parent of sphere, parent.x is the correct reference for view_mc.

    If the code is on the chronology of view_mc, the correct reference is this.x

  • PROBLEM changing the value of a variable in my scene movieclip

    Hello
    I have a problem changing the value of a variable in my scene movieclip. I explain: I combobox on my stage containing the categories, and in the scene that I load an xml file containing links to php files that work with the combobox control.
    On the stage I have a movieclip "camera roll" inside this movieclip on the first image I have a php script file selected in the scene of loading. I use a function with a variable load() "theUrl" inside like this: T.load (theUrl);
    In my scene, I want to change the value of "theUrl" within the film of movieClip. I tried filmstrip.theUrl = url; But it does not work

    the xml file
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <slideshow>
    <area title1="10 Last updated" link1="link1.php"/>
    <area title1="special" link1="link2.php"/>
    </slideshow>

    Here is the code on my stage:

    var link1:Array = new Array();
    var LINK:String;
    var url:String;
    var whoOn:Number;
    whoOn=0;
    var x:XML = new XML();
    x.ignoreWhite = true;
    x.onLoad = function(success) {
    var photos:Array = this.firstChild.childNodes;
    for (i=0; i<photos.length; i++) {
    _root.link1.push(photos[i].attributes.link1);
    }
    url=link1[whoOn];
    filmstrip.theUrl=url;//<<--HERE
    };
    x.load("category.xml");
    
    var cbListener:Object = new Object();
    cbListener.change = function(event_obj:Object) {
    trace(select.selectedItem.label);
    if (select.selectedItem.label == "Last updated") {
    whoOn=0;
    } else if (select.selectedItem.label == "Special") {
    whoOn=1;
    }
    url=link1[whoOn];
    filmstrip.theUrl=url; //<<-----HERE   
    };
    select.addEventListener("change",cbListener);
    
    

    Here is the code inside the clip "film".

    var T:XML = new XML();
    T.ignoreWhite = true;
    T.onLoad = function(xml) { 
    etc etc etc }
    
    T.load(theUrl);    //<<---HERE it still undefined

    the code on the timeline of the film should be placed in a function() (or better, move all your code to the main timeline).  but, if you leave the code on the timeline of the film strip, call the function that contains this code whenever the url changes.

Maybe you are looking for