ActionScript 2.0 :: Set The _alpha Property Of MC1 And MC2 Depending On The Location Of The Button On The Slider

Mar 27, 2004

In the library, I have a movie clip - DraggableButton that has OnPress with StartDrag with parameters and OnRelase with StopDrag. I have a slider with this Draggable button and a bar to slide the button on. I also have two movie clips Clip1 and Clip2. In my main movie I have two instances MC1 and MC2 of Clip1 an Clip2. I have an instance of the Slider. I want to set the _alpha property of MC1 and MC2 depending on the location of the button on the slider.

I think I need to save the location (_x) of the button on the slider in a variable in the OnRelease even of DraggableButton and use this variable in the SetProperty method. I need to know in which event and which object's event should I use the SetProperty method. Or if what I am thinking is not correct what do I need to do?

View 4 Replies


Similar Posts:


ActionScript 1/2 :: Change Movieclip._alpha Depending On Volume Output Of Music

Dec 24, 2011

how to change the volume, asking how to detect the actual volume (not the set 100 volume) of music/sounds. does flash even detect the actual volume output? So when the volume is 0 (e.g. maybe at the end of a song) the ._alpha is 0, so all I need is a variable for the output volume of a song.

View 1 Replies

ActionScript 2.0 :: When A Button Is Pressed It Will Move To The Specified Location And Then It's Alpha Property Will Be Zero?

Mar 20, 2009

Basically I have a MC called "__root.T1" that when a button is pressed it will move to the specified location and then it's alpha property will be zero. the alpha property to the functionstartEasing(_root.T1, 50.4, 161.9, 10);

