ActionScript 3.0 :: Link A Scrollbar To Two Targets?

Oct 19, 2009

Is it possible to link a scrollbar to two targets?

In other words, I want one scrollbar to scroll two textboxes at the same time.

If I do it with the component inspector window I cannot get it to work. Is it possible to do this in code?

I know I have the option of using a scrollpane but I am trying to avoid this because the way the code is already set up.

View 0 Replies


Similar Posts:


ActionScript 2.0 :: Scrollbar Targets The Dyanmic Text Field?

Jan 5, 2004

i used claudio's scollbar component but he uses an external .txt file. I dont want to load text externally but inside the fla doc.The scrollbar is bascially a long rectangle bar and a smaller rectangle as the dragger like the one on [url].....I have given the text field an instance: "textarea" with already visible text inside the dynamic field area.If claudio or anyone else could tell me how to modify the (as) so that the scrollbar targets the dyanmic text field and still retain its scrollease properties.

(first frame)
[AS]
fscommand("allowscale", "false");[code].....

View 7 Replies

ActionScript 2.0 :: Get Horizontal Scrollbar Gallery Images To Link To Different Urls?

Dec 9, 2008

I�m trying to get my horizontal scrollbar gallery images to link to different url�s, but having some trouble getting more than one url to open, they all link to the same site.

View 5 Replies

ActionScript 2.0 :: Convert This Vertical Scrollbar Into A Horizontal Scrollbar?

Apr 26, 2009

how I would convert this vertical scrollbar into a horizontal scrollbar

heres the code:

