Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Attempt At Simple Copy Protection



I am an educator that has been developing an atlas for the last few years and now i want to put up a simple web site, but want to put at least a simple level of copy protection. i know there is no such thing as real copy protection, but the typical users i dont think will care and i dont think it will make anyone rich if they cracked the protection. i have searched and found one suggested way to copy protect your flash program while it is on the web, but i can't seem to make it work in my program.

i have taught myself everything in flash that i needed to learn and i reallllly dont understand actions script. i have included the code in the attachment and am hoping that someone one can suggest how to make this work
or
alternatively suggest something they've found to be better.
thanks



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 07-20-2007, 12:46 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

CD Copy Protection
Hello.

I´m making a flash presentation cd and I would like to add some slight copy protection to the content - not anything hackerproof, but simple - if user copies cd content to harddisk then the presentation doesn´t work properly.

Is it possible somehow to do this?

Copy Protection
Sorry for cross posting, but it seems like this forum may be better for my question than the previous.

Im interested in implementing a protection into my flash videos that has a DRM-like functionality.

1. User purchases video and receives an email with a link to download
2. when the link is processed, a random key is generated, placed in the mysql database as well as a sharedobject on the client machine.
3. whenever the user views the file, it checks to match the sharedobject key with that in the database.

do you think this would work? what flaws do you see? how do you think it could be improved?

also if anyone could post a script for limiting a swf from being viewed on any other server than my own, that would be great!

Copy Protection
SWF, HTML or EXE file that published can be copy protect ?
TQ

Copy Protection For Swf Content?
Almost finished with Capoeira Fighter 3, and looking into copy protecting a downloadable / CD version. IE serial number / check if the cd is in unlock type of stuff. Anything that would prevent people from just copying the game.

Can anyone point me in a good direction?

I would like keep the files in swf format and avoid using flash extension stuff like swf studio etc...

Thanks!

Swf Saver - Copy Protection Question
I download a program call Flash hunter. This program basicly save swf files download from the internet to the hard drive.

qeastion 1: can I upload the swf file from....for example britneyspears.com or something for people to download to their hard drive?

question 2: can I take symbols or graphic from the swf files and put it on my web site?

and not get tag by their attorney?

Desperate Projector Copy Protection?
I have a title that I hoped distribute with both a .exe and .hqx on one disk, but with a disk copy protected.   I know everything is permeable, but even a speed bump would have been enough for most of our end users.  

thoughts?  Most of the media is .flv and .swf.  could we somehow leave the .exe and .hqx open and wrap or encode the content?   Most of the commercial solutions seem to only deal with wrapping the .exe, but no one will touch the .hqx.

Also any samples of script that would look to see if the disk was in the drive before the software runs?   Can do it in Director, but never tried in Flash.
 
Thanks!

My First Attempt At Constructing A Simple Alpha Change Via Actionscript. Help
I have 4 movies that I would like to control their _alpha via buttons.

I believe I'm headed in the right direction, but when I test it, the Movie Clip is almost completely transparent. I would like it to be completely opaque when first loaded (ie. _alpha == 100)...


I've attatched the .fla if anybody has any thoughts on it....

Cheers,
Schimke

Simple Copyright Protection?
Hey,
I read somewhere on how to give my flash files simple copyright protection using action scripting. The flash file looks at the address of the site and if it doesn't match whatever your site is, it doesn't play.

if url = mysite.com then play if else then stop

Something like that, but with action scripting?

[CS3] Protection For Simple Maze Game
I've finally made my first flash game, but It's very easy to cheat.

I'd like some code to disable: tab, right click and alternative.

Thank you.

Simple Software Protection Through Date Check
Dear all,

Flash MX

I have a standalone .EXE that I want to protect with a simple date protection:

IF DATE > 2005 THEN QUIT

Can somebody help me with the correct Action Script for this?

(Of course I realize this protection method is far from secure, I just want to discourage usage after a certain date).

Many thanks for sharing knowledge,
Carfi

Simple/Stupid Question On Copy And Paste
Hey All,

I've got this master FLA that's gotten rather large. I'm going to break it down into 5 or 6 separate SWF files and call them in via loadMovie. My question is though. I go into each of the 5/6 sections and "select all" to grab all the frames and paste them into a new FLA file. However the frames don't paste nice and centered within the new stage I have setup. I try to select all and center things, but that doesn't do it. With each section having 50+ layers and a lot of frames, there has to be a way to do this without repositioning every element within the new SWF, but I'm just not sure how to do it. Any help would be much appreciated.

Thanks.

The Third Attempt
how can I get random numbers from an interval, for instance: numbers between 208 and 225

thanx for help

Trying Again Can Anyone Please HELP SEC ATTEMPT
Hi all, I was wondering if any one knows how this can be achieved and if you could point me in the right direction on getting started with this.
It's this banner ad by VW that is controlling animation with copy headlines. have a see for yourself.

http://www.cpbgroup.com/awards/banne...ankrabbit.html

if anyone knows the action script for something like that or an example of a tutorial out there that I can check out I would be most appreciative.

Thanks

1st Attempt @ AS
Can someone show me the most efficient way to convert this to AS?

This is a simple click and display image file. To accomplish this I had to duplicate the same button several times. I think this could easily be accomplished with a variable and counter plus one kind of thing - the only thing is I do not know AS.


http://www.skurz.com/flash/work/
The FLA files is FP_001.fla

Any help appreciated.
Thanks,
Kerry

First Attempt
This is my first attempt of a flash website i was hoping someone could help me add content using xml cause i cant find a tutorial on it or adding content in some external file but let me know what you think of it

http://www.iconhomi.ho8.com/bluehope(new)/index.html

1st Attempt @ AS
Can someone show me the most efficient way to convert this to AS?

This is a simple click and display image file. To accomplish this I had to duplicate the same button several times. I think this could easily be accomplished with a variable and counter plus one kind of thing - the only thing is I do not know AS.


http://www.skurz.com/flash/work/
The FLA files is FP_001.fla

Any help appreciated.
Thanks,
Kerry

First Attempt At ActionScript
I'm getting ready to try and learn actionscript. What suggestions do you have on where I need to start. i.e. books, tutorials, etc. I've been working with flash for about 2 years, and I guess it's time to quite playing in the minors. Thanks for you help.

1st Attempt At Shoot 'em Up
Hi flashers!

I am using Flash 5 on PC platform.

I realise I could be approaching this in entirely the wrong way but that's inexperience for you.

I am trying to build a shoot 'em up where the "armed" character is in the centre of the screen facing the user. Its movements are triggered by hotspots (invisible) which surround it. For example, if the user rolls over the hotspot at 3 "o" clock, the timeline moves to the frame showing the character facing right (3 "o" clock).

All this is based on the timeline with actions assigned to the hotspots.

Obviously there must be targets, these objects should move onto the screen as though being thrown at the character, diminishing in size as they approach the character.

