Actionscript 3.0 :: Change The Z-index When User Clicks On One Of Movieclips?
Dec 12, 2011
I am trying to change the z-index when you a user clicks on one of my movieclips. I get this error and am not sure how to resolve it. If anyone has a few minutes to view the code I posted below that would be awesome.
Here is the error I am getting:
TypeError: Error #2007: Parameter child must be non-null.
[Code].....
View 2 Replies
Similar Posts:
Nov 2, 2010
This seems like someting I should already know but I am working on a user interface that I want to be skinable. I have about 8 different graphical elements and I want to change the appearance of these 8 different movieClips just by clicking a single button. I thought I would just create a new keyframe in my main time line and then manipulate the movieClips but that changed the appearance of the movie clip on frame 1 as well. Clarification: I want to change the color of my user interface background and I want to change the color of some clickable images as well. I want frame 1 to have a white background and I want frame 2 to have a red background. Do I need to create more movie clips and drag them onto my stage or can I just use the existing movieClips since all I really want to do is change colors?
View 5 Replies
Jan 2, 2010
If I have several items that move across the screen but the user can click any of them at any time, how do I record the current position of any of the items item in order to use that data to change the position of the item after the user clicks?
This is what I am doing: I have 11 images that slide accross the screen. The user can click any of them at any time. When he clicks one I am scaling the image so it looks like it is comming forward (z axis) and then the rest of the images are scaled down so it looks like they are going back on z axis. So what I am trying to do is get the current position of the image when the user clicks the image so that I can use that to correctly estimate the scaling and moving of the image to make it look like it scales from the center and not from the top left corner. So if have a variable that gets the current position of the image being clicked I'm thinking I can change its position using something like: x = currentposition + -45;
View 9 Replies
Oct 4, 2010
I have a problem with a dynamic video player that I have created in flash. The video player is "SCORM" compliant so that when the user clicks the "exit" button a class file is called to mark the user complete in an LMS.I have tested the SCORM Code previously and it works with out issue. Usually I have the completion code embedded in an Actions Layer of the movie. This is the first time I have attempted to call the completion status in a class file, I have added a "trace statement" when the movie is tested within flash it runs the trace statement properly, but when uploaded to the LMS environment the course does not complete properly
View 3 Replies
May 29, 2007
awhile back I completed the load random swf tutorial provided here on kirupa. But now I want to load specific swf files when the screen is refreshed or when someone clicks on the home or index. here is the code, can anyone point me in the right direction?
[Code]...
View 1 Replies
Aug 22, 2011
I use Flex 4 for writing swf part of my application... So I have some swf files loaded in container, and what I need is allow to change that swf by clicking in it.How can I detect in which swf user clicks?
View 1 Replies
Jun 7, 2009
I'm converting some old Director/Shockwave animations to Flash, and I'm setting up a navigation system. I have a simple animation that runs from from 1 to frame 110, and I'd like it to loop until the user clicks a button. The timeline goes on beyond frame 110 with other stuff. In an "actions" layer in frame 110, I have the following
gotoAndPlay(1);
I thought that this would lead to the looping, but it doesn't. The movie just moves on beyond frame 110. Just as a test, I put the following at frame 110 instead.
stop();
and when I test the movie, it doesn't stop. The commands don't seem to be seen.
View 12 Replies
Dec 11, 2009
I want the ability to go back to frame 1 when a user clicks anywhere on the stage that doesn't contain an object. Is this possible?
View 2 Replies
Jul 14, 2010
What is the best way to delay user mouse clicks?
For example, I don't want the user to be able to click really fast or hold button down (a small delay between firing).
View 1 Replies
Jul 27, 2011
I am editing a template made with as2, flash8 and its controlled externally by a html file. I want to add a gallery when the end-user clicks on a picture. The main problem is the structure of the template. Its like that: There is a symbol named "pages" and in that there are 6 frames which one represents a page of the website except the main menu which is in another symbol. In the 4th layer 3rd frame there are 6 movie clips which are instances of another symbol named "p1_3 copy 2" which is a button and an instance of another button named "but_picts". One of those movie clips i want to make it a link for my gallery. So we there is the movie clips with the following actionscript attached:
ActionScript Code:
onClipEvent(load) {
loadMovie(_root.url + "_portfolio1.jpg", this.cont);
url=_root.url7;
[Code]....
View 2 Replies
Mar 29, 2004
this is probably a really simple code, (it might be javascript i dunno)... but i want a simple 'X' button that will close my window when the user clicks it.---------------------------------------------------
View 2 Replies
Nov 30, 2004
Is there a way to return what's hit when the user clicks? Like if what's hit is a movieClip or a button and so om...
View 1 Replies
Jul 23, 2009
I need to get some color info for where user clicks on the screen. can i use getPixel with an imported image file ? or does it need to be converted to a bitmap?
here is the code im using to import my image
PHP Code:
function loaderComplete(myEvent:Event)
{
var myQueryStrings=this.loaderInfo.parameters;
//Live URL
[Code]....
View 6 Replies
Sep 7, 2011
I have a 400 x 300 video on frame 20 when a user clicks a button named double_btn I want them to go to frame 21 with the video still playing but double the size. Any ideas on how to do this?
View 1 Replies
Mar 2, 2009
I have a flash file.i contains menu bar on top of it.i need to redirect the user if he clicks on the menu item.please help me in acomplish this task
View 1 Replies
Jul 22, 2009
I have a portfolio_mc that is inside of a content_mc (stage->content_mc->portfolio_mc). There are 3 buttons that take the user to an appropriate frame designated by a frame label and this loads up an FLV. The problem is that when I click on any of the navigation buttons on the main timeline, the FLV that is currently playing, is still playing (I can hear the audio). How to stop this.
Here is the code used for controlling the buttons in the motion_mc timeline:
stop();
var naviArr:Array = new Array(btn01, btn02, btn03);
btn01.addEventListener(MouseEvent.CLICK, navigate);
btn02.addEventListener(MouseEvent.CLICK, navigate);
btn03.addEventListener(MouseEvent.CLICK, navigate);
[Code] .....
View 18 Replies
Sep 6, 2010
I'm a student at Drexel University and I just completed a basic platformer for a actionscript class. My professor docked me some points for the game not working until the user actually clicks within the swf. I've heard that this problem is caused on mac osx, but I don't have any concrete evidence to get the points back. Here's a link to the game if you want to check it out.
[URL]
View 1 Replies
Nov 5, 2009
I've made a flex 3 app that is sitting on my web server. People will be able to link to this flex app on my web server on their own sites/blogs/forums and so on. Is there any way I can log where a user that clicks on it comes from? Example: the URL to the flex app is [URL] User A links the flex app at his blog at [URL] Then User B comes in to User A's blog and clicks the flex app and finally ends up at my site. Any way I can log User B's click through the flex app?
View 2 Replies
Dec 29, 2009
I want to put two games in my website but they both start at the same time.How can I get them to start separately when the user clicks them?
View 1 Replies
Nov 15, 2011
I'm soon to be launching an Adobe AIR desktop app. To make the best out of future updates I need to get analytics of which features get used the most and which not. How to track what the user clicks?
View 2 Replies
Jun 25, 2009
I am trying to create a slider component where the thumb does not display until the user clicks on the bar. When the user does click on the bar the thumb would appear wherever the mouse is on the bar. I have no experience with the display package and since I am pretty new to using flash in general I cant think of any other creative way to do it. How to make objects display and display where the mouse is clicking.
View 0 Replies
Jul 1, 2009
I want to have different ContextMenus appear when the user right clicks on different objects in my application. Right now, I define a custom Context menu in each different class that needs a unique menu. This works, but seems unnecessary.Is there way to centralize this so as to handle all ContextMenus globally? Im looking for something similar to how you can handle click events globally by determining the type of the target.
View 0 Replies
Jul 7, 2009
I have an opening screen which asks the user to enter the first name and then they click the "start" button.This then loads an external swf into it and it starts a quiz on a timer.All that works except that the timer starts sometime during opening swf.I'm not sure if it's when the main swf is loaded or if when the user clicks in the input box but it is definitely not when the user clicks the "start" button like I have programmed.I even tried to stop the timer until the user clicks a button on the second swf (the external swf that is loaded into the main swf)[code]In the loaded swf I have a clock_mc that holds the timer.the first frame has a simple stop(); and the second holds all of the code that makes the clock run.I then have code setup so that when the user clicks a button the clock_mc.gotoAndPlay(2)[code]
View 5 Replies
Jan 13, 2010
I am using an array to load flvs when a user clicks a button, however the scrubber (seek bar) doesn't reset back to the beginning of the next video and the play button turns to a pause (meaning the user has to notice that and click the play button, which I don't want them to have to do). Is there a reset function that I can use for the seek bar and a way to keep the play button on and not switch itself to pause?
Code: Select allimport flash.events.*;
import fl.video.*;
//display.bufferingBar = bufferingBar_mc;
[code].....
View 6 Replies
Mar 29, 2010
I have an animation made on After Effects and I want to know how to trigger each step of my animation as a user clicks on a button.
If the user clicks on contact my animation would go to the contact animation.how do I do that?
View 3 Replies
Jan 1, 2005
i am working on a website where i want certain images to load whenever a user clicks on a thumbnail. I want a preloader to appear before the image is displayed. I created this so far:
[Code]...
View 1 Replies
Apr 5, 2006
I'm in the process of planning out my web portfolio website. The situation at hand right now is learning how to do a zoom tween via actionscript. I want to learn more actionscript tweens and get away from tweening using keyframes/frames - as this creates Huge file sizes. So I'm trying to be more efficent and keep file sizes down. Basic idea is I have a background image with 3keypoints (movieClips) that the user can click on. Once you click on these the camera will zoom and pin-point whatever movieClip has been selected.
Here's what I've been able to see so far. By applying this script to each separate movieClip it zooms in on the image or particular part of that image correct? How would I modify this so that it zooms when the user clicks the appropriate movieClip. I got this from from here and I have also seen and read the Kirupa Tutorial about the starfield/racecar game etc. But it doesn't sink in without examples right in front of my face. And to reverse the zoom when the user wants to (un)zoom back out would I switch the
_xscale = _yscale += speed;
to
_xscale = _yscale -= speed; ??
onClipEvent (load) {
speed = 2; //speed of the zoom
} onClipEvent (enterFrame) {
_xscale = _yscale += speed;
//does the zoom
_x -= 1;
_y += 2.5;
//this moves the movieClip down and to the left so it leaves the screen entirely
}
View 2 Replies
Feb 6, 2008
I have a few flv component instances on different frames. When you click a navigation button the current flv should stop and it takes you to a new flv on a different frame. But the previous one keeps playing. How do I stop the current one playing when the button clicks?
View 6 Replies
Nov 17, 2009
I have a text input box inside a movieclip. I want to detect when the user clicks inside and open up a modal window with the full form. I use the following line of code:
Code:
this.addEventListener(FocusEvent.FOCUS_IN, _onFocus);
And it works fine, but just the first time. When I close my modal window without entering any information and click on the input form again, nothing happens. The listener is there, but nothing happens. My guess is because the focus is already there. Should I be using another listener? MouseEvent.CLICK is not what I'm looking for because I only want the window to fire when inside the textbox is clicked, not the whole thing...
I also tried
Code:
stage.focus = null;
and it also doesn't work.
View 4 Replies
Jan 14, 2011
I am new to actionscript 3. I have created buttons with up/over/down states. The button changes colour during the over/down frames.How do I keep the over or down state active until the user clicks another button?
Right now when the user puts the mouse over the buttons, they change colour, but it goes back to the original colour once they click off. I would like it to remain on the changed colour so that the user remembers which button s/he's pressed until the another one is clicked.I came up with the following code in actionscript 3 and got it to partially work:
ActionScript Code:
btn1.addEventListener(MouseEvent.MOUSE_UP, startTransparent)
function startTransparent (e:MouseEvent):void{
btn1.alpha = .6;
}
So when it's in the down state, I get the transparent state and stays there. But how do I get it back to normal when the user clicks on another button?
View 7 Replies