Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Flash Dragging menu AS2

Posted on 2012-09-21
9
Medium Priority
?
562 Views
Last Modified: 2012-10-02
Hello to experts exchange
AS2 Qu      
I am trying to create a drag menu like you would find on a mobile phone. I have got the drag function but I can’t seem to figure out how I could create a clickable area within the drag movie clip. The drag is made up of colour blocks. I want to make each block load a swf when clicked. I’m guessing there will be a problem with using an onPress to start the drag as I will also need an onPress for the button. I need some way of creating a drag function that also has a click function.
I have attached the fla
Cheers
0
Comment
Question by:skyscream
  • 6
  • 3
9 Comments
 
LVL 4

Expert Comment

by:Gabriologist
ID: 38424259
The fla doesn't appear to be attached.

You may need to put it in a zip file for the EE site to see it as a valid upload.

Could you please do a File>Save as... and save it as CS4? (That's the version of Flash I have)
0
 

Author Comment

by:skyscream
ID: 38453926
Sorry been away - i have reattached the file

Thank you for your time
0
 
LVL 4

Expert Comment

by:Gabriologist
ID: 38453934
Sorry, still don't see it?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:skyscream
ID: 38453942
May be this time it will attach  lol
DraggerV2.zip
0
 

Author Comment

by:skyscream
ID: 38454120
if the box's can not be clicked is there a way to place a button within this area and still retain the drag function
Cheers
0
 

Author Comment

by:skyscream
ID: 38454625
is there a way that when the mouse moves to drag the movie clip it cancells the onPress function. Therefore the onPress function (load a swf) will only run when the user clicks on the movie clip.
0
 
LVL 4

Accepted Solution

by:
Gabriologist earned 2000 total points
ID: 38454923
Only one object at a time can grab the mouse's 'attention'. If you have several 'stacked' clickable objects, only the one that's in the highest layer will be activated.

So, I think there are a couple of ways you could go forward...

Either
a) define two different areas / buttons, each of which has their own behaviour. For example, you could have the 'inner' part of examples of two sets of two buttons the example on the left have one behavior (load the swf) and the edge part be the dragging part. Example on the right is a different way to do the same thing. You'd obviously need to give the user some visual clue or explicit instructions for these controls.

or

b) The other way I can think to do it is a little more elegant, but would require some ingenuity to write the code. Firstly, you would just have a single clickable object, but that object would support all of the behaviours you wanted. It involves using timers to measure how / how long some one interacted with the object. For example, you could define a behaviour of 'single clicking' and 'double clicking'. You might define a single click as being sensing a press on the object, and releasing again with a time between the two events of, say, between 100 and 500 millisecs. You might define a double click as being two of these events with no more than 200 millisecs between them. (these numbers are just plucked from the air - you'd need to do some tests to define / refine them).

Another behaviour (click and drag) you might define as a press that is longer than 500 millisecs.

Then, with these behaviours defined, you can obviously get your app to respond differently when it senses each of these events.
0
 

Author Comment

by:skyscream
ID: 38455008
Thank you for your help -
qu
How could i create another stack (button) that moves with the moveclip? - like the diagram demonstrated. The right graphic in the diagram would be most appropriate
Cheers
0
 

Author Comment

by:skyscream
ID: 38455044
sorry i got it i was just being dumb
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question