Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Action script 1 to actionscript 2?

Posted on 2006-07-16
6
Medium Priority
?
429 Views
Last Modified: 2006-11-18
Hi,

I have a panorama vr flash file that I need to convert to actionscript 2 - can anyone help?

I think the main culprit is the 'startDrag' function:


startDrag("dragControl", true);
stop();

can anyone convert this to AS2? Or should I just put a link to the .fla file?

thanks all,

Iso
0
Comment
Question by:isotherm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 16

Expert Comment

by:sam85281
ID: 17118526
That code is vaild AS2.0

-Sam
0
 

Author Comment

by:isotherm
ID: 17118543
In fact here it is. Thanks so much for any help converting this :-)
Iso

http://www.holmes.7host.com/jimPanorama360.fla

0
 
LVL 16

Accepted Solution

by:
sam85281 earned 500 total points
ID: 17118660
Replace the code in frame 1 of dragControl movie with this:

// -------------------------------------------
// MAKE THE DRAG WORK
// -------------------------------------------
// SET DRAG SPEED (inverse)
speed = 45;
w = _root.nav._width;
xPos = _root.dragControl._x;
yPos = _root.dragControl._y;
// next line centers the menu drag to the screen
xPos = xPos - (600 / 2);
_root.nav._x = _root.nav._x - (xPos / speed);
if (Number(_root.nav._x) < Number(-(w/2))) {
      _root.nav._x = 0.01;
} else if (Number(_root.nav._x) > 0) {
      _root.nav._x = -w / 2;
}



The replace code in frame 1 of nav movie clip with this:

// --------------------------------------------
// tmi=total duplicates (2)
// dup=new movie duplicates
// butn=original movie
// --------------------------------------------
m = 0;
while (Number(m) < Number((_root.tmi * 2) -1 )) {
      m += 1;
      dup = "butn" add m;
      // Depth of this layer and depth of city layer CANT be the same. So in this layer I add 10 to the depth to make sure of that.
      duplicateMovieClip("butn", dup, Number(m)+10);
      dup._x = Number(dup._x) + Number(m*dup._width);
}

-Sam
0
 

Author Comment

by:isotherm
ID: 17118710
Hi Sam,

thanks very much that's fantastic - there's something odd going on though - it seems to 'jump' now where it didn't in AS1......
any ideas why that would be?

thanks again :-)
Iso
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

730 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