To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Reply
 
Thread Tools Search this Thread Display Modes
Old 10-19-2004, 03:37 AM   #1
Diggz
Senior Member
 
Join Date: Oct 2002
Posts: 411
typorganism.com - Good news - bad news

Hi,

I have just been looking at this site.

If you go into the section where it says "good news - bad news" there is a piece of work that I think is very clever.

Any ideas on how this was created? I would very much like to have something similar in a project that I am working on - somewhere that users can post pictures and a little line of copy to go with it.

Any one know of any tutorials/components/open source that will give me some kind of angle on achieving this.

It is very clever though - I tried emailing the site but have had nothing back yet

Hope someone can help

D
Diggz is offline   Reply With Quote
Old 10-19-2004, 03:49 AM   #2
jbum
Senior Member
 
jbum's Avatar
 
Join Date: Feb 2004
Location: Los Angeles
Posts: 2,920
The interesting thing about nice effects is that they tend to be complex enough that you can't quite figure them out, but you feel as if you just might...

Anyway, here's my take on it...

You've got a bunch of movieclips, and each one has a script kind of like this:

code:

onClipEvent(load)
{
// this line will need a lot of tweaking
speed = .2;
// different for each movie
// may be set randomly
// speed = Math.random()*.2 + .1;
}

onClipEvent(enterFrame)
{
// get mouse coords relative to center of stage
var vx = _root._xmouse-Stage.width/2;
var vy = _root._ymouse-Stage.height/2;

// negate them
vx = -vx;
vy = -vy;

// move movie in that direction
// the further from the center the mouse is
// the faster the movies travel
// the speed component gives each movie
// a different speed as well
this._x += vx*speed;
this._y += vy*speed;

// wrap movie around when it goes offscreen
// so it appears on the other side
if (vx > 0 && this._x > Stage.width+this._width)
{
this._x = -this._width;
}
if (vy > 0 && this._y > Stage.height+this._height)
{
this._y = -this._height;
}
if (vx < 0 && this._x < -this._width)
{
this._x = Stage.width+this._width;
}
if (vy < 0 && this._y < -this._height)
{
this._y = Stage.height+this._height;
}
}

__________________

Last edited by jbum; 10-19-2004 at 03:52 AM.
jbum is offline   Reply With Quote
Old 10-19-2004, 04:08 AM   #3
Diggz
Senior Member
 
Join Date: Oct 2002
Posts: 411
Hey jbum,

I see what you mean - it works - thanks for that

How do they make the content appear within the mc's?
Is it done with asp/php/xml? What I would like to do is include something similar to a project that I am working on - so people can upload pics/news onto the site and others can then view and read the uploaded content.

Is that too complex to replicate?

Fabtastic experiments though - very inspirational site.
Diggz is offline   Reply With Quote
Old 10-19-2004, 04:23 AM   #4
jbum
Senior Member
 
jbum's Avatar
 
Join Date: Feb 2004
Location: Los Angeles
Posts: 2,920
They might be using MovieClipLoader or loadMovie to load the content onto the movieclips (this is a very common topic around here, since no one seems to be able to figure out how to do it right the first time...).

The might use an XML file to specify WHICH images to load, another common topic...

Not necessary too complex, but too tedious for ME to replicate just now... good night
__________________
jbum is offline   Reply With Quote
Old 10-19-2004, 04:25 AM   #5
Diggz
Senior Member
 
Join Date: Oct 2002
Posts: 411
Thanks for that jbum,

Looks like it's time to sniff around and see what I can uncover

Thanks for your help

D
Diggz is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump


All times are GMT -4. The time now is 03:46 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.