updating old actionscript for flash8 and dot syntax

This is a discussion on "updating old actionscript for flash8 and dot syntax" within the Flash & Multimedia Forum section. This forum, and the thread "updating old actionscript for flash8 and dot syntax are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Aug 3rd, 2007, 00:13
New Member
Join Date: Aug 2007
Location: new york city
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
updating old actionscript for flash8 and dot syntax

hey guys,
i need some help updating some old action script, i cant seem to get it to work.

Its in old slash syntax and im trying to bring it over to dot, but i keep getting errors.

heres the code below, any help would be greatly appreciated!!!


on my slider bar :
/:value = (marker:_x/(_width-marker:_width))*580;

on the second keyframe
prevFrame();
play();


inside my scrolling MC
left = _x-_width/2;
right = Number(_x)+Number(_width/2);
friction = "0.9";

set("new", /:value);
speed = eval("new")-old;
old = eval("new");
setProperty("", _x, Number(_x)+Number((speed*/:factor)));

prevFrame();
play();
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Aug 3rd, 2007, 02:51
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: updating old actionscript for flash8 and dot syntax

Can you post an example of what you are trying to accomplish and/or the errors you are getting?

If this is older code (which is looks like is) , there is usually a quicker/easier way to accomplish whatever you are trying to accomplish.

And it looks like you have a scrolling MC here, this is definitely a lot easier than what I am seeing here.
Last Blog Entry: Yay!? (Oct 8th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Aug 3rd, 2007, 02:57
New Member
Join Date: Aug 2007
Location: new york city
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: updating old actionscript for flash8 and dot syntax

www.designedmemory.com/tester/slide.html

its pretty basic, its just a scroll bar moving a movie clip right to left basically, nothing crazy. but the file i have is outdated and im not up to date with action script and the best way to do this

any ideas? i also want to scroll much larger images than the ones in that preview, the images would be 918 x 533

thanks so much for the reply
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Aug 3rd, 2007, 03:02
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: updating old actionscript for flash8 and dot syntax

Mmm...sorry I was having fun playing ping pong with the super model pictures. ;-)

Let me drumb up some tutorials for you.
Last Blog Entry: Yay!? (Oct 8th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Aug 3rd, 2007, 03:07
New Member
Join Date: Aug 2007
Location: new york city
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: updating old actionscript for flash8 and dot syntax

thanks!

as a reward for helping me out i'll send you the hi-res files. haha
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Aug 3rd, 2007, 03:08
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: updating old actionscript for flash8 and dot syntax

This would be the type of code you want....it controls the movement of the MC on the _x axis. The movie clip can/could be as large as you like....assuming your referenced movie clip is named MC and a slider named btn1.

Code: Select all
function moveMC(MC,X,Y){
    MC.onEnterFrame = function(){
        MC._x+=(X-MC._x)/5;
        MC._y+=(Y-MC._y)/5;
        if(Math.abs(X-MC._x)<1){
            this._x = X;
            this._y = Y;
            delete MC.onEnterFrame;
        }
    }
}
//movement on a single axis
btn2.onRelease = function(){
    moveMC(mc,300,mc._y);
}
Last Blog Entry: Yay!? (Oct 8th, 2007)

Last edited by Sgaspar11; Aug 3rd, 2007 at 03:11.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Aug 3rd, 2007, 03:10
New Member
Join Date: Aug 2007
Location: new york city
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: updating old actionscript for flash8 and dot syntax

so i would just put that on the MC itself?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Aug 3rd, 2007, 03:13
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: updating old actionscript for flash8 and dot syntax

You can actually put this code on its own actions layer above the movieclip.

You just create the objects and give them an instance name....MC, btn1 on the button, etc.

This is by no means the finished product, but merely a starting point of what the dot structure might look like.

If you have questions on what any part of that is doing let me know.

Happy developing,

Scott
Last Blog Entry: Yay!? (Oct 8th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Aug 3rd, 2007, 03:22
New Member
Join Date: Aug 2007
Location: new york city
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: updating old actionscript for flash8 and dot syntax

scott, what if i want to create a sliding bar like the one in my file i showed u?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Aug 3rd, 2007, 15:37
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: updating old actionscript for flash8 and dot syntax

Here are a couple of tutorials on creating scroll bars...you then just link it up by referecing the MC you want it to affect.

http://www.flashperfection.com/tutor...ash-75581.html

Those should get you on your way.


Cheers,

Scott
Last Blog Entry: Yay!? (Oct 8th, 2007)

Last edited by Sgaspar11; Aug 3rd, 2007 at 15:46.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
flash, old code

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with syntax tox0tes PHP Forum 3 Sep 3rd, 2007 03:00
Valid php syntax nate2099 PHP Forum 2 Jul 18th, 2007 04:23
Flash8 - Media Player Vorbis Flash & Multimedia Forum 3 Feb 21st, 2007 17:27
Video trouble Flash8 Ipaste Flash & Multimedia Forum 2 Dec 22nd, 2005 14:52
Video in Flash8 Ipaste Flash & Multimedia Forum 1 Dec 2nd, 2005 00:25


All times are GMT. The time now is 16:56.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42