My query is that if the timeline is moving rapidly back and forth as the user rolls over the various hotspots, how can I achieve the movement of a target which requires constant progress along the timeline for the duration of its "flight"?

Hopefully
AJJA17

P.S.

First Attempt At A Game
could some one point me in the right direction (maybe a tutorial) for simple game development. I'll looking to create something like "Wack-a-Mole"...anybody remeber that arcade game with the big hammer...

thanks

My First Attempt At An OOP Solution
for the first time, i have managed to include the rudiments of OOP into some of my actionscript. i'd appreciate it if anyone had a couple of minutes to cast their eyes over it and let me know anywhere i might be going very wrong, or slightly wrong, or just missing the point entirely.

the aim of the script is to create five movieclips (that look like bubbles in this case) which start at the bottom of the movie at a random x co-ordinate and rise to the top of the movie at a random speed. upon reaching the top, each bubble returns to the bottom at another random x co-ordinate with another random speed and starts again.

hope that's clear. here's the code:


Code:
function Bubble() {
this._alpha = 66;
this._y = 300;
}

Bubble.prototype = new MovieClip();
Object.registerClass("bubble", Bubble);

Bubble.prototype.reset = function () {
this._y = 300;
this._x = Math.random()*375;
this.speed = (Math.random()*4)+1;
this.move(this.speed);
bubbleScale = (Math.random()*100)+50;
this._xscale = bubbleScale;
this._yscale = bubbleScale;
}

Bubble.prototype.move = function (s) {
this.onEnterFrame = function() {
this._y -= s;
if (this._y < -30) {
this.reset();
}
}
}

for (i=1; i<6; i++) {
this.attachMovie("bubble", "bubble_"+i, i);
this["bubble_"+i]._x = Math.random()*375;
bubbleScale = (Math.random()*100)+50;
this["bubble_"+i]._xscale = bubbleScale;
this["bubble_"+i]._yscale = bubbleScale;
speed = (Math.random()*4)+1;
this["bubble_"+i].move(speed);
}
hope it makes some sense; thanks in advance for any comments.

||| O ^ | + O ¬

An Attempt To Understand AS
Hello all. I am a very new user to the flash world and am coming across many road blocks along the way. I am in a flash class but when the teacher is trying to help 25 students build a game, it is difficult for him to get to everyone. I was recommended to go to forums being that people know their stuff. here is my game that I am working on.

http://i14.photobucket.com/albums/a331/Rikimaru03/my_game.jpg





3 little turrets on the left as well as 2 on the right. each shooting bullets. the premise of the game is to set up your turrets up however you want them on their respective sides. each turret shoots at a different speed. each one of those red enemies coming down the path can take 5 hits. the things I am TRYING to do is...

1. the turrets are able to be moved up and down wherever the player wants.

2. from there he presses the red button on the bottom right.

3.once that is pressed, the 3 enemies start coming down.

4. bullets with hit the enemies which I think is what a Hit Test comes into play.

5. after hit 5 times, the enemy is removed from the level.


my code is as follows...










Attach Code

// store a variable called "counter" on the box
// set the variable to 0 to start with
// the counter variable is used to determine when to fire
// a new bullet


turret.counter = 0;
turret.nextBullet = bullet1;
turret2.counter2 = 0;
turret2.nextBullet = bullet10;
turret3.counter3 = 0;
turret3.nextBullet = bullet20;
turret4.counter4 = 0;
turret4.nextBullet = bullet30;
turret5.counter5 = 0;
turret5.nextBullet = bullet40;


// this is the ENTER_FRAME for the box
turret.addEventListener(Event.ENTER_FRAME, turretEnterFrame);
turret.addEventListener(MouseEvent.MOUSE_DOWN, dragThisMovieClip);
turret.addEventListener(MouseEvent.MOUSE_UP, stopDragging);

turret2.addEventListener(Event.ENTER_FRAME, turretEnterFrame);
turret2.addEventListener(MouseEvent.MOUSE_DOWN, dragThisMovieClip);
turret2.addEventListener(MouseEvent.MOUSE_UP, stopDragging);

turret3.addEventListener(Event.ENTER_FRAME, turretEnterFrame);
turret3.addEventListener(MouseEvent.MOUSE_DOWN, dragThisMovieClip);
turret3.addEventListener(MouseEvent.MOUSE_UP, stopDragging);

turret4.addEventListener(Event.ENTER_FRAME, turretEnterFrame);
turret4.addEventListener(MouseEvent.MOUSE_DOWN, dragThisMovieClip);
turret4.addEventListener(MouseEvent.MOUSE_UP, stopDragging);

turret5.addEventListener(Event.ENTER_FRAME, turretEnterFrame);
turret5.addEventListener(MouseEvent.MOUSE_DOWN, dragThisMovieClip);
turret5.addEventListener(MouseEvent.MOUSE_UP, stopDragging);








//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~TURRET 1~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



function turretEnterFrame(evt:Event) {
// increment the counter for this box by 1 every ENTER_FRAME
evt.target.counter ++;
//trace(evt.target.counter);

// now test the counter to see if it has grown
// big enough to fire a new bullet and then reset counter back to 0
if (evt.target.counter >= 10) {
// this happens once every 10 frames
// meaning it will fire a bullet every 10 frames

// sets the bullet that is stored in the nextBullet variable
// to the registration point of the box
evt.target.nextBullet.x = turret.x;
evt.target.nextBullet.y = turret.y;

// set up the bullet's ENTER_FRAME, calling the function bulletMoveRight
// for each ENTER_FRAME of the bullet
evt.target.nextBullet.addEventListener(Event.ENTER_FRAME, bulletMoveRight);

// store the next bullet we want to fire
// in the nextBullet variable
// next time we reach this part of the code
// the nextBullet variable will be set-up with the
// next bullet we want to fire
if (evt.target.nextBullet == bullet1) {
evt.target.nextBullet = bullet2;
} else if (evt.target.nextBullet == bullet2) {
evt.target.nextBullet = bullet3;
} else if (evt.target.nextBullet == bullet3) {
evt.target.nextBullet = bullet1;
}

evt.target.counter = 0;
}







//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~TURRET 2~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


evt.target.counter2 ++;
if (evt.target.counter2 >= 10) {
evt.target.nextBullet.x = turret2.x;
evt.target.nextBullet.y = turret2.y;
evt.target.nextBullet.addEventListener(Event.ENTER_FRAME, bulletMoveLeft);
if (evt.target.nextBullet == bullet10) {
evt.target.nextBullet = bullet11;
} else if (evt.target.nextBullet == bullet11) {
evt.target.nextBullet = bullet12;
} else if (evt.target.nextBullet == bullet12) {
evt.target.nextBullet = bullet10;
}
evt.target.counter2 = 0;
}



//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~TURRET 3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



evt.target.counter3 ++;
if (evt.target.counter3 >= 10) {
evt.target.nextBullet.x = turret3.x;
evt.target.nextBullet.y = turret3.y;
evt.target.nextBullet.addEventListener(Event.ENTER_FRAME, bulletMoveRight);
if (evt.target.nextBullet == bullet20) {
evt.target.nextBullet = bullet21;
} else if (evt.target.nextBullet == bullet21) {
evt.target.nextBullet = bullet22;
} else if (evt.target.nextBullet == bullet22) {
evt.target.nextBullet = bullet20;
}
evt.target.counter3 = 0;
}





//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~TURRET 4~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


evt.target.counter4 ++;
if (evt.target.counter4 >= 10) {
evt.target.nextBullet.x = turret4.x;
evt.target.nextBullet.y = turret4.y;
evt.target.nextBullet.addEventListener(Event.ENTER_FRAME, bulletMoveLeft);
if (evt.target.nextBullet == bullet30) {
evt.target.nextBullet = bullet31;
} else if (evt.target.nextBullet == bullet31) {
evt.target.nextBullet = bullet32;
} else if (evt.target.nextBullet == bullet32) {
evt.target.nextBullet = bullet30;
}
evt.target.counter4 = 0;
}




//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~TURRET 5~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



evt.target.counter5 ++;
if (evt.target.counter5 >= 10) {
evt.target.nextBullet.x = turret5.x;
evt.target.nextBullet.y = turret5.y;
evt.target.nextBullet.addEventListener(Event.ENTER_FRAME, bulletMoveRight);
if (evt.target.nextBullet == bullet40) {
evt.target.nextBullet = bullet41;
} else if (evt.target.nextBullet == bullet41) {
evt.target.nextBullet = bullet42;
} else if (evt.target.nextBullet == bullet42) {
evt.target.nextBullet = bullet40;
}
evt.target.counter5 = 0;
}




}

