createEmptyMovieClip always below other layers?

FLASH

    Next

  • 1. Creating Dynamic Animation in Action Script
    I need to generate a dynamic animation when a button is clicked. Essentially, I have an image that is located in a movie clip, a joystick that moves that image around, and I have a button that when pressed will remember the current position of the image. The trick is that I then want the user to be able to move the image around and when they push the button again I want it to animate (over say 10 frames) going back to the memorized position. I am currently "memorizing" the position by storing the _x and _y values of the movie clip and then I can generate the needed change simply using the equation _xchange=( _xold - _x )/10 and the same for y and then moving by that distance each step. The problem is that I have no context in which I can seem to make it repeat the animation. If I try using a while loop, it doesn't refresh until after the while loop is finished, and I don't know of any event handler that I can use. (I had been using onClipEvent(enterframe) for some similar things, but that doesn't work in this case because they can exit the boundary of the movie clip. Any advice would be appreciated.
  • 2. the call function
    Hi all, I would like to use the call function. My situation is as follows: - I have an object, from which I want to call a function from another object. Until there, nothing impossible. - However, the name of the function I want to call is inside a parameter. For example, say I have something like this: function updateProperty(object, functionName, property) { functionName.call(object, property); } I want to get this to work, but i can't. Anyone ever used this call function? There must be something I miss, but since the Macromedia doc about that is as nice and complete as usual, I do not see what. Thanks
  • 3. Click outside combo box changes value
    Click outside combo box changes value bot does not call changeHandler (using Flash MX FComboBox) I have a combo box with some values (A,B,C,D,E) This is what I do: 1) I select "A" and the combo boxes changeHandler is called. "A" is selected 2) I go to the combo box again, roll my mouse pointer to "D", do not select "D" but insted click somewhere outside the combo box (not outside the Flash movie though). The Combo box closes and "A" is still displayed as selected. (Note, there is no call to changeHandler as a result of the outside click, this is important) 3) now I ask the combo for the value of "myCombo.getSelectedItem().data". And that's where my problem begins, the value is "D". But is should be "A". ChangeHandler was never called for "D", I never selected "D". Anyone know what can be done about this? With regards Arni Thor Jonsson Software developer
  • 4. How to change the varibale with _root[ ]?
    I have a code : _root.board.area1.point= s I wanna change the areaX to area1, area2, area3...so I tried this way _root["board.area"+k+".point]= s ..(ps. k=1~10) it worked one time then can't be assigned value the second way: _root["board.area"+k].point same result as the first way. the third way var tmpS="board.area"+k+".point" _root[tmpS]=s.... nothing different.............. Could anyone help me? please
  • 5. ComboBox depth below TextInput problem - Flash MX
    Hi, I'm adding several MovieClips on my main timeline, and toggling the visibility of these. One of the MC contains another MC which contains a ComboBox on one line, and a TextInput in the next line. this.tabCustomer.mcChildren.myCombo this.tabCustomer.mcChildren.myTextInput The problem is : When I click on the ComboBox the dropdown appears beneath the TextInput. If I put the MC containing the ComboBox ("children") directly to a frame on the main timeline, the dropdown comes over the TextInput, as it is supposed to. I've checked the depth of the Combo and it is higher than the TextInput. I've tried various things, like adding myCombo directly on the stage in "mcChildren", with attachMovie, with duplicateMovie - nothing works. Any help is appreciated. Thanks! Rittik

createEmptyMovieClip always below other layers?

Postby Carl Fink » Wed, 28 Jan 2004 03:48:06 GMT

I'm using createEmptyMovieClip() to make, well, an empty MovieClip, in which I then draw a TextField using createTextField().

The trouble is, even though I tell the routine to put the empty MovieClip on layer 9999, the TextField appears *behind* items on layer 10.  Is this expected behavior?  Any workarounds?

I did do some web searching and found no other mention of this problem.

Here's the code in question:

	if (this.tipText.length > 0) {
		this.createEmptyMovieClip("the_tip_MC", 9999);
		with (this.the_tip_MC) {
			var clipBounds = getBounds(_root.invisoBackground);
			createTextField("tipText", 9999, 10, 20, 100, 20);
			tipText.border = true;
			tipText.autosize = "left";
			tipText.backgroundColor = 0xFFFFCC;
			tipText.background = true;
			tipText.text = this.tipText;
			myFormat = new TextFormat();
			myFormat.font="_sans";
			tipText.setTextFormat(myFormat);
		}
	}
			

-- 
Carl Fink
Please respond to the newsgroup only.




Re: createEmptyMovieClip always below other layers?

Postby PierreAlain » Wed, 28 Jan 2004 04:05:20 GMT

as far as I experienced, the created movie clip is ABOVE all clips --in the
level it is created--. If you want it easy, create a swf witch will be
loaded level 9999 where you put your code to create the EmptyMovieClip

-- 

Pierre Alain

 XXXX@XXXXX.COM 



Similar Threads:

1.Displaying an swf below an html div layer

I'm trying to get an swf to display underneath an html div, but the browser 
seems to always put the swf on the top-most layer. I read a while back when I 
tried this before that it wasn't possible as the browser would always load 
plug-in content top most, but I notice on thsi site (adobe.com) the menu's are 
html based and display over the promo swf element within the home page. Adobe 
use some fairly heavy javascript to display all the elements to their page so 
trying to work it out from that is a bit hectic - if anyone can tell me the 
principles to getting html divs above swfs that would be much appreciated
 Thanks
 Robin

2.Keeping flash below menu layers

3.createEmptyMovieClip and layer order problem

I have to use createEmptyMovieClip to create a dynamically changing movie
clip, this probem is that, it's always on the top of other movie clips on
the stage.
What can I do to prevent the movie clips not being masked by script-based
movie clip??

Thank you!


4.Looping individual layers independently of others?

so i've created a wide banner with a dozen snowflakes gently falling from top 
to bottom.  i copied each layer (each layer is one snowflake animation that 
follows a motion guide), and then staggered it so a second flake would follow 
the motion guide as the first flake was almost at the bottom.  i could keep 
doing this so that the snowfall looks continuous, but i was wondering if anyone 
knew a way to tell each INDIVIDUAL snowflake layer to loop immediately after 
paying, independent of how far along the other snowflakes were on their own 
paths.   when i try looping just one layer using simple action scripting (i'm a 
TOTAL newb), the flake doesn't fall again until the last of the dozen has 
finished its animation...so it looks the same as when the entire scene loops.  
i'm a bit of a flash retard, so include even the really obvious stuff if you 
have any suggestions :) :) :P

5.controling the layer level of createEmptyMovieClip

I can't get a mc  from the main movie to be on top of a mc that is created dynamically
carry

6. createEmptyMovieClip on bottom layer?

7. loadMovie/createEmptyMovieClip depth layer

8. createEmptyMovieClip and layers



Return to FLASH

 

Who is online

Users browsing this forum: No registered users and 63 guest