Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: YIKES i need help (F5 needs to be F4)
From: avex
Date: Mon, 4 Dec 2000 22:28:40 GMT

Hi guys...

I got into my first bit of actionscripting this
weekend....well...really....i tried to modify somone's code from a file on
flashlist in an attempt to learn it.
Everything went great, the file and scripting worked fine. However I went
to test on other computers and nothing happened......and I realised I must
have had Flash 5 specific code.
The problem is that the client is crazy about compatability, and everything
had to be Flash 4.

Can someone try and help me convert this code to F4 compatible code?

Essentially, all it is is a movie clip that moves left or right depending on
where the mouse is on the screen.

the code is:


//variable for the image instance path
varimg = _root.img

//variable for the background instance path
varbgd = _root.bgd

//speed of the mouse scroll (between 0 and 1)
v=0.02

//mouse position
mousex = varbgd._xmouse;
mousey = varbgd._ymouse;

//image position
imgx = getProperty(varimg, _x);


//distance fom the center to the left, right, top and bottom side
left = getProperty(varimg,_width) / 2
right = (getProperty(varimg,_width) / (-2)) + (getProperty(varbgd,_width))

//scrolling of the image
setProperty (varimg, _x, (imgx+(mousex*v)));


//stop the image on the horizontal side
//left
if (getProperty(varimg, _x) >= left) {
if (mousex > 0) {
mousex = 0
setProperty(varimg, _x, left); }
else if (mousex < 0) {
mousex = varbgd._xmouse ;
setProperty (varimg, _x, (imgx+(mousex*v))); }
}
//right
if (getProperty(varimg, _x) <= right) {
if (mousex < 0) {
mousex = 0
setProperty(varimg, _x, right); }
else if (mousex > 0) {
mousex = varbgd._xmouse ;
setProperty (varimg, _x, (imgx+(mousex*v))); }
}



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre

Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save �200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: YIKES i need help (F5 needs t, Kristopher Schultz

Replies
  FLASH: Do Not Open Creative.Exe It's A V, Larry Eisenstein
  Re: FLASH: Do Not Open Creative.Exe It's, Sohrab Pirayesh

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]