function bulletMoveRight(evt:Event) {
// moving the bullet at 6 pixels every frame
evt.target.x += 10;
}


function bulletMoveLeft(evt:Event) {
// moving the bullet at 6 pixels every frame
evt.target.x -= 10;
}

function dragThisMovieClip (evt:MouseEvent){
evt.target.startDrag();
}

function stopDragging(evt:MouseEvent){
stopDrag();
}







stage.addEventListener(Event.ENTER_FRAME, enemyMover);
function enemyMover(evt:Event){

enemy.x += 0;
enemy.y += 2;
enemy2.x += 0;
enemy2.y += 2;
enemy3.x += 0;
enemy3.y += 2;
};

My First Attempt At Animation
hey guys
i made my first animation, well not an "animation" really, but first one anyway, just done simple menu's and stuff

www.shadowcommand.net/intro.html

i'm trying to make a slash.. like a graphic or something moving form left-right etc and leaves a trail behind

any ideas on how i can do that?

My First Attempt At An OOP Solution
for the first time, i have managed to include the rudiments of OOP into some of my actionscript. i'd appreciate it if anyone had a couple of minutes to cast their eyes over it and let me know anywhere i might be going very wrong, or slightly wrong, or just missing the point entirely.

the aim of the script is to create five movieclips (that look like bubbles in this case) which start at the bottom of the movie at a random x co-ordinate and rise to the top of the movie at a random speed. upon reaching the top, each bubble returns to the bottom at another random x co-ordinate with another random speed and starts again.

hope that's clear. here's the code:


Code:
function Bubble() {
this._alpha = 66;
this._y = 300;
}

Bubble.prototype = new MovieClip();
Object.registerClass("bubble", Bubble);

Bubble.prototype.reset = function () {
this._y = 300;
this._x = Math.random()*375;
this.speed = (Math.random()*4)+1;
this.move(this.speed);
bubbleScale = (Math.random()*100)+50;
this._xscale = bubbleScale;
this._yscale = bubbleScale;
}

Bubble.prototype.move = function (s) {
this.onEnterFrame = function() {
this._y -= s;
if (this._y < -30) {
this.reset();
}
}
}

for (i=1; i<6; i++) {
this.attachMovie("bubble", "bubble_"+i, i);
this["bubble_"+i]._x = Math.random()*375;
bubbleScale = (Math.random()*100)+50;
this["bubble_"+i]._xscale = bubbleScale;
this["bubble_"+i]._yscale = bubbleScale;
speed = (Math.random()*4)+1;
this["bubble_"+i].move(speed);
}
hope it makes some sense; thanks in advance for any comments.

||| O ^ | + O ¬

My Pathetic Attempt...
....at messing around with math at 2 am God I suk at numbers. I have no clue what I am doing.

preview
http://2210media.com/test/ball.html

My First Game Attempt
www.arsenalmp.ro/Allia/

I love RTS so i have started a simple engine.
u controle the 2 fighters facing right "at start", hope u like the 3D graphics. The source allows me to load 3 classes of characters (worrier, archer, mage); worriers can load 10 x 1 hand wepons & 13 x 2 hand wepons and 7 shields, archers have 5 diferent kind of bows; 8 types of armors for each class. All this I wanna change at certain experience lvls. but I have only made this graphics at the moment. (I can change them from the source - most of them are allready defined)

This is my 1'st attempt to create a game in Flash.
any sugestions /critics will be greatly apreciated.
I also have a TONE of questions, if any one here is kind enough to answere some of them.. I realy have lotts of Qs.

First Quadtree Attempt
I'm going to post a few articles on my blog about my search for improved efficiency in collision detection. Ultimately I want to use quadtrees to improve the speed as I want to make games with large stages and number of objects running around the screen.

Anywho this is my first attempt here:
http://blog.fatal-exception.co.uk/?p=22

Press Q to show the nodes as they are being built. I'll post the source soon

My First Attempt At An OOP Solution
for the first time, i have managed to include the rudiments of OOP into some of my actionscript. i'd appreciate it if anyone had a couple of minutes to cast their eyes over it and let me know anywhere i might be going very wrong, or slightly wrong, or just missing the point entirely.

the aim of the script is to create five movieclips (that look like bubbles in this case) which start at the bottom of the movie at a random x co-ordinate and rise to the top of the movie at a random speed. upon reaching the top, each bubble returns to the bottom at another random x co-ordinate with another random speed and starts again.

hope that's clear. here's the code:


Code:
function Bubble() {
this._alpha = 66;
this._y = 300;
}

Bubble.prototype = new MovieClip();
Object.registerClass("bubble", Bubble);

Bubble.prototype.reset = function () {
this._y = 300;
this._x = Math.random()*375;
this.speed = (Math.random()*4)+1;
this.move(this.speed);
bubbleScale = (Math.random()*100)+50;
this._xscale = bubbleScale;
this._yscale = bubbleScale;
}

Bubble.prototype.move = function (s) {
this.onEnterFrame = function() {
this._y -= s;
if (this._y < -30) {
this.reset();
}
}
}