function startEasing(object, endX, endY, frames) {
yourTween = new mx.transitions.Tween(object, "_x", mx.transitions.easing.Regular.easeInOut, object._x, endX, frames);

[code].....

View 2 Replies

ActionScript 2.0 :: Fade In/ Out Depending On Location?

Mar 2, 2010

I am looking for a way to fade in and out a movieclip when you are at the location of the container (where the external swf is loaded) or around the container (margin) but i cant get it to work as i would like to.example of my goal is:if location _x = 1600 (with a marging of 200px) and location_y = 0 (with margin of 200px) container.about is tween alpha 20 to alpha 100else container.about = alpha 20i have a simple script that i can put in every container mc but this worksonly within the size of the movieclip and works on de position of the mouse on the screen, so actually not what i want. Here it is:

Code:
onClipEvent(enterFrame){
if ( this.hitTest(_root._xmouse,_root._ymouse,false)){

[code].....

View 3 Replies

ActionScript 3.0 :: Error - Swf File Plays Differently Depending On Location?

Sep 16, 2010

I've run into a strange error and I was wondering if anyone had experience with this.I'm working on a flash platforming game and I recently released a demo. I was having a problem with the getting the file to play correctly when I noticed an error:The file plays differently depending on where the file is saved. For example:Platform Explorer (http://jrjellybeans.net/platformExplorer.swf).This file runs fine. Platform Explorer (http://jrjellybeans.net/flashGames/platformExplorer.swf).This file opens up the level editor. Yet, I make no call to the level editor anywhere in this particular file.The thing is that the files are EXACTLY the same. Just saved in different locations.

View 2 Replies

Professional :: Button File Opens In Saved Location / But Won't Open In New Location

Aug 21, 2011

I created a simple button that displays an error messeage: "error opening 'url" when I test the movie, but does play and opens in browser after publishing. However, it won't open in the browser in a different location. I pasted the html code in a web page but it doesn't work there nor opens in the browser in a differnet location from where it was originally published and saved. Why is that?

View 13 Replies

ActionScript 2.0 :: If _alpha >= 100 Do This, If _alpha <=0 Do This?

Feb 25, 2004

I have a movie clip (dnk) 7 (not key!)frames long, with 7 different objects (mc's) inside, named dnk0-dnk6.Then, on the mc (dnk) I have:

onClipEvent (enterFrame) {
strDnk = "dnk"+(_currentframe-1);
alpha = getProperty(strDnk, _alpha);[code]...

So, the idea is, to have this mc's (dnk0-dnk6) fading one after the other in a sequence. Which happens as it is supposed to, but what I am trying to do now, is reverse it. With no luck, as you can see from the top script .I was thinking about a solution in a way of telling when _alpha is below 0, than the _alpha would start to rise, until it reaches a hundred, then it would start to fall again.

View 2 Replies

ActionScript 2.0 :: Changing The Function Of A Button Depending On Previous Button Press?

Mar 14, 2007

I'm loading in 5 jpegs from an external file using "loadMovie" and i have 5 corresponding buttons (1-5) to load them with.

I want to change the jpeg the button loads in depending whether a separate navigation button has been pressed -

i.e.

navigation buttons:

-motorbike pics
-car pics
-lorry pics

If a user clicked on "car pics" then the loading buttons 1 to 5 would load "car1.jpg", "car2.jpg" and so on...

similarly if the user clicked on "lorry pics", the same loading buttons 1 to 5 would load "lorry1.jpg" and "lorry2.jpg"

View 1 Replies

ActionScript 3.0 :: Load Different Swf Files Depending On Button?

Apr 13, 2009

im starting to get the hang of 3.0 now.. but i have a little problem loading different swf files related to witch button i click..
 
everything works just fine. when clicking on a button the movie plays and its listening for the end of each video playing.. but i cant get it to load different swfs depending on witch button is clicked. is it possible to do this using the same loader as i do now?
 
heres my code:
 
var compact:String = "axesse_mc.swf";var compactreq:URLRequest = new URLRequest("axesse_mc.swf"); 
var loader:Loader = new Loader();loader.load(compactreq);

[Code].....

View 3 Replies

ActionScript 2.0 :: Button That Will Pop In And Out Depending On The Rollover And Roll-out?

Aug 26, 2004

Im having some trouble with this code. I have a button that will pop in and out depending on the rollover and rollout. but then i want it to get and external swf when released. this is all done with smartclips if that matters.

[code]...

View 1 Replies

ActionScript 3.0 :: Code A Button With Actions Depending On Timeline?

Jul 28, 2009

I am like a new-born-newbie when it comes to Action Script 3.0 (or any other version for that matter). I've been trying to learn it by myself for the past week and a half using manuals and other sources but it's not so easy as there are many concepts that take some getting used to (I've never done programming before). So I ask of anyone who is kind enough to give me a hint or point me in the right direction. I am sure this will seem like a very easy and probably stupid question for the well-informed but it has been eluding me for the past 4 days.

I am making a website (I should say it's pretty much finished except for this one detail) it's simple and short. Nothing very fancy. There are 8 buttons in total for the main navigation (4 buttons in English and 4 in Chinese, each language group in their own set of frames)

the button that serves as a link to the Chinese translated version of the site is supposed to go to a particular page, depending on which page the user is in at the moment (example: if it is in the portfolio page in English, when clicking on the Chinese button it should go to the portfolio page in Chinese and so on). Likewise with the English button in the Chinese version pages.[code]...

View 4 Replies

ActionScript 3.0 :: Moving A Scroll Button Depending On Content.y?

Jun 8, 2011

I have a fully functioning scrollbar (MOUSE_DOWN and MOUSE_MOVE) and a fully functioning mouse wheel scroll. But I would like some code to move the scroll button according to my contents y position, when using the mouse wheel scroll.My scroll bar code:

ActionScript Code:
thumb.buttonMode = true;
thumb.visible = false

[code].......

View 0 Replies

ActionScript 2.0 :: Disable Button Depending On AttachMovie Status?

Mar 30, 2006

how to use attachMovie to load a movieclip in to my main stage, drag it around and include a close button. I then added a variable (x) that would control which clip would on top depending on which was clicked last.

The question bit... I've managed to do this (...sort of), but was wondering if anyone could hint me with the code to disable the button if the clip is loaded, and enable it as soon as the clip has been closed so that it may be opened once again?

I'm using this to load the clip where x is the variable;

Code:

on (release) {
attachMovie("new", "newname1", x);
newname1._x=200;

[Code]....

View 3 Replies

ActionScript 2.0 :: Change The Frame Depending On Which Button Was Pressed?

May 1, 2003

The first prob I had was when i used the load movie command the swf file was loading in the wrong position, it kept loading down and across the page. I had

PHP Code:

_root.myemp.loadMovie("banner.swf", 0); 

I dont know why this is happening but I just fixed this by doing:

_root.myemp._x = 0
_root.myemp._y = 0

The next problem Im having is that I want to change the frame depending on which button was pressed. If button two was pressed I wanted to load "banner.swf" and gotoAndStop("pg2"), If button three is pressed gotoAndStop("pg3")Ive tried some things but cant get this part right such as:

_root.myemp.gotoAndStop("pg2")
"banner.swf".gotoAndPlay

I just dont know the syntax...

View 2 Replies

ActionScript 3.0 :: Call A Function And Run It With Specific Properties Depending On Which Button Is Clicked?

Nov 25, 2008

How would I do this in AS3? I want to call a function and run it with specific properties depending on which button is clicked.So how do the "_this" statement work in as3? in as2 I would write something like this and "this" would stand for the instance name:

View 2 Replies

ActionScript 3.0 :: Play A Certain Part Of MovieClips Timeline Depending On The Button Pressed

Nov 22, 2010

Right I only want to play a certain part of my MovieClips Timeline depending on the button pressed.

ActionScript Code:
stop();
CircleLineMC.KingsCross.addEventListener(MouseEvent.MOUSE_DOWN, KingsCrossBtn);
function KingsCrossBtn(event:MouseEvent):void {
BigSquare_MC.gotoAndPlay(1);
}

But I want it to play only up to frame 50 and then stop there and then loop instead of playing the whole timeline, does anyone know How to do that.

View 6 Replies

Professional :: How To Move A Button Location

Sep 2, 2011

On a key frame event I want to move a button i have 130 pixels to the left, how can i move the button in such a way?

View 8 Replies

ActionScript 2.0 :: Call Button From Another Location?

Nov 26, 2007

I have a nav bar with buttons that change pages and such, but I also want another button that goes to the same pages. The button loads a random image and then I want it to call the appropriate button it is in the nav bar.[code]...

View 1 Replies

ActionScript 3.0 :: Create A Slider To Control Frames In A Movieclip Error 1009: "Cannot Access A Property Or Method Of A Null Object Reference"

Oct 27, 2010

I am using this method to create a slider to control frames in a movie clip.

[Code]...

The slider works well when I'm in the scene that contains the slider. When I go to a scene that does not include the slider, I get the following output error. TypeError: Error #1009: Cannot access a property or method of a null object reference. How can I stop the stage.add.EventListener when I navigate to other scenes that don't include the slider. This is my first as3 project. The project functions as it should but I don't know if the output error will cause problems later.

View 3 Replies

ActionScript 1/2 :: Make An Object Tween From Its Starting Location To The Location Of A Mouse Click?

Apr 27, 2009

I am trying to make an object tween from its starting location to the location of a mouse click. I have a script, but it has a very annoying ease to it.I would LIKE the object to mantain a certain speed during while traveling from its starting location to the mouse click location.

View 16 Replies

ActionScript 3.0 :: Button Events Frame Location ?

Nov 17, 2010

am developing a multiple choice question answer. I have a movie clip in frame 2 where the radio buttons and question choices are displayed.I am trying to define a event for the radio button in the movie clip's first frame. But i show questions in random order. Say for example the first question to show is fifth I move the movieclip to 5th frame. The event is not firing since it is declared in the first frame. Should i place the button event code in each and every single frame or is there anyother option for this.

View 2 Replies

ActionScript 3.0 :: Current RemoveChild Button Location

Apr 8, 2010

I've got scrpt that switching movie clips inside container_mc and i want to add button inside all that movie clips that will remove current displaying movie clip. When it will be removed i want to be able to choose in navigation any movie clip to display. Here is my navigation script:

[Code]....

View 3 Replies

ActionScript 2.0 :: Load Movie From Button To Another Location?

Aug 5, 2009

If you click on one of the images of the employees I would like it to load another movie into the location above where the image of the bird is. The swf with the employee photos is a series of buttons within a movie clip within another.

View 0 Replies

ActionScript 3.0 :: Using A Slider Component As A Button?

May 25, 2011

I've got what to small problems when using my slider component.I'm building a small quiz and I am using the slider component to let the user rate their opinion. It'd be great if I could make the slider play the movieclip (to the next quiz questio) when the user has cast their opinion -on mouse up. Is this possible.Also I'm using a 'score' uint variable to collect the polling results but I need this variable to reside on the root of my flash file so that I can add to it from various diffrent movieclips. How can I target the variable from a movieclip.Heres my code:

import fl.events.SliderEvent;
voteSlider.value = 5;
voteSlider.addEventListener(SliderEvent.CHANGE, voteCast);[code].....

This is what i would like to target in the root

var score:uint = 0;

View 1 Replies

ActionScript 2.0 :: Use A Loader In Button To Load Images From Another Location?

Oct 6, 2009

I am using loaders to load .swf files from another folder to save on load times. When I switch the loader to another .swf file in the next frame, they all go blank.Also, is it possible to use a loader in a button to load images from another location?

View 0 Replies

ActionScript 2.0 :: FMX Click On Button And Image Eases To Location?

Feb 13, 2003

How can i duplicate the effect found here? I want an image that eases into location when pressed.

View 7 Replies

ActionScript 3.0 :: Flash Button Events Frame Location?

Nov 17, 2010

I am developing a multiple choice question answer. I have a movie clip in frame 2 where the radio buttons and question choices are displayed.I am trying to define a event for the radio button in the movie clip's first frame. But i show questions in random order. Say for example the first question to show is fifth I move the movieclip to 5th frame. The event is not firing since it is declared in the first frame.

View 1 Replies

Control A Movieclip Playback With A Slider Button?

Apr 8, 2009

Is there a way to control a movieclip playback with a slider button? Just like a video player but scripted to control an internal movieclip playback in the SWF.

View 1 Replies

Flash - Create Image Slider Like Nivo Slider With Builder

Jan 10, 2012

I'd like to build image slider like Nivo slider with Adobe Flash Builder.

i'd like to have image controls, image titles displayed above the image(like layers in flash). i'd like to read the data from xml.

i'd like to have nice transitions between images.

mayebe u can provide tutorial or source code.

View 1 Replies

ActionScript 1/2 :: Scripting A Button To Move Smoothly To A New Location On Click

Jul 30, 2009

I got a project I'm working on where i have a bunch of buttons that i wan to move to a new location when clicked and then go back when clicked again. Im sure its not as difficult as i think im just not so good with my code. Id rather not have to do 30 individual animation if i dont have to.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved