Jump to content


360 Panorama


  • You cannot reply to this topic
4 replies to this topic

#1 FlawedKid

    Young Padawan

  • Members
  • Pip
  • 36 posts

Posted 04 April 2006 - 12:21 PM

I am trying to create a 360° panoramic slider using flash to kind of simulate Quicktime VR with zoom in/out controls. My development was going smoothly until I tested the movie and realized it wasn’t duplicating properly (I think this is the problem)

I’d like to take credit for this work but, I pretty much used code from examples around the place and made some of my own changes, but I’ve tried to keep the code as tidy as I can.

Below is a screen shot of the project?

Posted Image

When I test the movie I get this Syntax error

Symbol=panorama, layer=Layer 1, frame=1:Line 12:
dup = "image" add m;

And here is the code for the draggerControl MC (frame 1 of 3)


startDrag("", true);
movieheight = 215;
moviewidth = 520;

// variables

w = getProperty("../movie1", _width);
h = getProperty("../movie1", _height);

// Drag Speed is INVERSE: ie: setting to a higher number will SLOW down the speed...
speed = 15;

// begin drag calculations

xPos = getProperty("", _x);
yPos = getProperty("", _y);

// Center the Drag Effect

xPos = xPos-(moviewidth/2);
yPos = yPos-(movieheight/2);

// slide <--x-->

setProperty("../movie1", _x, getProperty("../movie1", _x)-(xPos/speed));
if (Number(getProperty("../movie1", _x))<Number(-(w/2))) {
setProperty("../movie1", _x, 0.01);
} else if (Number(getProperty("../movie1", _x))>0) {
setProperty("../movie1", _x, -w/2);
}

// slide y

setProperty("../movie1", _y, getProperty("../movie1", _y)-(yPos/speed));

// limit y to movie height

pic_y = getProperty("../movie1", _y);
if (Number(pic_y)>0) {
setProperty("../movie1", _y, 0);
}
if (Number(pic_y)<Number((movieheight-h))) {
setProperty("../movie1", _y, (movieheight-h));
}

And here is the code for the draggerControl MC (frame 2 of 3)

gotoAndPlay(_currentframe-1); // this just returns to frame 1 creating a loop effect


And here is the code for the draggerControl MC (frame 2 of 3)

Stop;

In my main timeline I have created a button inside a clip, which is the size of my mask and in the same position. The button basically says, onRollover allow the scrolling and by playing frame 1+2. And onRollout stop scrolling by stopping at frame three.

I am hoping this is just a simple problem that I can't comprehend but if not, I doubt anyone is going to be able to help me with this without looking at the project itself so if you would like to lend a hand and help me out you can download my source. But you will need Flash8.

Download Files

Thanks in advance

FlawedKid :)

#2 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 04 April 2006 - 02:26 PM

the "add" statement has been deprecated already in version 5, you should use the "+" operator for it..
I've attached a screenshot of the panorama script so you can see what I mean...

#3 FlawedKid

    Young Padawan

  • Members
  • Pip
  • 36 posts

Posted 04 April 2006 - 03:18 PM

Cheers funkysoul.

It had me fingered. I can now get some sleep.
See ya round the forums

FlawedKid :P

#4 FlawedKid

    Young Padawan

  • Members
  • Pip
  • 36 posts

Posted 04 April 2006 - 04:53 PM

Hey funkysould thanks for ya help with the coding of my panorama project.
You probably noticed in my FLA that I had an autopan button (no actions), do you or anyone else out there, know how I could make the parorama_mc scroll either left or right automatically not by the mouse position?

#5 FlawedKid

    Young Padawan

  • Members
  • Pip
  • 36 posts

Posted 04 April 2006 - 05:42 PM

Disregard My last post Im removing the AutoPan feature.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users