for (i=1; i<6; i++) {
this.attachMovie("bubble", "bubble_"+i, i);
this["bubble_"+i]._x = Math.random()*375;
bubbleScale = (Math.random()*100)+50;
this["bubble_"+i]._xscale = bubbleScale;
this["bubble_"+i]._yscale = bubbleScale;
speed = (Math.random()*4)+1;
this["bubble_"+i].move(speed);
}
hope it makes some sense; thanks in advance for any comments.

||| O ^ | + O ¬

My Pathetic Attempt...
....at messing around with math at 2 am God I suk at numbers. I have no clue what I am doing.

preview
http://2210media.com/test/ball.html

First Attempt At Pre-Loading - Jerky
Please could someone give an opinion on my new site
http://www.cabotfamilies.co.uk


I decided to 'Flash' the whole thing to impress my client, but am a bit concerned about the loading times - my client insists on having 30 or so jpgs on the site - is there a better way of geting the pics to download quicker, or at least without the danger of the user getting bored ? It
occurs to me that a simple non-flashed html site would actually allow the user to see the pics sooner.

I'm using a basic loading test to draw the loading bar:

if (_framesloaded>=_totalframes) {
gotoAndPlay ("start special");
} else {
setProperty ("bar", _xscale, (_framesloaded/_totalframes)*200);
}

Why do some cool sites I've seen get their loading bar to move slowly - mine is rather jerky.

Thanks,

Martin Hanstead
Bristol, England
martin@martinz.demon.co.uk

(MX) Inter-active Attempt .... . . .. . . .. . . ... .... . .
I have tried this ... I am beyond trying again (until at tomorrow) but ... am I attempting this from the correct angle?

* I have 3 buttons, located in three positions on the stage.
* When a user mouses over each one, I would like the button image to be replaced with a (pre-made) swf file that they can 'interact with".
*When they have had their fun, they move over to another button - when moused-over, the previous swf disappears and a new swf plays where the mouse is now located on-screen.

I have attempted to create this by copying the lay-out in different scenes, with the the new swfs in each, then using the remaining buttons to move between these scenes. In each scene I wanted the swf to replace the button (they had just moused-over) ... and so-on around the screen of 3 buttons/swf's.


Can this be done? At this point, it dosen't have to look pretty, just function.


thanks. .. . . .... . . . . ............ . . . . . . . . ....


head_injury

Attempt At Masking Effect
Hi... so I attempted to recreate a trendy masking effect I see all over the web... I did it, but I was hoping someone could look at my code in relation to the desired effect, and give me some feedback... I am new to flash and programming and was wondering if there is an easier/more eff. way to do what I did (or are there tuts. on this)... obvs. my code can be made better and obvs. there is more than one way to solve a problem... I was just hoping for some feedback as it is hard to teach yourself flash without any guidance. Thanks... and I apologize for the ghetto stick figure... i had to fit the file on the board somehow.
peace. if you like the code, feel free to use it.

LoadMovie() Skipping Every Second Attempt
I am using loadMovie to dynamically import a number of jpegs for a slide show. However, upon hitting "nextSlide" button the loadMovie() command only works every sceond time. I have included all the relevant code below.

Appreciate any suggestions on this one...

//the array is declared elsewhere and reads:

siteImage_arr[0] = "http://localhost/images/image1"
siteImage_arr[1] = "http://localhost/images/image2"
siteImage_arr[2] = "http://localhost/images/image3"

//code behind nextSlide button

on (release){
trace ("Pressed!);
//holder is a movieclip placed on the main timeline
holder.loadMovie(siteImage_arr[x]);
if (x==imageCount){ //imageCount = 2
x=0;
}else {
x=x+1;
}
}

**********

Output: everytime I press the nextSlide button, the trace works ("Pressed1"). however, holder will only display image1, blank, image3, blank, image2, blank, image1 ... etc.

cheers for any help!!!

dots22

My First Attempt At Flash, Help Needed
First of all id like to say hi, im a newbie

Im currently working on a project for a mates band and have the banner designed and pretty much ready (made with flash 6.0), im stuck on a few things.

The idea is to make the site similar to the following

www.ironmaiden.com

I need to know how to make insert a hyperlink onto the buttons and then make the page appear below the banner in another frame. Im new to flash but have designed a few websites using html before.

My banner is located here

www.bootlegsandbsides.co.uk/flash.zip

This is also one of my sites ive designed

I also need to know how to insert the flash banner into a webpage. Any help that you can give would be very much appreciated.

Thanks

[F8] Help With Communicating Classes, Attempt#2
Last time I asked, I got no replies. Too simple or too hard? Or am I not clear? Please, see if you can help!

I need to know how to let instances of classes to communicate with each other! Previously, people here adviced me to use event dispatchers, and that works fine for some occations, but not for all.

This should be really basic! My main script is controlling movieclip-inheriting class-objects, let's say they are of the classes Alpha and Beta and stored in an array.

I'd really like the instances A[1..x] of Alpha to be able to "keep track" of the instances B[1..y] of Beta, and the other way around. Or at least, if the main script tells, for example, A[15] to go hunt down B[4], A[15] will from then on focus on B[4] and that will affect every move A[15] makes. An Alpha instance will then interact with a Beta instance...

But how do you write that code in the class-file? How do you refer to another class instance, when for example checking its coordinates? (Or, other instances of the same class?) It seems bizarre that classes shouldn't be able to communicate!

Right now, my classes only implement "idle" and independent actions for their movieclips (or, dependent on something static, like the mouse), if not explicitly told by the main script.

To make the above example more concrete: I tell an instance (with a setter) that it should keep an eye on (e.g. hunt!) another movieclip (with an array index or clip-name). That instance will now move towards the victim by checking the pray coordinates every frame. How can I refer to something that does not yet exist?

Is "controller classes" the key? Or how do you do it? Or should the pray use event-dispatcher when it's being hunted? Any advice ,please! Thanx in advance!

Final Attempt At Flashpaper API
hi,

over the last month or so i have been trying to figure out how on earth you can, to a degree, customise the flashpaper interface. I know its not an easy thing to do and I am close to giving up. i am basically trying to find a way to display PDF files on a CDROM and have a done a few converting the PDF's to flashpapers but the interface never matches up with the rest of the graphics in the CDROM.

i have seen that for certain buttons and functions you can use your own graphics, as seen here: http://www.adobe.com/devnet/flashpap..._flpaper2.html

so this makes me think it is possible, however not being that clued up at scripting i have no idea how you would create a scrollbar to zoom in and other functions etc...

in the attached zip file i have an fla which loads in a flashpaper, uses my own graphics for next and previous page buttons and i have hidden all the features i do not need (ie search, print).

all I need to know is whether it is possible to access the code for the scrolling zoom in section and the fill screen buttons or not. i have a strong feeling its not but i thought id have one last go....

if anyone has any comments, ideas or even an alternative idea please let me know...

many thanks,

james

Tricky Split Attempt
I am trying to split the following string and others like it..."Available - 10' x 10'"

I want to get a string that contains the first 12 characters of the above example...so "Available - "

code:
var temp:String = _global.exName[j-1].split(" - ")[0];


returns "Available"...the closest I have gotten is by typing split("- ") which yields "Available "....i need the "- " in there too though...and I want to do this without having to loop through an array to concatenate a string...is this possible?

Attempt 2, For Loops + Trace
Hey, I am trying to make a circular preloader, and I have given up on trying to do it with drawArc so I have tried it a different way. Currently I am trying to make a for loop continually check the value of a variable I have created, and if this value reaches a set amount, carrys on the script. The variable is being set inside a movie clip called preload. I made this variable _root.per_down and this is the percentage of the movie downloaded.

SO, what I would like is this:

Code:
var i = _currentframe;
for (i + 0 ; i < _root.pre_down ; //don't know ){
trace(_root.pre_down);
}
Right... this script is flawed, I am very new to actionscript but I do understand some php and html (I know they are easy).

The trace is there to show me if it would work. However, I get this back:

Output:

<p align="left"></p>
<p align="left"></p>
<p align="left"></p>
<p align="left"></p>
<p align="left"></p>


This confuses me, I havn't used this code anywhere, the only peice of text is a dynamic text box, with the variable _root.per_down to show me how much is downloaded, so I keep track. Any ideas? I also dont know how to make it then Play(); once its finished repeating :-/

What I have done, is made a 100 frame movie, and on each frame I would have one of these. I can make a simple load bar, using _xscale, but I wanted something different. Thanks if you can help :-)

