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




Email Php Implementation ?



I have the kirupa_flash_php_email.swf that I've installed on a site. It works great, except that when you click on "send" button, it won't advance to 2nd frame of timeline to show the "thanks, we received your email" screen, most likely because the .swf is not on the main swf, it's being loaded into a container that resides on main swf.

It does work fine if I use it on it's own.

Is this a _root issue? I tried removing it, but no luck.

Thx for any guidance here.

Have a pleasant day!

Jed

here's the page if you want to see it:

www.fiveam.com/plumcrazy/plumhomephp.swf



Ultrashock Forums > Flash > Flash Newbie
Posted on: 2006-11-02


View Complete Forum Thread with Replies

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

Md5() Implementation >>>
Hi guys,

can anybody share the code that implements md5() algorithm in ActionScript?

SSL/TLS Implementation In AS3
Does anyone know how to implement SSL/TLS using socket connection in AS3?

thank you

niz

Looking For Unicode Implementation Example
hi, want to include eastern european characters with the #include command as descibed here:
http://www.macromedia.com/support/fl...in_flmx06.html

have tried lots of alternatives, but nothing worked.
has somebody a working example for me? (doesn't matter which language code)

important: i have to do it with the #include command, !!!! NOT !!!! as descibed here: http://www.macromedia.com/support/fl...in_flmx08.html

Banner Implementation?
Hi,
I just completed a banner ad, and it seems they've screwed up the implemetation. I've only seen it on a Mac, but it looks almost like a squashed jpg. I've tested puting it into a table cell that's too small, and though it slides over a bit it the text is still smooth, so I don't know what went wrong. Does anyone know? Does it look okay on a PC (text looks jagged for me)?

You can see it at http://www.oslopuls.no/, the top banner. There are two other banners I did on the same page, and they look fine. In IE, the skyscraper on the right is dropping below the top banner (should hit the top of the page, next to the banner), so something is clearly wrong. If someone could take a look I'd really appreciate it. Sorry for the cross post, but I need to tell the client soon.

Thanks a lot,
Adam

F8 - UNC Path Implementation
greetings,
I'm in a tight bind & need to implement a UNC path like RIGHT NOW for a meeting 20 minutes ago!!!

i have a flash presentation that calls media externally (images & text), there is an image folder & a text folder, & i need to implement a UNC path to call these, but i have no idea even what that means!

please help!!

super urgent!!

exclamation point!!!

[CS3] EPS/Shapefile Implementation
Hi all,

I am trying to create an interactive map, and I want all the countries of the world as seperate movie clips/buttons. Is there any way to import an EPS file or Shapefile into flash so i can use the lines someone else has made, or do I have to trace them myself?

Thanks alot.

Banner Implementation?
Hi,
I just completed a banner ad, and it seems they've screwed up the implemetation. I've only seen it on a Mac, but it looks almost like a squashed jpg. I've tested puting it into a table cell that's too small, and though it slides over a bit it the text is still smooth, so I don't know what went wrong. Does anyone know? Does it look okay on a PC (text looks jagged for me)?

You can see it at http://www.oslopuls.no/, the top banner. There are two other banners I did on the same page, and they look fine. In IE, the skyscraper on the right is dropping below the top banner (should hit the top of the page, next to the banner), so something is clearly wrong. If someone could take a look I'd really appreciate it. Sorry for the cross post, but I need to tell the client soon.

Thanks a lot,
Adam

Queue ADT Implementation
what's the most efficient way to implement a queue in actionscript2? The obvious way is to use an array, but that either needs to be spliced(inefficient) or grows very long very fast.

Idea Implementation
I have built a flash presentation that is 20 "slides" long. Each "slide" is a keyframe on the main timeline in which holds a movieclip of the information to be displayed. As the user progresses through the presentation, I want to have a button (btnReview) that when clicked, it records the _currentframe of the main timeline and stores is in a dynamic text field (txtReview) or some location. At the end of the presentation I would like to display the slide#'s so the user can easily go back and review the information. I have a couple of ideas on how to do this, but am not certain. The first thing I am unsure of is how to record the _currentframe into a text field located at the end of the presentation. I could keep the text field invisible until the last frame. Is it possible to script the button to add a number into the txtReview for each time btnReview is clicked. I am using AS2.

The ultimate then to this, in which I just thought of would be to have those numbers as buttons in which when clicked they would gotoAndPlay that frame # or label. But that isn't what I am concerened with, just an added idea.

Any ideas on how to achieve this are very much appreciated.

Luke

Flash UI Implementation
I recently read an older acticle about how multi threaded UI toolkits were a "failed dream" (http://weblogs.java.net/blog/kgh/archive/2004/10/multithreaded_t.html). This article makes a point about the trouble that a UI frame runs into when trying to allow multiple threads to manipulate the UI elements. In the end the solution is to implement a global lock; for example that every UI action must be done by one thread (e.g. Java Swing).

I believe the man, because he seems to "have been there" and other wise people came to the same result. However, I started to wonder about Flash. I have not coded flash much, but enough to have a feel about it.

One thing I have not encountered so far is the "you must do this and that on the GUI thread" issue, so either everything is done on the GUI thread or Flash handles that for me.

A second point is that I also never have ran into a "GUI is blocked and you must move the code to a separate thread" issue in Flash.

So I'm kinda wondering; did flash solve the multithreaded UI framework problem? How does Flash do the internal threading? Are there threads?

XML And Class Implementation?
Hey everyone,

I'm new to this forum and pretty new to AS.
I've created a fairly simple navigation bar.

SWF Sample

What I'd really like to do make this entirely dynamic by loading the images, tab names and hyperlink via XML (or an array). That way, I could use the same SWF and edit it via XML. I understand AS pretty well, but haven't wrapped my head around implementing XML and extending classes and such.

Any help or direction would be greatly appreciated. If you'd like the FLA, just let me know.

Cheers,
Michael

A* Implementation In Flash
Hi,

I posted an A* implementation a while ago. Since then, I've been adding features and making him faster. I now have version 1.10 ready to be published.

A* is a pathfinding engine. It searches the fastest route between 2 given points, in a Tile Based map. If that’s confusing to you, imagine a game like Zelda. In Zelda, you play a character named Link. Link has to save the princes (Zelda) and encounters many enemies a long the way. Well, this engine could (!) tell the enemies how to behave when they see Link. The enemies should have a descent way to get to Link, so that they can attack him. But how can the enemies find their way to link? That is done by using a PathFinding engine.
Another example is habbo (http://www.habbohotel.com/habbo/en/) . If you click somewhere on the map, your character will move there. This is also done by a pathfinding engine.
I’ve chosen A* because it supports a wide range of features. You can give costs to tiles, you can make them walkable or not, you can chose to use clipping (going diagonal) / no-clipping / semi clipping, you can set a different move cost to go diagonal, etc …


You can find all the info at my blog: www.dauntless.be

How to use it:
http://dauntless.be/blog/?p=38

How to install the component:
http://dauntless.be/blog/?p=33

What A* is about:
http://dauntless.be/blog/?p=22

The source:
http://dauntless.be/blog/?p=50

My experience with showing AS-projects is that you only get some comments if it's provided with at least 1 well-designd example. Therefore, I put one here:
http://dauntless.be/blog/?p=30

Also, last time, Tonypa (flashkit.com) told me that Zehn's implementation was way faster then mine. Ofcourse, it wouldn't be smart of me to just ignore the competition. Therefore, I made a little comparison:
http://dauntless.be/blog/?p=44

Please post all your criticism here or on my blog .

(I've chosen for a blog to put all my AS files on, 'cause it lets me keep all the files in 1 place and you guys could now where to find updates).

If anything is unclear, please tell me!


Attached si a little demo file. (You do have to have the classes installed to be able to use it, or add the component to the .fla file)

As3flickrlib Implementation
Hey guys,

Just released an implementation of Flickr content in Flash using the as3flickr lib. You can check out the experiment and the source on my blog: http://blog.organa.ca/?p=19


I've included a barebones version if you just want the Flickr functionality.

This project was written in Flash 9 AS3.

Enjoy,

Peter Organa

Preloader Implementation
Hi guys,

I came accross this piece of actionscript that is used to load external images but i cant figure out how i can implement a visible progress bar into the code.


Code:
MovieClip.prototype.loadPic = function(pic){
_root.containerMC._alpha = 0;
this.loadMovie(pic);
_root.onEnterFrame = function(){
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
if (t != 0 && (l/t) == 1){
var w = containerMC._width + spacing, h = containerMC._height + spacing;
border.resizeMe(w, h);
delete _root.onEnterFrame;
}
}
};
Any help would be greatly appreciated.

Video Implementation
I am baffled at how this site added video implementation with such fast load time. Any advice on how one accomplishes this?

Subtitles Implementation
Are there any example out there on how using subtitles (txt or xml i don't know actually) for a FLV player ?

I recall an example here which has had something of that nature but can't find it again

A tutorial or something would be welcome

Problems With A Crc32 Implementation
ok now I realize this isn't the best or most efficient or even a way that I should implement CRC32, BUT I figure if I can do it this way first then the other better ways will be easier to understand (or at the very least please afford me that discretion). I'm basically trying to compute the crc32 hash of the letter 'a' using ActionScript. So here's the code:
Code:
trace('Hash: ' + crc32('a'));

function crc32(input:String):String {
var hexInput:String = '';
for(var i:Number = 0; i < input.length; i++) {
hexInput += dechex(input.charCodeAt(i));
}
var binaryInput:String = '';
for(var i:Number = 0; i < hexInput.length; i++) {
switch(hexInput.charCodeAt(i)) {
case 48:
binaryInput += '0000';
break;
case 49:
binaryInput += '0001';
break;
case 50:
binaryInput += '0010';
break;
case 51:
binaryInput += '0011';
break;
case 52:
binaryInput += '0100';
break;
case 53:
binaryInput += '0101';
break;
case 54:
binaryInput += '0110';
break;
case 55:
binaryInput += '0111';
break;
case 56:
binaryInput += '1000';
break;
case 57:
binaryInput += '1001';
break;
case 97:
binaryInput += '1010';
break;
case 98:
binaryInput += '1011';
break;
case 99:
binaryInput += '1100';
break;
case 100:
binaryInput += '1101';
break;
case 101:
binaryInput += '1110';
break;
case 102:
binaryInput += '1111';
break;
}
}
var iterations:Number = binaryInput.length;
var binaryGenerator:String = '100000100110000010001110110110111'; //Big-endian
for(var i:Number = 0; i < binaryGenerator.length - 1; i++){
binaryInput += '0';
}
for(var i:Number = 0; i < iterations; i++) {
if(binaryInput.charAt(i) == '1') {
for(var j:Number = 0; j < binaryGenerator.length; j++) {
if(binaryInput.charAt(i + j) != binaryGenerator.charAt(j)){
binaryInput = replace(binaryInput, i + j, '1');
}else{
binaryInput = replace(binaryInput, i + j, '0');
}
}
}
trace(i + ': ' + binaryInput);
}
return binaryInput.substr(binaryInput.length - (binaryGenerator.length - 1));
}

function replace(original:String, index:Number, replacement:String):String {
if(index == 0){
return replacement + original.substr(1);
}
if(index == original.length - 1){
return original.substr(0, original.length - 1) + replacement;
}
return original.substr(0, index) + replacement + original.substr(index + 1);
}

function dechex(val:Number):String {
if(val < 0){
val += Math.pow(2, 32);
}
var output:String = '';
for(var i:Number = 0; i < 8; i++){
var remainder:Number = val % 16;
val = (val - remainder) / 16;
switch(remainder){
case 10:
output = 'a' + output;
break;
case 11:
output = 'b' + output;
break;
case 12:
output = 'c' + output;
break;
case 13:
output = 'd' + output;
break;
case 14:
output = 'e' + output;
break;
case 15:
output = 'f' + output;
break;
default:
output = remainder + output;
break;
}
}
do{
if(output.charCodeAt(0) == 48){
output = output.substr(1, output.length - 1);
}
}while(output.charCodeAt(0) == 48);
return output;
}
The output of this is:
Code:
0: 0110000100000000000000000000000000000000
1: 0010000000110000010001110110110111000000
2: 0000000010101000011001001101101100100000
3: 0000000010101000011001001101101100100000
4: 0000000010101000011001001101101100100000
5: 0000000010101000011001001101101100100000
6: 0000000010101000011001001101101100100000
7: 0000000010101000011001001101101100100000
Hash: 10101000011001001101101100100000
I performed this calculation by hand and it agrees with my code. SO somewhere along the line I'm missing something I just don't know what. It may have something to do with big-endian or little-endian format. I'm hoping someone can point me in the right direction in terms of what I'm doing wrong. The actual value of the hash should be 0xe8b7be43. I also appended the hash to the original message and then computed the crc checksum of that and it resulted to 0 which implies that the calculation is correct, so why don't my hash and the ACTUAL hash agree?

What Is The Best Class Package For 3D Implementation In AS3?
is papervision3d THE 3D flash package or is there something else out there that is equally impressive?

-z

Metrics / Analytics Implementation
does anyone know how to apply metrics in as2?

Flash 8 And Touchscreen Implementation
Hello everybody,

I graduating within a few months and now I've got this really great idea to present the stuff I'm doing now in some kind of installation/POI/kiosk. I was thinking of using flash for creating the interface by using bits of the pseudo 3d cube with clickable parts tutorial. This interface is projected in a touchscreen, so that the users can immerse in depth (I'm graduating within an architecture office).

Does anyone have some kind of experience with the use of flash and touchscreens? Advise, tips, hints or big no-no's? Or should I forget about this and master Lingo in a few months (which wont be something that'll make me happy )?

AS3 Mysql Driver/implementation
Some time ago Ive manage to create working mysql driver.

http://asql.mooska.pl/
http://mooska.pl/blog/?p=6

I would be greatfull if anyone would want to test it. There are probably many things to be done, but I hope You`ll find it usefull.

BitmapData.graphics Implementation
I've extended the BitmapData class to enable the following type of coding. All graphics calls are supported. Haven't done any performance testing but if anyone wants to test it - feel free.


Code:

// EXAMPLE USAGE

import BitmapDataEx; // BitmapDataEx extends flash.display.BitmapData

// create a BitmapDataEx object in exactly the same way
// as you would create a BitmapData object

var bmd = new BitmapDataEx(100, 100, true, 0xFFaabbcc);

// convert such to a displayable bitmap

var bitmap = new Bitmap(bmd);

// add the bitmap to the display list so it will be visible

addChild(bitmap);

// position the bitmap

bitmap.x = 100;
bitmap.y = 100;

// use graphics calls on the bitmap

bmd.graphics.clear();
bmd.graphics.lineStyle(1,0xFF0000);
bmd.graphics.beginFill(0xffbbaa);
bmd.graphics.drawCircle(50,50,40);
bmd.graphics.endFill();

// drawings are not actually drawn until you call draw

bmd.graphics.draw();

Implementation Of Terms & Condition
Hello friends

I am working on a flex project and implementing a Terms & condition screen. In this screen i am using TextArea to insert terms & condition. Below this Tesxt Area there is an Accept button. On Clicking of this button i need to check if user has scrolled complete text in Text Area..

Any Idea???

Thanks

Class Implementation Not Recognized
I have the following code:

Code:
Class A extends MovieClip implements IClass
{

}
Class A is the entry point class for a particular section of my application. Class B is a parent class that loads the resulting compiled Class A swf. In Class B I check for the following:

Code:
onLoadSwfComplete(e:Event):void
{
var displayObject:DisplayObject = _loader.contentLoaderInfo.content;
trace('is IClass: ' + Boolean(displayObject is IClass));
}
The above trace statement evaluates to FALSE. Any ideas as to why? I had this working originally when I was compiling via the Flash IDE. It broke as soon as I started compiling with the flex compiler (ver. 2.0.1).

My Favourite Implementation...easy?
Card carrying flashturbation and whirly add hater here.
Recently came across this: http://www.esanda.com/
Really like the way it's been done. Would personally add something ala SP's "don't show me this again", but other than that I found it unobtrusive and reasonably entertaining.
Could just be the novelty value - I'm sure 100 sites like this would get on my tits....but....how easy is it to achieve something like this - I'm thinking about having another dabble into the workd of Flash (something I haven't done for a couple of years)

AutoScrolling Text Box Implementation
Hey all,

I have a text box that scrolls upward by itself.  I'm using the _y property of a movie that contains a text box and just moving up. The scrolling has to pause on mouseover, resume on mouseout, and the user should be able to drag the text up and down to scroll the infomation themselves.

This much I've built. However, I want to dynamically generate the text on the server, and this method isn't compatable with that, simply because the scroll function must know the height of the textarea to know when to stop, start the text over, and to restrict the drag region.

Also, the dynamic text box does not have the ability to  grow when I load new text. It clips the contents. unless I'm missing something....  

What I'm looking for is a way to dynamically load the text this from a text/HTML file and still maintain this functionality.  

No need to build it for me, or anything that complex, just help with overcoming this design fault.

The Jhereg
=~=~=~=~=~=~=~=~=~=~
I never lie.
I'm building a reputation for honesty so I can blow it when something big comes along... This ain't it.


MD5 Or SHA1 ActionScript Implementation?
Hey all,

I'm reading Friends of Ed's object oriented AS for flash 8 and they say something about an MD5 or SHA1 ActionScript implementation to secure data entered into Flash.

I thought this type of thing should be done in php or similar script on the server side and not in Flash.

Can any one elaborate? i can't seem to find anything on the forums except for a "prototype" implementation.

Sweet

Dynamic Tint - Prototype Implementation
Hey,


I'm struggling to get this dynamic tint code working.

Code:
//tint an object with a color just like Effect panel
//r, g, b between 0 and 255; amount between 0 and 100
Color.prototype.setTint = function(r, g, b, amount) {
var percent = 100-amount;
var trans = new Object();
trans.ra = trans.ga=trans.ba=percent;
var ratio = amount/100;
trans.rb = r*ratio;
trans.gb = g*ratio;
trans.bb = b*ratio;
this.setTransform(trans);
};
//Robert Penner June 2001 - www.robertpenner.com


Can you explain how i use this?

Do i put it in an "onClipEvent(load)" and then use something like "setTint(244,123,241,80)" in an "onClipEvent(enterFrame)"

???

Thanks!

Speech/Dialogue Balloon Implementation
Hello,

I'm recently working on a project that needs pop-up balloons, so I made one by myself (basically ad-hoc). The idea is:

1. a Balloon class extending Sprite.
2. Set a DisplayObject as a target for the balloon.
3. Listen to MouseOver and MouseOut events.
4. When MouseOver is fired, draw a rectangle using "graphics" property of Balloon (inheriting from Sprite), with its position set at the mouse position of the target.
5. Add TextField to Sprite, adjust its position and show text in the balloon.
6. When MouseOut is fired, clear the rectangle and remove TextField.

However there is a problem with this approach. When I use it within a TileList, the balloon sometimes appears to be underneath the images.

Other than that, I don't think my approach is a good one (just did it ad-hoc to see what it look like), can anyone provide any clues on a better approach? Thanks.

Could Not Resolve X To A Component Implementation Problem
Hi,
I have run an example. The code is listed below:


Code:
package com.mydomain.components
{
import mx.controls.Label;

public class CircleLabel extends Label {

public var circleColor:uint = 0x000000;

public function CircleLabel(){
super();
}
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
super.updateDisplayList(unscaledWidth, unscaledHeight);
// Draw a circle around the label text
graphics.lineStyle(1, this.circleColor, 1.0);
graphics.drawEllipse(-5,-5,this.width+10,this.height+10);
}
}
}

Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:comps="com.mydomain.components.*"
backgroundColor="#FFFFFF" >

<mx:Panel title="CircleLabel Component" width="500" height="90"
paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10"
layout="horizontal">
<comps:CircleLabel text="Black Circle Label" circleColor="0x000000" />
<mx:Spacer width="20" />
<comps:CircleLabel text="Red Circle Label" circleColor="0xFF0000" />
</mx:Panel>

</mx:Application>
I am using Flex Builder 2.0.1. These file are put in the same Flex project and in the same folder. When I compilled them, there was an error: Could not resolve <comps:CircleLabel> to a component implementation.
Please help me to solve this problem.
Thank in advance,
Duc

Is There Any Implementation AMF(Action Messaging Format) For C++?
Does anybody know, is there any implementation AMF(Action Messaging Format) for c++?

Different Stages, Like Main Menu Implementation?
hello

what's the best way to make a main menu? is there a way to use AS 3 code to change between layers? like, open up layer main menu and then when a button is pressed open up another layer, which is completely different?

how do you usually do menus?

Sliding Menu And Math Implementation --> ?
The SWF of what I'd like it to do:

http://rwocreative.com/FLA_tests/new...b_timelin.html

The SWF of what it currently does:

http://rwocreative.com/FLA_tests/new...veTest01b.html

The FLA:

http://rwocreative.com/FLA_tests/new...oveTest01b.fla

The Question:

OK, I have this menu system that I'm trying to work out, where if I make a selection from the menu, all the buttons slide to the side (outside the stage), then reload on stage with new values inside. My question's regarding the sliding out part (I got the value switching part down, thx).

Above, I have two links: the first shows what I'd like my easing code (in the second link) to do, basically, when I press any button on-stage. Right now with the second link I can move the buttons *individually* and they'll slide to their appropriate spots off-stage, but I can't figure out the code to make them *all* slide off stage (not at the same time, but staggered like in the first link).

I think it's a setInterval, but I'm not sure where to put it. Here's some relevant code related to the animation of the buttons:

The functions:

PHP Code:



function moveTo(arry, myMC) {
    myMC._x = arry._x;
}

function easeTo(startA, goalA){
    //The amount of elasticity of the path. Original value: .85
    var flex = 0.3;
    //The closer drag is to 1 (from 0.0), the faster it "snaps". Original value: .05
    var drag = 0.3;
    //Start point
    var p  = startA;
    //Goal point
    var gp = goalA;
    p.xs = (p.xs*flex)+((gp._x-p._x)*drag); 
    p._x += p.xs; 
    //p.ys = (p.ys*flex)+((gp._y-p._y)*drag); 
    //p._y += p.ys; 





The implementation of the functions on-stage:

PHP Code:



onEnterFrame = function() {    
    for(var i = 0; i < mcCount.length; i++) {
        moveTo(mcCount[i], this["d"+i]);
        easeTo(mcCount[i], gArray[i]);
    }





The relevant button code:

PHP Code:



this.onRelease = function() {
    this.numHolder.setRGB(0x000000);
    if(this.closeIt == false) {
        trace("last = "+last);
        _parent.gArray[last] = _parent.posOpen[last];
        this.closeIt = true;
        return;
    }
    if(this.closeIt == true) {
        _parent.gArray[last] = _parent.posClose[last];
        this.closeIt = false;
        return;
    }





Thanks in advance for any help you can provide.

Java Script Implementation Question
Ok, I am a nOObie with this stuff. I have a flash movie header on my website. Our live support software using this javascript code to display 1 of 2 images. Either support is currently online or offline. What I would like to do is put this javascript code into the flash header on the site so that the when the last frame of the flash header movie completes the image would be shown. I have been reading on these forums but haven't found anything quite like what I am trying to do.

This is the javascript I am using:









Attach Code

<script language="JavaScript" src="http://livesupport.targetedwebsystems.com/js/status_image.php?base_url=http://livesupport.targetedwebsystems.com&l=admin&x=1&deptid=0&"></script>

Implementation Of Server Redirection Feature In FMS 3.5
Has anybody got pointers on implementing this new feature in FMS3.5? I have to say I find the Adobe documentation pretty unintuitive and difficult to get through. I come from a background of using Real Helix Server for the last 10 years, and from what I can see so far of FMS there are Flash development/coding skills required to do pretty basic administration tasks and configuration.

The impression I get is that it is not possible to implement live encoder redundancy without actually doing it via custom programming on the server? In Helix, for example, you can simply set up multiple encoders with filenames like stream.rm.1, stream.rm.2, stream.rm.3 pushed to a single or multiple servers, and the server automagically looks for those streams/encodes in order when a client/player requests stream.rm from the server.

I mean, this new feature is touted in the white paper and one of the top ten bullet points in the release notes, but I can't find anything intuitive anywhere that tells me as a server administrator how to actually implement it. (Or are Adobe following Steve Ballmer's famous mantra "Developers developers developers developers developers".. in that you actually have to be one to just run an FMS 3.5 server effectively..?)

Drag Selection Area Implementation
Hello,
I'm trying to implement a "drag selection area" functionality, like a clipping style. Where user will draw a rectangle on top of a series of sprites, and that will perform an action to those sprited whitin the rectangle.
I was wondering how it would be best to implment it? In terms of performance.
I was thinking of using the .containsPoint() of the Rectangle, however, that means I have to do lots os calculations as my sprites are lines drawn all over the screen. So, calculating the intersection points for all lines would not be good...
Is there a way to get the sprites or elements that are drawn "behind" the rectangle? since this lines are sprites and they are drawn before the rectangle I thought that will be a better way of getting the "selected" items?
Marcela

Array.Unshift Performance/implementation
Hey all! This is my first post here, although I've been involved via proxy for awhile through Raydred. He also talked me into getting on the Tetris top-ten score list in the arcade (some mad tetris genius seems to have the top spot). Anyway, I thought I'd pick your collective brains about something:

How does the Flash VM implement the Array.Unshift method?

I'm implementing a Circular Buffer old-school style (ie, allocating an array and having pointers for the head and tail elements in the array). However, since Flash offers Unshift and Pop methods, it's possible to implement a dynamically sized circular buffer by Unshifting new values onto an Array as they come in and Popping them off when needed. This interests me, as it seems easy and dynamic, but those same things make me worried about speed lol.

Has anyone tested performance of the Unshift method? Does it get slower as the array grows? Is it basically moving each element of the array 'over' by one then setting the first element, or is Macromedia more clever than that?

I'm mostly interested from a theoretical point of view, because I over-optimize everything when I can. I'd hate to use Unshift in an inner loop if it's actually slow.

Does Flash Have A Hashset/Hashmap Implementation?
Hi everyone,
Does Flash have a way of emulating Hashsets or Hashmaps? If it doesn't, what is the best way of storing and quickly retrieving 10-100 thousand entries of data?

Thanks,
Kirupa

COMMON< Audio Implementation Issue
i set mouse over animations for event driven sound files..
play once

i test on computer = works fine
but when i upload onto the net there is a delay between when the sound plays and when the user hovers his/her mouse over it


ive even noticed other flash websites doing this, and im sure its not my computer because im running a beast atm...

any tips/ideas

ive even seen V4 of 2advanced have this issue -_-

Array.Unshift Performance/implementation
Hey all! This is my first post here, although I've been involved via proxy for awhile through Raydred. He also talked me into getting on the Tetris top-ten score list in the arcade (some mad tetris genius seems to have the top spot). Anyway, I thought I'd pick your collective brains about something:

How does the Flash VM implement the Array.Unshift method?

I'm implementing a Circular Buffer old-school style (ie, allocating an array and having pointers for the head and tail elements in the array). However, since Flash offers Unshift and Pop methods, it's possible to implement a dynamically sized circular buffer by Unshifting new values onto an Array as they come in and Popping them off when needed. This interests me, as it seems easy and dynamic, but those same things make me worried about speed lol.

Has anyone tested performance of the Unshift method? Does it get slower as the array grows? Is it basically moving each element of the array 'over' by one then setting the first element, or is Macromedia more clever than that?

I'm mostly interested from a theoretical point of view, because I over-optimize everything when I can. I'd hate to use Unshift in an inner loop if it's actually slow.

Macromedia Homepage Menu Implementation?
Hi, for the past week or so i have been looking for a tutorial on how to create that same functionality as the menu which resides at the top of the macromedia homepage. it looks like they used the menubar component and managed to override the current functionality to show the list of links in a horizontal fashion below the menu instead of a drop down menu. I can think if ways of doing this without using the menu bar component but for a more robust solution i would like to implement it using the menubar component. Has anybody out there seen how macromedia done this? your help would be greatly appreciated

David

AS3 Class Implementation And External Images
Hi

So let's say I make this class

Code:

package
{
   import flash.display.Sprite;
   
   public class Square extends Sprite
   {
      public function Square()
      {
         init();
      }
      public function init():void
      {
         graphics.beginFill(0x000000);
         graphics.drawRect(-10, -10, 20, 20);
         graphics.endFill();
      }
   }
}

only instead of this part

Code:

graphics.beginFill(0x000000);
   graphics.drawRect(-10, -10, 20, 20);
   graphics.endFill();

I would like to have an external image file, like "myImage.gif", or something like that. How would I go about doing that?

Please don't suggest I import it into my library and then export it to actionscript as I would like to edit the class implementation further (unless you can suggest me a way to do this, via this method)

Thanks for any help you can give

Need Video Player Implementation Advice
I have build an FLV video player using a XML playlist. Now, when it comes time to upload I have to make a choice. Do I use streaming or progressive downloading. Unfortunaly, this is about the extent of my knowledge on hosting my video player. Though, as I understand you must have a host with a "rmtp" or Flash Media Server... correct? Which I do not. Correct me if I'm wrong but that would mean I have no choice but Progressive download. Now, I don't know, so can I really preform progressive with a standard hosting service? or is the load time just too long? Thanks for any advice you can give me. Also, I'm searching for a solution because having build a Player I would not want to embed any other player i.e. YouTube. Thanks again.

Super Dynamic Navigational Banner Implementation
I cant figure this banner out. The effect is used in
all types of si-fi films and shows. It really has me
stumped. Please help out a fellow artist beginner
scripting engineer. I dont need to know how they did it
I need to know how I can do it in MX. Note there version
was not taking me to any URL although I know it can be done.
Please provide a lead, a script, tut, anything that
can help me get to that result.

http://www.jolt.ca/portal/index.php?...tpage&Itemid=1

Click on the the banner "Welcome to jolt media".
Would anyone care to explain this navigational
result?

Dont be afraid to get complicated. Email @ xtc3d@hotmail.com

Please help me. Thanks

ScrollRect Issues In Full Browser Implementation
Hi all.. i thought this would be relatively simple but alas!

i have a parent movieclip which houses a movieclip which has a scrollrect applied.. i load images into the scrollrect and then in my document class on resize am trying to center the conainter movieclip with the scrollrect inside..



unfortunately the holder clip of the scrollRect gets a width equal to the width of all the images etc so i can't use it as a basis for scaling..



has anyone else encountered this or know of a fix..



see code below! ARG!



My Parent and scrollRect MovieClip




ActionScript Code:
public function CollectionImageScroller(imageArray:Array)
  {
   collectionImageScrollRect = new MovieClip();
   
   collectionImageScrollRect.scrollRect = new Rectangle(0, 0, 0, 0);
   collectionImagePathArrayFromXmlLoad = imageArray;
   if(collectionImagePathArrayFromXmlLoad.length > 0)
   {
    collectionImages = new Array();
    loadCollectionImage(collectionImagePathArrayFromXmlLoad[0]);
   }
   else
   {
    //display no images
   }
  }







function loadCollectionImage(imageUrl:String):void {
   loader = new Loader();
   loader.contentLoaderInfo.addEventListener(Event.INIT, showLoading);
   loader.contentLoaderInfo.addEventListener(Event.COMPLETE, initListener);
   loader.load(new URLRequest("http://jademichelle.tom.test" + imageUrl));
  }
 
  function showLoading(e:Event):void
  {
   removeEventListener(Event.INIT, showLoading);
   loaderIcon = new mcLoaderIcon();
   addChild(loaderIcon);
  }

  function initListener(event:Event):void {
   removeChild(loaderIcon);
   var currentImage:DisplayObject = loader.content;
   maxImageWidth = (maxImageWidth > currentImage.width) ? maxImageWidth : currentImage.width;
   maxImageHeight = (maxImageHeight > currentImage.height) ? maxImageHeight : currentImage.height;
   currentImage.x = currentImageX;
   collectionImageScrollRect.addChild(currentImage);
   currentImageX = currentImageX + currentImage.width + 5;
   p++;
   
   collectionImages.push(currentImage);
   if (p < collectionImagePathArrayFromXmlLoad.length) {
    loadCollectionImage(collectionImagePathArrayFromXmlLoad[p]);//create loop
   }
   if (p == collectionImagePathArrayFromXmlLoad.length) {
    //do when done
    this.graphics.drawRect(0,0, maxImageWidth, maxImageHeight);   
    collectionImageScrollRect.scrollRect = new Rectangle(0, 0, (maxImageWidth + 30), maxImageHeight);
   
   
    addChild(collectionImageScrollRect);
   
    var leftGradBorder:MovieClip = new mcGradBorder();
    leftGradBorder.x = -5;
    leftGradBorder.height = (maxImageHeight + 5);
    addChild(leftGradBorder);
   
    var rightGradBorder:MovieClip = new mcGradBorderRight();
    rightGradBorder.x = maxImageWidth - 20;
    rightGradBorder.height = (maxImageHeight + 5);
    addChild(rightGradBorder);
    collectionImageScrollRect.addEventListener(MouseEvent.CLICK, scrollMe);
    dispatchEvent(new Event("CollectionImagesLoaded", true, false));
    p=0;
   }
  }
 
  function scrollMe(e:MouseEvent):void
  {
   rect = collectionImageScrollRect.scrollRect;
   trace("rectx" + rect.x + "currentimgindex" + currentImageIndex);
   TweenLite.to(rect, 1, {x:(rect.x + collectionImages[currentImageIndex].width + 5),onUpdate:updateScrollRect, onComplete:function() { currentImageIndex++; }});
  }
 
  function updateScrollRect()
  {
   collectionImageScrollRect.scrollRect = rect;
  }





My Document Class handling scaling:




ActionScript Code:
function setBackground():void {
    if(collectionScroller != null)
   {
    collectionScroller.width = stage.stageWidth / 3;
    collectionScroller.height = stage.stageHeight / 3;
   
    collectionScroller.scaleX <= collectionScroller.scaleY ? (collectionScroller.scaleX = collectionScroller.scaleY) : (collectionScroller.scaleY = collectionScroller.scaleX);
    collectionScroller.x = stage.stageWidth / 2 - (collectionScroller.width / 2);
    collectionScroller.y = 100;
    trace(collectionScroller.CalculatedWidth);
   
   }
   }



function positionCollectionImages(e:Event):void
  {
   removeEventListener("CollectionImagesLoaded", positionCollectionImages);
   trace("MOOOOO");
   trace("CALCULATED WIDTH " + collectionScroller.CalculatedWidth + " collectionscrollerx" + collectionScroller.x + " collectionscrollerwidth" + collectionScroller.width + " maximagewidth" + collectionScroller.MaxImageWidth);

   collectionScroller.x = (stage.stageWidth / 2) - (collectionScroller.CalculatedWidth / 2);
   collectionScroller.alpha = 1;
   collectionScroller.visible = true;
   
   //TweenLite.to(collectionScroller,1,{alpha:1});

   setBackground();
  }

Bubbling Up Somehow Without Actual Event Redispatching Implementation?
Hey guys,

I've got 3 classes. Class C is instantiated in Class B and Class B is instantiated in Class A.

I want an event to dispatch in Class C and get handled in the Document Class where Class A is instantiated. Is there a way besides, actually doing a dispatchEvent in C,B,A and applying listeners to all 3.

Does the Event MetaTag help with this in flash?

ScrollRect Issues In Full Browser Implementation
Hi all.. i thought this would be relatively simple but alas!
i have a parent movieclip which houses a movieclip which has a scrollrect applied.. i load images into the scrollrect and then in my document class on resize am trying to center the conainter movieclip with the scrollrect inside..

unfortunately the holder clip of the scrollRect gets a width equal to the width of all the images etc so i can't use it as a basis for scaling..

has anyone else encountered this or know of a fix..

see code below! ARG!

My Parent and scrollRect MovieClip


Code:
public function CollectionImageScroller(imageArray:Array)
{
collectionImageScrollRect = new MovieClip();

collectionImageScrollRect.scrollRect = new Rectangle(0, 0, 0, 0);
collectionImagePathArrayFromXmlLoad = imageArray;
if(collectionImagePathArrayFromXmlLoad.length > 0)
{
collectionImages = new Array();
loadCollectionImage(collectionImagePathArrayFromXmlLoad[0]);
}
else
{
//display no images
}
}



function loadCollectionImage(imageUrl:String):void {
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, showLoading);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, initListener);
loader.load(new URLRequest("http://jademichelle.tom.test" + imageUrl));
}

function showLoading(e:Event):void
{
removeEventListener(Event.INIT, showLoading);
loaderIcon = new mcLoaderIcon();
addChild(loaderIcon);
}
function initListener(event:Event):void {
removeChild(loaderIcon);
var currentImage:DisplayObject = loader.content;
maxImageWidth = (maxImageWidth > currentImage.width) ? maxImageWidth : currentImage.width;
maxImageHeight = (maxImageHeight > currentImage.height) ? maxImageHeight : currentImage.height;
currentImage.x = currentImageX;
collectionImageScrollRect.addChild(currentImage);
currentImageX = currentImageX + currentImage.width + 5;
p++;

collectionImages.push(currentImage);
if (p < collectionImagePathArrayFromXmlLoad.length) {
loadCollectionImage(collectionImagePathArrayFromXmlLoad[p]);//create loop
}
if (p == collectionImagePathArrayFromXmlLoad.length) {
//do when done
this.graphics.drawRect(0,0, maxImageWidth, maxImageHeight);
collectionImageScrollRect.scrollRect = new Rectangle(0, 0, (maxImageWidth + 30), maxImageHeight);


addChild(collectionImageScrollRect);

var leftGradBorder:MovieClip = new mcGradBorder();
leftGradBorder.x = -5;
leftGradBorder.height = (maxImageHeight + 5);
addChild(leftGradBorder);

var rightGradBorder:MovieClip = new mcGradBorderRight();
rightGradBorder.x = maxImageWidth - 20;
rightGradBorder.height = (maxImageHeight + 5);
addChild(rightGradBorder);
collectionImageScrollRect.addEventListener(MouseEvent.CLICK, scrollMe);
dispatchEvent(new Event("CollectionImagesLoaded", true, false));
p=0;
}
}

function scrollMe(e:MouseEvent):void
{
rect = collectionImageScrollRect.scrollRect;
trace("rectx" + rect.x + "currentimgindex" + currentImageIndex);
TweenLite.to(rect, 1, {x:(rect.x + collectionImages[currentImageIndex].width + 5),onUpdate:updateScrollRect, onComplete:function() { currentImageIndex++; }});
}

function updateScrollRect()
{
collectionImageScrollRect.scrollRect = rect;
}

My Document Class handling scaling:


Code:

function setBackground():void {
if(collectionScroller != null)
{
collectionScroller.width = stage.stageWidth / 3;
collectionScroller.height = stage.stageHeight / 3;

collectionScroller.scaleX <= collectionScroller.scaleY ? (collectionScroller.scaleX = collectionScroller.scaleY) : (collectionScroller.scaleY = collectionScroller.scaleX);
collectionScroller.x = stage.stageWidth / 2 - (collectionScroller.width / 2);
collectionScroller.y = 100;
trace(collectionScroller.CalculatedWidth);

}
}

function positionCollectionImages(e:Event):void
{
removeEventListener("CollectionImagesLoaded", positionCollectionImages);
trace("MOOOOO");
trace("CALCULATED WIDTH " + collectionScroller.CalculatedWidth + " collectionscrollerx" + collectionScroller.x + " collectionscrollerwidth" + collectionScroller.width + " maximagewidth" + collectionScroller.MaxImageWidth);
collectionScroller.x = (stage.stageWidth / 2) - (collectionScroller.CalculatedWidth / 2);
collectionScroller.alpha = 1;
collectionScroller.visible = true;

//TweenLite.to(collectionScroller,1,{alpha:1});
setBackground();
}

Flash Panels - Inspiration, Creation And Implementation
This is an article discussion thread for discussing the SitePoint article, "Flash Panels - Inspiration, Creation and Implementation"

[F8] Flash 8 - Email Form: How To Get Users Specified Email In From Portion Of Email
Hey guys,

I want to add a newsletter to my new website that people can add their email addresses to. First off, I would like to have a field that the user can type his email address in, and have that field check if the email is valid (ie make sure that there is an @something.something).

Next, I would like it to send an email to my email address, with their email address in the from portion of the email (basically as if they have emailed me directly from their email). This way, it will be very easy for me to add them to my mailing list.

Thanks a ton for any help... Ive been searching for a while on how to do this, but couldn't find a way to put the users email in the from portion of the email.

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