onClipEvent (load) {
diff_y = bound_box._height-scroller._height;
bounds = bound_box.getBounds(this);
top = bounds.yMin+(scroller._height/2);
bottom = bounds.yMax-(scroller._height/2);

[code]....

View 3 Replies

ActionScript 3.0 :: Add Targets During A Game?

Aug 4, 2009

I am trying to improve a basic paddle ball game by adding one or more targets to be hit by the ball during the game. The idea is targets appear and then when hit by the ball, the player's score is incremented then target is destroyed.

The problem is that a test for collision of ball with target gives an error during compile time as the target does not exist yet. On declaring the target at the start of the game but adding to the stage after a time, still creates the target at position (0,0) as follows[code]...

View 3 Replies

IDE :: Drag And Drop With Targets?

Apr 9, 2009

I followed kirupa's drag and drop with targets tutorial. I want the clock in my fla file to get bigger when it touches the bar. How can i do this?

View 7 Replies

ActionScript 2.0 :: Two Drop Targets At Once?

May 18, 2007

I'm using this actionscript at the moment:

Code:
if (_root.pin2._droptarget == "/container/mcDraw"){

but is it possible to have two droptargets so that the actions are only carried out when the drag object is dropped within the bounds of two different movieclips? i.e when all three are overlapping.

View 1 Replies

ActionScript 2.0 :: Multiple Targets For SetScrollTarget?

Oct 31, 2002

Does anyone know if there is a way to have 1 scrollbar scroll more than one textfield? (I'm trying to create a shadow in my textfield thisway, but the scrolling seems to cause some problems here..)

View 3 Replies

ActionScript 3.0 :: Lock On To Multiple Targets?

Jul 31, 2009

This is for a fretboard type game, I want six dots (fingers) to lock on to any of the 6 targets. This code doesn't seem to work, instead of locking on to each target, the fingers lock on to the last one (target6_mc) and whenever they are droped over the other targets, they just locks on to target6 again. any suggestions? Excuse the noobness

Code:
package
{

[code].....

View 3 Replies

ActionScript 3.0 :: Assigning Same Name To Multiple Targets?

Feb 3, 2009

I tried the drag and drop demo at [URL]. It works well allowing me to drag an item and have it register when it is dropped on the correct target. I want to modify it so that I can drag an item to multiple locations... not just one. My desired application is the ability to drag pendents or charms onto a bracelet or chain and have them "snap" to the chain. With the above demo, I can see how 90% of it would work, but I cannot figure out how to have multiple targets named the same. The bulk of the code is attached.

The line I believe needs to changed is this one:
if (event.target.dropTarget != null &&
event.target.dropTarget.parent == myTarget){
I need this part :event.target.dropTarget.parent == myTarget
to read something to the affect of:
if item being dropped is over object A OR object B OR object
C OR object D than ... rest of my code

View 7 Replies

ActionScript 3.0 :: Drop Mc On Multiple Targets?

Mar 18, 2010

I want to create a drag and drop app that will allow the user to drop mc onto either one of two correct targets.I gave the targets the same instance name but that doesn't work.The program only recognizes the first target mc created as correct.How can I make either target the correct one?

function dropIt(event:MouseEvent):void [code]....

View 8 Replies

ActionScript 3.0 :: Drag And Drop Onto Targets?

Jul 3, 2009

I was wondering if anyone could help with a problem i'm having with flash. I have been given a flash file to edit - creating a drag and drop feature. I've 10 move clips that have to be draged onto the right target. I've given instance names to both the targets and movie clips that have to be dragged. I've used flash for quite a while now, about 4yrs but still get muddled up with actionscript. I've added the following code to one of the movie clips to be dragged and the error below is displayed - The class or interface 'MouseEvent' could not be loaded function drag(event:MouseEvent):void{

[Code]...

View 1 Replies

ActionScript 2.0 :: Multi HitTest Targets?

Jul 24, 2009

I am currently making a game involving matchsticks. i have the dragging of the matchsticks working. But now i would like to know how to check if 2 (or more or less depending on what level) of the possible matchsticks are dropped on the target. When the right matchsticks are drop in the right places i will put in an action like "gotoNextFrame" or make the continue menu visible.

View 9 Replies

ActionScript 3.0 :: Way To Have The Ball Hit Multiple Targets?

Jul 27, 2009

I'm running a hitTestObject for when ball hits target1 - The working code works great below.

Is there a way to have the ball hit multiple targets? Instead of hitting just target1 can it return when it hits target1, target2, target3..etc.

[Code]...

View 2 Replies

ActionScript 2.0 :: Drag And Drop To Targets?

Oct 21, 2009

I am presently working on a project that has a map of a country and it needs to be assembled (like in a puzzle game). And an action(like an appreciation) has to appear when the correct piece is placed in correct slot/target....if the wrong piece is placed--the piece has to move to the Previous position.

View 1 Replies

ActionScript 3.0 :: HitTestObject With Multiple Targets?

Nov 16, 2011

simply set: I do have a dragable movieclip (mcMagniDisplay) which is generated on the fly while initializing all my variables ... and I do have 4 circles (mc_boxXHitCircle) which are already placed at the bottom in the stage in advance.All I need to do is check, wheter the mcMagniDisplay is hovering one of the circles or not.

********************** code snippet ***********************
var mcMagniDisplay:MovieClip = new MovieClip();
stage.addEventListener(Event.ENTER_FRAME, hitTest);

[code]......

View 5 Replies

ActionScript 2.0 :: Drag And Drop Targets?

Aug 4, 2003

here is the code i have,

on (press) {
startDrag (this, true);
}

[code]......

View 4 Replies

IDE :: Drop Targets Not Working After Mc Put Into Container?

Feb 25, 2010

I have produced a Flash movieclip, containing a fair few layers, including masked layers, actionscript etc. One of the things it does is allows the user to click and drag a number of movieclips and drop them anywhere within the mc, but if they drop them on specific drop targets then some actionscript kicks in, stops the drag object from being draggable again and advances through its frames to basically 'enlarge' the drag object and play a sound to show the user they've hit the right mark.

This all works perfectly on its own, or in a browser window etc.

The problem I have is when I try to insert the Flash movie into an Adobe Captivate 4 e-learning package. Things work ok apart from when you drop the dragged object onto a drop target, nothing happens. The actionscript doesn't execute.

Would the fact that the movieclip is (probably) sitting within a container (the Captivate e-learning package)? If so, how do I get around this issue?

View 1 Replies

Use Photos Of Family Members Instead Of Paper Targets

Feb 3, 2011

i am trying to create a game for my family website, it will look the picture below but instead of paper targets i want to use photos of family members. I have no real flash experience, could somebody give me a good starting point.

View 1 Replies

ActionScript 3.0 :: Drag And Drop To Multiple Targets?

Oct 5, 2011

I have created a simple drag and drop game with 4 signs to be dragged onto 4 targets. As two of the answers are the same I need to be able to have the possibility of both signs to be dragged onto either target.

Quote:

stop();
// Second Level Quit button
// loads second.swf in again
quit_mc.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_2);

[Code]....

View 1 Replies

Professional :: Drag And Drop To Multiple Targets?

May 11, 2010

Im trying to create a simple drag and drop app where you can drap a movieclip into multiple areas.This is the code i have so far (taken from a tutorial i found) thats works perfectly for 1 target but not for multiples. I initially tried giving the targets the same instance name but that didnt work.
 
stop();var startX:Number;var startY:Number;
square_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);square_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);
function pickUp(event:MouseEvent):void { square_mc.gotoAndStop (2); event.target.startDrag(true);

[code]....

View 6 Replies

ActionScript 3.0 :: Drag And Drop With Multiple Targets

Sep 17, 2010

I'm having a problem find a solution to my drag and drop problem. Here is what this flash piece is basically supposed to do: 9 dragable items on the stage5 targets, numbers 1 - 5, where the items can be placed5 of the 9 dragable items are the correct answer and the user needs to drag them to the correct target, and have to be in order from 1-5. (eg. let's say the instructions are: Please place the, in the correct order, the 5 steps to getting ready in the morning.
Drag items Targets
Brush teeth 1.
Change oil in car  2.
Wash Face 3.
Put pants on 4.
Shower 5.
Get out of bed
Do tax's

So far I have it so if you drop the correct answer into its correct target it snaps to it and disable it's eventListeners. If you drop the drag item on the other targets they snap to it and disable it as well. They only problem is if the user accidentally drops the item anywheres else on the stage it locks it in place. Instead I want it to return to the original x and y position.

Here is my code
DragDrop.as
package{ import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.filters.DropShadowFilter;
public class DragDrop extends MovieClip {
public var _targetPiece:*;
public function DragDrop() {
[Code] .....

View 5 Replies

AS3 :: Getting The Mouse Targets Children One Level Deep?

Jan 24, 2011

I want to find only the first level of children. Right now I'm using e.target.name but this is also catching those targets children. How would I prevent this?

View 2 Replies

ActionScript 2.0 :: Drag And Drop Multiple Targets?

Sep 9, 2011

I'm using the script "drag & drop multiple targets", with the swapDepth enabled, making the last clicked item to come in front of all the clips on the board.So far, so good. But I have some of the draggers made up by small circles, stacked/glued together vertically (7 in a row) which make these new draggers taller than the majority. The problem is that when I try to drag and snap them, the bottom circle doesn't center into the middle of the dropping zone like the others. These new draggers center themselves with their vertical center into the center of the dragging zones.

I really need to have all these taller draggers centered themselves with the bottom cercle into the middle of the dropping targets, like the simple draggers made up by a single circle.Is there a way to work around, applying a rule to the chosen individual objects without specifically applying to the main script? I mean when you drop the item, forcing it to snap a little bit higher in relation with Y coordinate of the dropping zones.

ActionScript Code:
function dragSetup(clip, targArray) {
clip.onPress = function() {
startDrag(this); this.swapDepths(_root.getNextHighestDepth());

[code]....

View 1 Replies

ActionScript 2.0 :: Randomizing Drag And Drop Targets?

Apr 5, 2006

I have simple Drag n Drop interactivity in my flash movie. There are draggable objects to be dropped on their targets. If they reach the desired Target they stick to that target. If the object does not reach its target, it snaps back to its original x,y location.

The code is here:

Code:
{
if (this._droptarget == "/something") {
this._x = _root.something._x;
this._y = _root. something._y;

[code]....

How can I randomize the location of the objects, and then essentially capture that location and plug it dynamically into the code above? And how can I randomize the location of the targets for those objects to be dropped onto? (And I suppose an additional question would be, so I don't hide any content, how do I do this without overlaying the objects and targets on top of each other?)

View 2 Replies

ActionScript 2.0 :: Drag And Drop With Multiple Targets?

Aug 1, 2007

I've made a drag and drop quiz where you have to drag the labels to the right placeotherwise they just go back to where they were. That was easy enough. But now the bosses decided that they want it so you can get it wrong as well, which means multiple targets. My poor little brain cannot handle it! I've been looking at changing a variable with the target x and y on mouseover, but that just seems to stop the onRelease function.

View 1 Replies

IDE :: CS4 Click Targets Another SWF On Same HTML Page To Animate?

May 17, 2010

I want to create 2 separate SWF's placed in specific locations on an HTML page. When you click on the one SWF it targets the other SWF to animate. [URL]

View 1 Replies

ActionScript 3.0 :: Draw Line Between Targets Within Different Objects?

Apr 19, 2011

I have 2 or more objects created dynamically on stage. Each object has other smaller objects as children (I called them targets).What I am trying to do is to draw lines between these targets.By the way, in the near future these parent objects will need to be drag around the stage and the lines will need to relocate to the new locations when the dragging is complete.But at this point I am having problems getting the lines to show up in the proper locations.So this first piece of code creates the targets and the second piece is where I am trying to draw the lines between targets. I tried to use localX and localY but I can't get it working.

Code:
function handleSubmitFile(evt:Event):void
{
var numberChoices:uint = mcAttribute1.comboAttribute.selectedItem.data;[code].....

View 1 Replies

ActionScript 3.0 :: Flash Drag And Drop To Any Of Targets?

Jan 15, 2012

I've created a quick drag and drop game using an old tutorial I found, it requires the user to place the correct object on the correct target area. E.g. star shape needs to be placed in the star shaped hole. I want to change the game so that the user can place the draggable objects on to any of the targets, here is the current code I am working with:

var startX:Number;
var startY:Number;
var counter:Number = 0;

[code]...

View 1 Replies

ActionScript 2.0 :: SetProperty (multiple Targets, _property, Value)?

Mar 28, 2005

I've 2 mc in timeline instance names are:

form1
form2

in first frame I wrote the following code

setProperty(form1, _alpha, 50);
setProperty(form2, _alpha, 50);

this works ok. but the question is... multiple targets, how could I do something like this:

setProperty((form1; form2), _alpha, 50);

although I know this doesn't work... how could I setProperty of more than one instance?

View 4 Replies







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