- Johno

First Attempt At Actionscript, Could Use Some Advice Please
Hi there,
This is my first attempt at actionscript and I've got the main idea of what I want to do, but for some reason it has stopped loading images. If you view the site here: http://www.krammedia.com/vellecadesign/2005/base.html then click on Gallery and then click on Doors, then click on the first thumbnail. You should get that fade in and then 4 thumbnails appear in bottom corner, which you can switch between.

If you go back to Doors menu and click on the second thumbnail it will load the text, the thumbnails (all from an xml file) but not the first image. The images are all there and are the exact same format as the ones that work orginally. I first build this about 2 months ago with a few images, but ever since I've added the new images to the xml file it does not show them.

Here is the code that receives 2 values, a category id and an item id that loops through the cat in the xml file and finds the correct item and then returns all the text and thumbs etc:

ActionScript Code:
function loadGallery(intCat, intNum) {
    function xmlLoad(loaded) {
        if (loaded) {
            xmlNode = this.firstChild;
            total = xmlNode.childNodes.length;
            //first loop through categories to identify right one
            for (i=0; i<total; i++) {
                if (xmlNode.childNodes[i].attributes.catid == intCat) {
                    //then count and loop through items in category until found specific item
                    itemTotal = xmlNode.childNodes[i].childNodes.length;
                   
                    for (s=0; s<itemTotal; s++) {
                        if (xmlNode.childNodes[i].childNodes[s].attributes.itemID == intNum) {
                            idParam_txt.text = intNum;
                            title_txt = xmlNode.childNodes[i].childNodes[s].childNodes[0].firstChild.nodeValue;
                            desc_txt = xmlNode.childNodes[i].childNodes[s].childNodes[1].firstChild.nodeValue;
                            thumbCount = xmlNode.childNodes[i].childNodes[s].childNodes[3].childNodes.length;
                            image_arr = [];
                            for (z=0; z<thumbCount; z++) {
                                image_arr[z] = xmlNode.childNodes[i].childNodes[s].childNodes[3].childNodes[z].firstChild.nodeValue;
                                trace(image_arr[z]);
                            }
                        }
                    }
                }
            }
            runMovie();
        } else {
            trace("what xml file");
        }
    }
    // end of loadgallery function
    function loadText() {
        var myStaticB:TextFormat = new TextFormat();
        myStaticB.bold = true;
        myStaticB.font = "Arial";
        myStaticB.align = "left";
        myStaticB.size = 11;
        var myStatic:TextFormat = new TextFormat();
        myStatic.bold = false;
        myStatic.font = "Arial";
        myStatic.align = "left";
        myStatic.size = 11;
        _level0.container07.menuback.loadme._visible = false;
        _level0.container07.menuback.itemTitleText._visible = true;
        _level0.container07.menuback.itemTitleText.itemTitleText.text = title_txt;
       
        _level0.container07.menuback.createTextField("galDesc_txt", 1600, 10, 80, 180, 260);
        with (_level0.container07.menuback.galDesc_txt) {
            setTextFormat(myStatic);
            setNewTextFormat(myStatic);
            text = desc_txt;
            multiline = true;
            wordWrap = true;
            selectable = false;
        }
    }
    function buildBackButton(intCat) {
        switch (intCat) {
        case "1" :
            backText = "gates";
            break;
        case "2" :
            backText = "doors";
            break;
        case "3" :
            backText = "railings";
            break;
        case "4" :
            backText = "furniture";
            break;
        case "5" :
            backText = "sculpture";
            break;
        case "6" :
            backText = "other";
            break;
        default :
            backText = "gallery";
        }
        _level0.container07.menuback.loadme3.backButton.back_mc.backToText.backToText.text = backText;
        _level0.container07.menuback.loadme3._visible = true;
        _level0.container07.menuback.loadme3.onEnterFrame = function() {
            _level0.container07.menuback.loadme3.backButton.onPress = function() {
               
                _level0.container07.menuback.itemTitleText._visible = false;
                _level0.container07.menuback.galDesc_txt.removeTextField();
                _level0.container07.menuback.backHolder.unloadMovie();
                _level0.container09.fadeGallery();
                _level0.container09.fadeIn(4);
                _level0.container07.menuback.loadme2._visible = true;
                _level0.container07.menuback.loadme2.buildBackButton();
               
            };
        };
    }
    function runMovie() {
        currentHolder = 0;
        theDepth = 12;
        _global.imageLoaded = false;
        _root.container06.createEmptyMovieClip("img0_mc", theDepth++);
        _root.container06.createEmptyMovieClip("img1_mc", theDepth++);
        _root.container06.img0_mc._y = 0;
        _root.container06.img1_mc._y = 0;
        _root.container06.createEmptyMovieClip("thumbloader", theDepth++);
        for (var i = 0; i<image_arr.length; i++) {
            _root.container06.thumbloader.createEmptyMovieClip("thumb"+i+"_mc", theDepth++);
            _root.container06.thumbloader.createEmptyMovieClip("thumb"+i+"_tmp_mc", theDepth++);
            _root.container06.thumbloader["thumb"+i+"_mc"]._x = 670-65*i;
            _root.container06.thumbloader["thumb"+i+"_mc"]._y = 360;
            _root.container06.thumbloader["thumb"+i+"_mc"].loadMovie("images/jobs/"+image_arr[i]+"_thumb.jpg");
            //trace("imagedesc: "+image_arr[i]);
            _root.container06.thumbloader["thumb"+i+"_tmp_mc"].no = i;
            _root.container06.thumbloader["thumb"+i+"_tmp_mc"].onEnterFrame = function() {
                if (this._parent["thumb"+this.no+"_mc"]._width>1) {
                    this._parent["thumb"+this.no+"_mc"].num = this.no;
                    this._parent["thumb"+this.no+"_mc"].onPress = function() {
                        loadImage(this.num);
                    };
                    delete this.onEnterFrame;
                    this.removeMovieClip();
                }
            };
        }
        loadImage(0);
        // thumbloader background bar
        _root.container06.thumbloader.attachMovie("thumbloaderback", "testback", theDepth-100);
        xPos = 740-((thumbCount*60)+(((thumbCount-1)*5)+25));
        xPosClosed = ((thumbCount*60)+(((thumbCount-1)*5)+10));
        _root.container06.thumbloader.testback._x = xPos;
        _global.xPosClosed = xPosClosed;
        _root.container06.thumbloader.testback._y = 353;
        // end of thumbloader background bar
        function loadImage(num) {
            _root.container06["img"+currentHolder+"_mc"]._x = 0;
            _root.container06["img"+currentHolder+"_mc"]._y = 100;
            _root.container06.createEmptyMovieClip("img0_tmp_mc", theDepth++);
            _root.container06.createEmptyMovieClip("img1_tmp_mc", theDepth++);
            _root.container06["img"+currentHolder+"_mc"].loadMovie("images/jobs/"+image_arr[num]+".jpg");
            //trace(image_arr[num]);
            _root.container06["img"+currentHolder+"_tmp_mc"].onEnterFrame = function() {
                if (this._parent["img"+currentHolder+"_mc"]._width>1) {
                    this._parent["img"+currentHolder+"_mc"]._y = 0;
                    this._parent["img"+currentHolder+"_mc"]._alpha = 1;
                    _global.imageLoaded = true;
                    delete this.onEnterFrame;
                    this.removeMovieClip();
                }
            };
            _root.container06["img"+((currentHolder+1)%2)+"_tmp_mc"].onEnterFrame = function() {
                if (_global.imageLoaded) {
                    if (this._parent["img"+currentHolder+"_mc"]._alpha<100) {
                        this._parent["img"+currentHolder+"_mc"]._alpha += 15;
                        this._parent["img"+((currentHolder+1)%2)+"_mc"]._alpha -= 15;
                    } else {
                        this._parent["img"+currentHolder+"_mc"]._alpha = 100;
                        this._parent["img"+((currentHolder+1)%2)+"_mc"]._alpha = 0;
                        currentHolder = (currentHolder+1)%2;
                        delete this.onEnterFrame;
                        this.removeMovieClip();
                    }
                }
            };
        }
        loadText();
        buildBackButton(intCat);
    }   
    xmlData = new XML();
    xmlData.ignoreWhite = true;
    xmlData.onLoad = xmlLoad;
    xmlData.load("xml/images.xml");
}

and here is a portion of the xml that it is reading:


Code:
<category catid="2" catText="Doors">
<item itemID="3">
<title>Entry Door</title>
<description>HINGING GRILLS ON A WOOD FRAME DOOR RELEASED BY A THUMBTURN FOR EASE OF CLEANING. THE UNIQUE LEAF FORM LENDS ITSELF WELL TO THE FLOWING MOVEMENT IN THIS CUSTOM DESIGN.</description>
<image>item3_1</image>
<thumbs>
<thumb>item3_1</thumb>
<thumb>item3_2</thumb>
<thumb>item3_3</thumb>
<thumb>item3_4</thumb>
</thumbs>
</item>
<item itemID="11">
<title>Wine Door</title>
<description>FROM THE SUBTELY FORGED TRELLIS AND FINELY FORMED LEAVES, TO THE ROUGHLY TEXTURED GRAPES AND VINE STALKS, FINE CRAFTSMANSHIP IS APPARENT IN THIS PIECE. WHILE COMPLEMENTING THE PIECE AS A WHOLE, EVERY ELEMENT HAS BEEN TREATED AS AN INDIVIDUAL CHARACTER AND GIVEN ITS OWN GESTURE. SUBTLE COLORING FINISHES THIS ELEGANT DESIGN WHILE REVEALING THE AUTHENTIC TEXTURES BORN OF THE UNIQUE FORGING PROCESSES EMPLOYED. THIS DOOR IS AS ORIGINAL AND NATURAL AS THE MANY VINES STUDIED WHILE DESIGNING IT.</description>
<image>item11_1</image>
<thumbs>
<thumb>item11_1</thumb>
<thumb>item11_2</thumb>
</thumbs>
</item>
</category>
Sorry for such a long post, but this is starting to do my head in now. I know it may not be the best coding or approach (coz I need to wrap some preloaders around the images loading - if anyone can help with that as well), but as it's my first attempt, I'm quite pleased with it... if only it did what I want.

Many thanks in advance for any help or advice you can offer.

Regards

Mark

Another Attempt - Menu System
so i really need help with this and just need some guidance on what methods to use to accomplish the menu found on this site:

http://www.dhondt-deuren-trappen.be/

My layout:

1. Screen: 500 x 250
2. 5 pictures each 100 wide
3. on mouse over a picture, that picture becomes 300 wide and the rest of the pictures become 50 wide and move to the side (now when i say that they become 50 wide, it means that they get covered up and NOT resized)

any guidance? should i be looking into swapdepth, what kind of masking, etc.?
thx.

Tricky Split Attempt
I am trying to split the following string and others like it..."Available - 10' x 10'"

I want to get a string that contains the first 12 characters of the above example...so "Available - "


ActionScript Code:
var temp:String = _global.exName[j-1].split(" - ")[0];


returns "Available"...the closest I have gotten is by typing split("- ") which yields "Available "....i need the "- " in there too though...and I want to do this without having to loop through an array to concatenate a string...is this possible?

My Attempt At Besting A Legend
To be more specific, I figured I'd make my own version of Senocular's famous KeyObject class with a few extra features. I don't have it uploaded to my website right now, it's too late to do that and write up the entire page, blah blah blah. So here is it, with some documentation commented in:

Please note, this is FAAARRR from perfect, but I've been using it for a few games I'm working on (mostly failed projects, I learn from them more than anything), and would like some help perfecting it.

It's capabilities are:
1.) Determine the down status of keys, the same way as Sen's class does. Actually, I copy-pasted the function
2.) Return all down keys
3.) Yep, bind/unbind a key or many keys to functions, with any list of parameters, on-the-fly.

Usage:

ActionScript Code:
import com.thecodebot.utils.Key;Key.init(stage);function t(e:String,f:Number){trace("Spacebar is down! It passed "+e+" and "+f);}function t2(e:String,f:Number){trace("Spacebar went down! It passed "+e+" and "+f);}function t3(e:String,f:Number){trace("Spacebar went up! It passed "+e+" and "+f);}Key.bind(Event.ENTER_FRAME,t,32,["This String",1]); //Checks for spacebar's down status every frameKey.massbind([KeyboardEvent.KEY_DOWN,KeyboardEvent.KEY_UP],[t2,t3],[32,32],[["That string",1],["One more string",2]]);//Listens for spacebar's up AND down status in one line.trace(Key.isParBound("That string",1));//trueKey.unbind(Event.ENTER_FRAME,t,32,["This String",1]);//removes the enterFrame bindingtrace(Key.isParBound("That string",1));//false  


It's not optimized, and the iteration in the keyHeld function I'm sure could use a rewrite for speed.
I also need to implement locking keys to prevent binding Escape, P, and other "reserved" keys.
I will soon post a class to work with buttons to bind these. I have a game using the functionality, just need to move it to an external class still.
And yes, I know, using stage is a big no-no. I just wanted to share what I have before i tweak it till i break it.


ActionScript Code:
package com.thecodebot.utils{    import flash.display.Stage;    import flash.events.Event;    import flash.events.KeyboardEvent;    import flash.display.MovieClip;    public class Key {        private static  var initialized:Boolean = false;        private static  var keysDown:Object = new Object();        private static  var events:Array = [];        private static  var actions:Array = [];        private static  var keys:Array = [];        private static  var pars:Array = [];        private static  var stage:Stage = null;        public static function initialize(stagePar:Stage) {            //Key.initialize(stage);     Required after import            if (!initialized) {                stage = stagePar;                stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);                stage.addEventListener(KeyboardEvent.KEY_UP, keyReleased);                stage.addEventListener(Event.DEACTIVATE, clearKeys);                stage.addEventListener(Event.ENTER_FRAME, keyHeld);                initialized = true;            }        }        public static function isDown(keyCode:uint):Boolean {            //if(Key.isDown(37)) {/*Left arrow key is down*/};            if (!initialized) {                throw new Error("Key class must be initialized!");            }            return Boolean(keyCode in keysDown);        }        private static function keyPressed(event:KeyboardEvent):void {            //Called whenever a key is pressed - can't ignore repeats                //because repeats are a keyUp and then a keyDown            for (var i=0; i<keys.length; i++) {                if (events[i] == KeyboardEvent.KEY_DOWN) {                    if (keys[i] == event.keyCode) {                        actions[i].apply(stage,pars[i]);                    }                }            }            keysDown[event.keyCode] = true;        }        private static function keyHeld(event:Event) {            //Called every frame, checks for all down keys            for (var i=0; i<keys.length; i++) {                if (events[i] == Event.ENTER_FRAME) {                    if (keys[i] in keysDown) {                        actions[i].apply(stage,pars[i]);                    }                }            }        }        private static function keyReleased(event:KeyboardEvent):void {            //Called whenever a key is released            for (var i=0; i<keys.length; i++) {                if (events[i] == KeyboardEvent.KEY_UP) {                    if (keys[i] == event.keyCode) {                        actions[i].apply(stage,pars[i]);                    }                }            }            if (event.keyCode in keysDown) {                delete keysDown[event.keyCode];            }        }        private static function clearKeys(event:Event):void {            //When mouse leaves movie, player can't track keys. Clear list.            keysDown = new Object();        }        public static function isKeyBound(key:uint):* {            //Only returns first binding of the key            for (var i=0; i<keys.length; i++) {                if (keys[i] == key) {                    return true;                }            }            return false;        }        public static function isActionBound(action:Function):* {            //Only returns first binding of the action            for (var i=0; i<actions.length; i++) {                if (actions[i] == action) {                    return true;                }            }            return false;        }        public static function isParBound(...par):* {            //Only returns first binding of the parameter set            for (var i=0; i<pars.length; i++) {                if (pars[i] == par) {                    return true;                }            }            return false;        }        public static function unbind(        e:* = null,action:Function = null,key:uint = 0,...par) {            var i:* = key!==0?isKeyBound(key):            (action!==null?isActionBound(action):            (par!==null?isParBound(par):false));            if (i !== false) {                if (e == null || events[i] == e) {                    if (action == null || actions[i] == action) {                        if (par !== null || pars[i] == par) {                            delete events[i];                            delete actions[i];                            delete keys[i];                            delete pars[i];                        }                    }                }            }        }        public static function bind(e:*,action:Function,key:uint,...par) {            unbind(e,action,key,par?par:[]);            events[events.length] = e;            actions[actions.length] = action;            keys[keys.length] = key;            pars[pars.length] = par?par:[];        }        public static function massbind(e:Array,action:Array,key:Array,par:Array) {            var len = e.length;            if (action.length == len && key.length == len && par.length == len) {                for (var i=0; i<e.length; i++) {                    var ba:Array=[e[i],action[i],key[i]];                    for(var j=0;j<par[i].length;j++) {                        ba[ba.length]=par[i][j];                    }                    bind.apply(Key,ba);                }            } else {                throw new Error("All arguments must be arrays with the same length");            }        }        public static function massunbind(e:Array,action:Array,key:Array,par:Array) {            var len = e.length;            if (action.length == len && key.length == len && par.length == len) {                for (var i=0; i<e.length; i++) {                    var ba:Array=[e[i],action[i],key[i]];                    for(var j=0;j<par[i].length;j++) {                        ba[ba.length]=par[i][j];                    }                    unbind.apply(Key,ba);                }            } else {                throw new Error("All arguments must be arrays with the same length");            }        }        public static function getAllBindings():Object {            var returnedKeys:Array = [];            for (var i=0; i<events.length; i++) {                returnedKeys[i]={event:events[i],action:actions[i],key:keys[i],parameters:pars[i]};            }            return returnedKeys;        }    }}

My First Real Attempt At Actionscript - Opinions?
Well, since my boss is wants me to learn flash, I thought
I would take up playing with it at home. Big mistake -
who would of ever thought how adictive making things in
it could be!

Well, coming from a coding background, I decided to whip up
a nice little particle system. I was wondering if you
guys/girls/others can comment on my use of actionscript.
Eg. efficiency, ease of use (aka, can it be transfered easily), and anything else you might think to say.

I have put the source up there, since you couldn't really do otherwise without it

without further ado:
http://www.codeatlas.com/flash/partical_gravity.html

Thanks in advance!

Desperate Attempt To Appeal To A Ceaser
HELP if someone will
I downloaded every feeback form off of Flash I cant get not one to work! please can someone help me out...Or just get one for and just email it to me. They even had some with simple cgi...button it didnt come with cgi script.
IM in a desperate situation . .. . .

America's Attempt At Keyboard Domination
I am writing a typing test and am in England so my keyboard thinks " is over the 2 and @ is over the '

So I was surprised to find that flash thinks that my keyboard is in america and has the " over the ' and the @ over the 2

Am I doing something wrong do I need to set some variable in my movie to tell it which country I am in ??

My system is correct and every other program works correctly ie gets the country for the envoriment settings

So my question is how to I tell flash which keyboard layout to use and how do I find out which country my user is in ??

Thanks

David

First Flash Attempt - Font Question.
Hello All,

Just completed my first attempt at Flash (version 5) and when I submitted it for comment, many viewers found the font was hard to read.
I wanted to use a pixel font, but most are too small. My other alternative is to use a Device font, but I rather not lose control over spacing and kerning. (The text looks different in the Flash composer than when displayed in my browser and I can't be sure how it will behave on other platforms)

This link is the original site with the text rendered in a pixel font Supertext 03
http://www.nicolep.ashst.com/co1/

This link is a test rework of the first 7 frames using Device font 13 point Arial
http://www.nicolep.ashst.com/co1/test.html

Does anyone know of a good pixel font (free would be nice ) that can match the size of Arial 13 or 14? Or is there a way to lock down a device font?

Many thanks,
Nicole P

First Attempt Sending Info To Database Via .asp
Hi There

I could really use some help from you gurus out there.

I am trying to get a .asp example file from an actionscripting book to work, but it keeps telling me that there is an error trying to open the .asp page on my server

I uploaded the .asp file, and the access file onto my server, but it is not communicating.

Are there any browswer settings or web-hosting settings I should be aware of before I try to send and receive information from a database?

Also, I eliminated one variable. In another document, I was able to pull information from a text file from my web server without any problems.

If you have any insight, please let me know.

Thank you.

Sean

Is This A Good Candidate For My First Attempt At A Class?
Hi,

I've been trying to learn about classes but many of the tutes I've found are straight to the "how" and skip around the "why", so I've been wasting a lot of time just following along robotically. After all I've read I'm still in the dark as to when it is appropriate to use them so I can't even get out of the gate. Can anybody please shed some light for me?

I recently created a Flash Panel that has an include on the first frame which assigns buttons to trigger several different jsfl commands. These commands are stored as seperate functions within a single jsfl file so that they can be called individually or as building blocks to create more advanced functions. e.g.:

Code:
//as
function runJS (jscr){//executes the jsfl command
MMExecute ('fl.runScript(..path...","' + jscr + '");');
}
addRectBtn.onRelease = function (){
runJS ("addRectangle");
}

//And the jsfl has dozens of commands ala:
function addNewLayer(){
...code
}
function addRectangle(){
...code
}
function makeMCbtn(){
addNewLayer();
addRectangle();
...etc
}
It looks like the type of script that would use a "myPanel" class, do you agree? If so, can you point me in the right direction? Is it basically just a matter of wrapping all of those functions up in a class statement, setting the classpath, and deciding which variables to make public/private/static? Would the runJS file be the constructor in this case? What do I have to gain? Help, I'm lost!!!

The other wrench is that the bulk of the functions are in jsfl. Now what do I do? Do people ever use jsfl classes? Would I be better off converting the bulk of the functions to AS as a class and use more MMEXECUTES? ...or should I just say "Screw-it, it's working fine as-is?".

Thank you for any advice.

Critique First Attempt At Building A Class
I'm working on my first class -- a class with extends the MovieClip class -- and I would like to get some critiquing on the structure.

The class will be assigned to a library movieclip and attached/initialized on demand. This class is one of 2-3 that I'm building for different types of quiz questions.


Code:
////////////////////////////////////////////////////////////////////////////////
// IMPORT CLASSES
////////////////////////////////////////////////////////////////////////////////
import mx.utils.Delegate;
import mx.xpath.XPathAPI;

class MultipleChoice extends MovieClip
{
////////////////////////////////////////////////////////////////////////////////
// VARIABLE DECLARATIONS
////////////////////////////////////////////////////////////////////////////////

// private vars
private var itemsURL:String = "http://somewebsite.com/quiz/load_items_for_question.php";
private var queID:Number; // question ID #
private var queType:String; // question type string
private var quePhoto:Boolean; // question photo active
private var answID:Number; // answer ID #
private var itemsXML:XML; // XML for question items
private var itemsData:Array; // array of objects to store question items
private var itemsDataLen:Number; // number of questions
private var itemLoader:MovieClipLoader; // not in use at this time

////////////////////////////////////////////////////////////////////////////////
// CONSTRUCTOR
////////////////////////////////////////////////////////////////////////////////

function MultipleChoice()
{
trace(this);
}

////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS
////////////////////////////////////////////////////////////////////////////////

function init(id:Number, type:String, photo:Boolean, answer_id:Number)
{
queID = id;
queType = type;
quePhoto = photo;
answID = answer_id;
itemsLoad();
}

private function itemsLoad():Void
{
itemsXML = new XML();
itemsXML.ignoreWhite = true;
itemsXML.onLoad = Delegate.create(this, itemsProcess);
itemsXML.load(itemsURL + "?quiz_que_id=" + queID);
}

private function itemsProcess(success:Boolean):Void
{
var xPathTemp:String = "/items/item";
var xPathData:Object = XPathAPI.selectNodeList(itemsXML.firstChild, xPathTemp);

itemsData = new Array();
itemsDataLen = xPathData.length;

for (var i:Number = 0; i < itemsDataLen; i++)
{
itemsData.push({
id:xPathData[i].attributes.id,
text:xPathData[i].childNodes[0].firstChild.nodeValue,
photo_url:xPathData[i].childNodes[1].firstChild.nodeValue
});
trace(itemsData[i].id);
trace(itemsData[i].text);
trace(itemsData[i].photo_url);
}
}

////////////////////////////////////////////////////////////////////////////////
// EVENT HANDLERS
////////////////////////////////////////////////////////////////////////////////


}
As I cycle through the questions in the quiz, I will attach a "choices" movieclip which is determined by the question type. A given question type will have 2-3 variants, and the class above will control how the movieclip renders those variants. Here's the very basic syntax involved:


Code:
this.attachMovie("MultipleChoice.mc", "choices", this.getNextHighestDepth()).init(1, "photos", true);
Where 1 = the question ID, "photos" = the multiple choice variant, and true = whether there's an overarching question photo (independent of the choices).

BACKGROUND: I've been in both the Flash Advanced Design and Advanced Application Development training classes, and I'm pretty familiar with classes. What I'm not good at is building them in practice. I know the basics, but I haven't had need until now to put one together.

Any suggestions for the class I've starting working on above are very much appreciated.

IronChefMorimoto

Copyright © 2005-08 www.BigResource.com, All rights reserved