[Flashcoders] EventController - AS3 Event Management

2010-04-02 Thread Corban Baxter
Hey guys I'm not sure if you have seen this yet or not but I wanted to share
with the list. About 2 weeks ago some friends and I launched a site for our
Event Management class we are calling EventController. You can check it out
at http://fla.as/ec.

I know there are a few others like this out there and even some other very
cool other options like Robert Penners Signals but this is a much smaller
library that gives some great options for all kinds of developers from
novice to advanced. Things like event logging, clustering and advanced
removing options with RegEx or by the object itself. I'd love for everyone
to take a look and let me know what they think! Cheers!


@corbanb
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] top down plane games

2009-02-03 Thread Corban Baxter
todd when you talked about a virtual spring what was it you were talking about?

On Mon, Jan 26, 2009 at 1:46 PM, Todd Kerpelman  wrote:
> Well, again, don't know how much this will help you, but in the past when
> I've done a "camera following a moving object with a scrolling background",
> I've attached a virtual spring from my camera to the position I want to go
> to and then just let the spring drag my camera to the right place. If you
> put on some pretty heavy damping, it ends up looking pretty good, and I
> don't have to think about angles. :)
>
> Your spring code would probably look something like this...
>
> private function onEnterFrame(e:Event):void
> {
>
> var accelX:Number = (_pointToFollow.x - this.x) * _k;
> var accelY:Number = (_pointToFollow.y - this.y) * _k;
> _velX += accelX;
> _velY += accelY;
> this.x += _velX;
> this.y += _velY;
> _velX *= _damping;
> _velY *= _damping;
>
> }
>
> You probably want _k to be something in the .1 range, and _damping to be in
> the .75 range. All of this assumes, by the way, that you're not rotating the
> camera to match the rotation of the plane.
>
> But the book Jason recommended might have better ideas. I haven't read it
> yet.
>
> --T
>
>
>
> On Sun, Jan 25, 2009 at 1:15 PM, Corban Baxter  wrote:
>
>> thanks todd. thats what I have been doing for the most part. I'm
>> working on figuring out how to move the Camera sprite around on an
>> angle.
>>
>> i've got script that makes the airplane point towards the mouse at all
>> times. but thats the easy part. now i need the Camera sprite to move
>> at a consistent rate at the same angle the plane is pointing. Just
>> can't see to figure out what it take to do that.
>>
>> var minXMove:Number = 0;
>> var minYMove:Number = 0;
>> var maxXMove:Number = (levelMap.width - stage.stageWidth) * -1;
>> var maxYMove:Number = (levelMap.height - stage.stageHeight) * -1;
>>
>> stage.addEventListener(Event.ENTER_FRAME, pointAtCursor);
>>
>> function movemap():void {
>>
>>
>>//move on x-axis
>>levelMap.x += speedX;
>>
>>if (levelMap.x >= minXMove) {
>>levelMap.x = minXMove;
>>}
>>if (levelMap.x <= maxXMove) {
>>levelMap.x = maxXMove;
>>}
>>
>>
>>//move on y-axis
>>levelMap.y += speedY;
>>
>>if (levelMap.y >= minYMove) {
>>levelMap.y = minYMove;
>>}
>>if (levelMap.y <= maxYMove) {
>>levelMap.y = maxYMove;
>>}
>> }
>>
>> function pointAtCursor(e:Event) {
>>
>>// get relative mouse location
>>var dx:Number = mouseX - plane.x;
>>var dy:Number = mouseY - plane.y;
>>speedX = (dx * -1);
>>speedY = (dy * -1);
>>
>>// determine angle, convert to degrees
>>var cursorAngle:Number = Math.atan2(dy,dx);
>>var cursorDegrees:Number = 360*(cursorAngle/(2*Math.PI));
>>
>>// point at cursor
>>plane.rotation = cursorDegrees;
>>
>>plane.x -= (plane.x-mouseX) / 6;
>>plane.y -= (plane.y-mouseY) / 6;
>>
>>movemap();
>>
>> }
>>
>> the hard part is getting the speedX and speedY to be numbers that
>> don't cause the map to fly to fast. Just not sure where to go from
>> here.
>>
>>
>>
>>
>> On Sun, Jan 25, 2009 at 2:42 PM, Todd Kerpelman  wrote:
>> > Well, I'm no plane game expert, but here's probably how I'd approach
>> it...
>> >
>> > Within your PlaneGame movie, create a child sprite called Camera.
>> >
>> > Make all your interface stuff children of the PlaneGame movie. But make
>> the
>> > background, your plane, the enemies, etc, all children of this Camera
>> child
>> > sprite.
>> >
>> > Then, when it comes to creating the "background scrolling below you"
>> look,
>> > don't have your background move at all. Only have the things that would
>> > actually move in real life (planes and tanks and whatever) move.
>> >
>> > Instead, make your Camera sprite scale and/or move itself to track your
>> > plane (or, even better, a point a couple hundred pixels in front of your
>> > plane.) That will make it look like the background is moving, but it's
>> > really staying in place. And it will simplify

Re: [Flashcoders] top down plane games

2009-01-28 Thread Corban Baxter
So I've been playing around with it some more and been getting a
little closer. But its still a ways off. The biggest issue with this
demo is that the plane catches the mouse before I reach the edges of
the map. I'm not sure what I can do next but thats where I am now. Its
funny to. About 20 mins after I posted this I decided to bite the
bullet and buy Keith's book. I'm going to open it tonight and see
where it gets me. If you guys have any more ideas please let me know!
Thanks!

What I've come up with so far is something like this...

var speed:Number = 2;
var turnRate:Number = .3;
var agroRange:Number = 500;

var moveX:Number = 0;
var moveY:Number = 0;
var distanceTotal:Number;

//stage vars
var minXMove:Number = 0;
var minYMove:Number = 0;
var maxXMove:Number = (levelMap.width - stage.stageWidth) * -1;
var maxYMove:Number = (levelMap.height - stage.stageHeight) * -1;

function movemap():void {


//move on x-axis
levelMap.x -= (moveX * 2);

if (levelMap.x >= minXMove) {
levelMap.x = minXMove;
//speedX *= -1;
}
if (levelMap.x <= maxXMove) {
levelMap.x = maxXMove;
//speedX *= -1;
}


//move on y-axis
levelMap.y -= (moveY * 2);

if (levelMap.y >= minYMove) {
levelMap.y = minYMove;
//speedY *= -1;
}
if (levelMap.y <= maxYMove) {
levelMap.y = maxYMove;
//speedY *= -1;
}
}





stage.addEventListener(Event.ENTER_FRAME, doFollow2);

//
// doFollow(follower, target)
// use ex: doFollow(myEnemyMovieClip, playerMovieClip)
//
function doFollow(e:Event) {

//calculate distance between follower and target
var distanceX:Number = mouseX - plane.x;
var distanceY:Number = mouseY - plane.y;

//get total distance as one number
distanceTotal = Math.sqrt((distanceX * distanceX) + (distanceY * 
distanceY));

//check if target is within agro range
if(distanceTotal <= agroRange){
//calculate how much to move
var moveDistanceX:Number = turnRate * (distanceX/distanceTotal);
var moveDistanceY:Number = turnRate * (distanceY/distanceTotal);

//increase current speed
moveX += moveDistanceX;
moveY += moveDistanceY;

//get total move distance
var totalmove = Math.sqrt(moveX*moveX+moveY*moveY);

//apply easing
moveX = speed * (moveX/totalmove);
moveY = speed * (moveY/totalmove);

//move follower
plane.x += moveX;
plane.y += moveY;

//rotate follower toward target
plane.rotation = 180*Math.atan2(moveY, moveX)/Math.PI;

movemap();

}   

}

On Mon, Jan 26, 2009 at 1:46 PM, Todd Kerpelman  wrote:
> Well, again, don't know how much this will help you, but in the past when
> I've done a "camera following a moving object with a scrolling background",
> I've attached a virtual spring from my camera to the position I want to go
> to and then just let the spring drag my camera to the right place. If you
> put on some pretty heavy damping, it ends up looking pretty good, and I
> don't have to think about angles. :)
>
> Your spring code would probably look something like this...
>
> private function onEnterFrame(e:Event):void
> {
>
> var accelX:Number = (_pointToFollow.x - this.x) * _k;
> var accelY:Number = (_pointToFollow.y - this.y) * _k;
> _velX += accelX;
> _velY += accelY;
> this.x += _velX;
> this.y += _velY;
> _velX *= _damping;
> _velY *= _damping;
>
> }
>
> You probably want _k to be something in the .1 range, and _damping to be in
> the .75 range. All of this assumes, by the way, that you're not rotating the
> camera to match the rotation of the plane.
>
> But the book Jason recommended might have better ideas. I haven't read it
> yet.
>
> --T
>
>
>
> On Sun, Jan 25, 2009 at 1:15 PM, Corban Baxter  wrote:
>
>> thanks todd. thats what I have been doing for the most part. I'm
>> working on figuring out how to move the Camera sprite around on an
>> angle.
>>
>> i've got script that makes the airplane point towards the mouse at all
>> times. but thats the easy part. now i need the Camera sprite to move
>> at a consistent rate at the same angle the plane is pointing. Just
>> can't see to figure out what it take to do that.
>>
>> var minXMove:Number

Re: [Flashcoders] top down plane games

2009-01-25 Thread Corban Baxter
thanks todd. thats what I have been doing for the most part. I'm
working on figuring out how to move the Camera sprite around on an
angle.

i've got script that makes the airplane point towards the mouse at all
times. but thats the easy part. now i need the Camera sprite to move
at a consistent rate at the same angle the plane is pointing. Just
can't see to figure out what it take to do that.

var minXMove:Number = 0;
var minYMove:Number = 0;
var maxXMove:Number = (levelMap.width - stage.stageWidth) * -1;
var maxYMove:Number = (levelMap.height - stage.stageHeight) * -1;

stage.addEventListener(Event.ENTER_FRAME, pointAtCursor);

function movemap():void {


//move on x-axis
levelMap.x += speedX;

if (levelMap.x >= minXMove) {
levelMap.x = minXMove;
}
if (levelMap.x <= maxXMove) {
levelMap.x = maxXMove;
}


//move on y-axis
levelMap.y += speedY;

if (levelMap.y >= minYMove) {
levelMap.y = minYMove;
}
if (levelMap.y <= maxYMove) {
levelMap.y = maxYMove;
}
}

function pointAtCursor(e:Event) {

// get relative mouse location
var dx:Number = mouseX - plane.x;
var dy:Number = mouseY - plane.y;
speedX = (dx * -1);
speedY = (dy * -1);

// determine angle, convert to degrees
var cursorAngle:Number = Math.atan2(dy,dx);
var cursorDegrees:Number = 360*(cursorAngle/(2*Math.PI));

// point at cursor
plane.rotation = cursorDegrees;

plane.x -= (plane.x-mouseX) / 6;
plane.y -= (plane.y-mouseY) / 6;

movemap();

}

the hard part is getting the speedX and speedY to be numbers that
don't cause the map to fly to fast. Just not sure where to go from
here.




On Sun, Jan 25, 2009 at 2:42 PM, Todd Kerpelman  wrote:
> Well, I'm no plane game expert, but here's probably how I'd approach it...
>
> Within your PlaneGame movie, create a child sprite called Camera.
>
> Make all your interface stuff children of the PlaneGame movie. But make the
> background, your plane, the enemies, etc, all children of this Camera child
> sprite.
>
> Then, when it comes to creating the "background scrolling below you" look,
> don't have your background move at all. Only have the things that would
> actually move in real life (planes and tanks and whatever) move.
>
> Instead, make your Camera sprite scale and/or move itself to track your
> plane (or, even better, a point a couple hundred pixels in front of your
> plane.) That will make it look like the background is moving, but it's
> really staying in place. And it will simplify your planes and tanks and
> bullets, because you can basically just look at each sprite's position and
> velocity, without having to try and somehow compensate for a magical moving
> background.
>
> For development purposes, by the way, I would start your game by not having
> the camera move at all, and just making sure everything works right in a
> tiny little world the size of your screen. Once that's working, then you can
> enlarge the bounds of your world and start moving your camera around.
>
> Good luck!
>
> --T
>
>
>
> On Sun, Jan 25, 2009 at 11:16 AM, Corban Baxter  wrote:
>
>> hey guys! I'm trying to build a simplified version of
>> http://www.miniclip.com/games/skies-of-war/en/. Mostly looking to
>> replicated the movement. But I have no ideas on where to start. I'm
>> having alot of trouble setting the angles correctly to give the
>> background a constant speed but allowing it to change angles. I
>> understand its going to be based on the planes current angle. But
>> that's where I get confused on getting the speeds to not over lap and
>> making it seem like it moving faster. Ok I'm rambling now. but I was
>> hoping someone might be able to help me understand this better and
>> give me some examples I could use to get moving. Any help would be
>> great! thanks!
>>
>> --
>> Corban Baxter
>> http://www.projectx4.com
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] top down plane games

2009-01-25 Thread Corban Baxter
hey guys! I'm trying to build a simplified version of
http://www.miniclip.com/games/skies-of-war/en/. Mostly looking to
replicated the movement. But I have no ideas on where to start. I'm
having alot of trouble setting the angles correctly to give the
background a constant speed but allowing it to change angles. I
understand its going to be based on the planes current angle. But
that's where I get confused on getting the speeds to not over lap and
making it seem like it moving faster. Ok I'm rambling now. but I was
hoping someone might be able to help me understand this better and
give me some examples I could use to get moving. Any help would be
great! thanks!

-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] effects theory? keeping processes low...

2008-12-10 Thread Corban Baxter
Hey guys I am working on a fullscreen flash site. I am hoping to bring
down the CPU cycles. Right now on the PC I'm using to test it on it
runs high like 90%. I was hoping there might be a way to bring down
the processor. But I have tried about everything. I'm not sure what I
could do to get it much lower. I'm sure there are a few pros out there
that would have a few ideas. Here is the page...
http://projectx4.com/site_test/. From all my tests it just seems like
moving that many large objects on the screen is just going to bring
the processor to its knees no matter what. Would any one have any
ideas how to help this at all?

Would doing some sort of bitmap object hack work either? Thanks for
the help in advance!

And Here is some code I have written to run the animation...

import gs.TweenLite;
import gs.easing.*;

var shell:MovieClip = this;

var maxOrbs:Number = 10;
var numOrbs:Number;

function animateOrb(mc:MovieClip):void
{
mc.orbTween = TweenLite.to(mc, 1, { alpha: 1 });
mc.orbTween = TweenLite.to(mc, mc.ranTime, { x: mc.moveToX,
ease:Linear.easeNone, overwrite: false });
mc.orbTween = TweenLite.to(mc, 1, {delay: mc.ranTime-1, alpha: 0,
onComplete: removeOrb, onCompleteScope: shell, onCompleteParams: [mc],
overwrite: false});

}

function createOrbs():void
{   

numOrbs = 0; //reset count

for(var i:int=0; ihttp://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] System.security HELP

2008-10-09 Thread Corban Baxter
yeah thats the thing. I have a loded SWF that is trying to talk to the
main swf from "mydomain.com". I can make it do the reverse but I was
getting the out of context error in both cases.

On Thu, Oct 9, 2008 at 3:14 PM, Glen Pike <[EMAIL PROTECTED]> wrote:
> Hi,
>
>   I am not sure about 2 SWF's communicating across domains - that sounds
> like it would use JavaScript, which probably won't work because it is
> essentially cross site scripting (XSS), which is usually "forbidden" for JS.
> If you are loading one SWF inside another, you need to have a
> crossdomain.xml file in the root directory of mydomain-other.com (if that is
> the SWF you are loading).  If it loads the SWF, then that bit works.  The
> next bit is whether the SWF you loaded is allowed to talk to the parent one,
> that maybe a bigger can of worms and I am still trying to get my head around
> it all.  I think you have to put the but there are some articles here...
>
>   http://www.adobe.com/devnet/flashplayer/security.html
> FP7 has the System.security stuff in, which will apply to 8 too.
>
>   I think you need to put your System.security.allowDomain in the child swf
> and allow the parent to call scripts on it...
> <http://www.adobe.com/devnet/flashplayer/security.html>
>
>   HTH
>
>   Glen
>
>
> Corban Baxter wrote:
>>
>> Hey guys! i have a really weird question I have never ran into before.
>> i am trying to host some SWF's on two serperate domains and get them
>> to talk to each other. But i keep getting the error *** Security
>> Sandbox Violation *** SecurityDomain
>> 'http://www.mydomain-other.com/mySWF.swf' tried to access incompatible
>> context 'http://www.mydomain.com/main.swf'. What can I do to get these
>> two to allow them to talk to each other? Is it a crossdomain issue or
>> soemthing else?
>>
>> I tried doing a few things like:
>> System.security.allowDomain("http://www.mydomain-other.com";);
>> System.security.sandboxType = "remote";
>>
>> And also setup some crossdomain files on both but still nothing. Any
>> ideas for me? Thanks! Oh and its a Flash 8 AS2 project. Thanks!
>>
>>
>
> --
>
> Glen Pike
> 01326 218440
> www.glenpike.co.uk <http://www.glenpike.co.uk>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] System.security HELP

2008-10-09 Thread Corban Baxter
Hey guys! i have a really weird question I have never ran into before.
i am trying to host some SWF's on two serperate domains and get them
to talk to each other. But i keep getting the error *** Security
Sandbox Violation *** SecurityDomain
'http://www.mydomain-other.com/mySWF.swf' tried to access incompatible
context 'http://www.mydomain.com/main.swf'. What can I do to get these
two to allow them to talk to each other? Is it a crossdomain issue or
soemthing else?

I tried doing a few things like:
System.security.allowDomain("http://www.mydomain-other.com";);
System.security.sandboxType = "remote";

And also setup some crossdomain files on both but still nothing. Any
ideas for me? Thanks! Oh and its a Flash 8 AS2 project. Thanks!

-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] as3 class libraries

2008-07-14 Thread Corban Baxter
I am trying to put together a list of some of the best AS3 and Flex
Libraries, Classes and Frameworks we have available. I was hoping to
get as much input form you guys as possible and what you guys use and
enjoy. Here are some examples I am looking for...

Frameworks:
GAIA
MATE
pureMVC

Video:
flvplayerlite

Data:
Flare

Games:
as3ds
ape

Animation:
Tweenlite
Tweener
Go

3D:
Papervision 3D
Away 3D

Graphics:
ActiveWindowBlur
Reflection

Utilites:
QueueLoader
ASMailer
bulkLoader

API:
youtube
flickr
yahoo maps

Audio:
?

If you guys have any more categories and input for my list I would
appreciate alot. Thanks for the help!


-- 
cb
http://blog.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] secure FLV linking

2008-05-13 Thread Corban Baxter
hey all I was wondering what is a pretty standard way to call an FLV
so its actually path isn't transparent. Like I want to call...
http://www.mysite.com/myFLV.flv but I don't want people to be able to
see the URL in service capture like that. I want it to be more like
http://www.mysite.com/something_encrypted. Sorry i'm not sure how to
say what i am looking to do but I hope this makes sense! any direction
on the standard for doing something like this would be great! thanks!

-- 
-cb
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] random char

2008-04-29 Thread Corban Baxter
hey guys I'm looking for a little help with doing something similar to
this: 
http://www.zeuslabs.us/2008/01/17/source-code-for-custom-textfields-with-cool-effects/...
but in AS2. Can someone point me in the right direction? thanks!

-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] AS3 - first site

2008-04-14 Thread Corban Baxter
Hey guys I am having some issues with understanding AS3 and how all my
scope etc works. Can I get some type of explanation on this. Below is
some code I am trying to use in my first AS3 project but I can't seem
to get a few things to work out.

The problem I see is that since my pictLdr is being put in the slide
it inherits the slide's click event. But I don't want the pictLdr to
have a click event I just want the slide (container) to have the
event. When the pictLdr gets clicked now I am returned with a name
value for the pictLdr but I only want the name of the slide since it
will have the 'num' var in it and can tell me its position in the
slide list. But pictLdr can't.

I hope what I am asking makes sense. But I am slightly confused on all
this. I understand why pictLdr is getting the event now since its part
of the slide and with the new event model this is possible. But with
my old AS2 mind I can't work around on how I am supposed to work
through this. Please help! Thanks!

function createSlides(slides:Array):void {
var totalSlides:Number = slides.length;
//trace(totalSlides);

//create container to hold all the clips

for (var i:int = 0; i < totalSlides; i++) {
//trace(slides[i].num + " " + slides[i].pages[0]);

var slide:SlideContainer = new SlideContainer();

slide.x = 130;
slide.y = -180 + (320 * i);//position slide along the y-axis
slide.num = i;
slide.name = "slide" + i;
slide.buttonMode = true;
slide.addEventListener(MouseEvent.CLICK, clicked);



container.addChildAt(slide, i);//container for each of the 
slides and is a MC


//this will hold additional info like a background for the 
images and a holder
var pictLdr:Loader = new Loader();
pictLdr.x = 22;
pictLdr.y = 19;
pictLdr.name = "img";
slide.addChild(pictLdr);//code works fine if I addChild here.

var pictURL:String = "gallery/" + slides[i].pages[0];//path to 
a jpg
for the gallery
var pictURLReq:URLRequest = new URLRequest(pictURL);
pictLdr.load(pictURLReq);

pictLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, 
imgLoaded);
}

}


function clicked(event:MouseEvent):void {
    trace(event.target.name); //returns img
moveSlides(-1);
}

-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] world clock - revisited

2008-03-27 Thread Corban Baxter
t;>
> 
> 
>   b="-60" d="-120">
> 
> 
>   b="-60" d="-120">
> 
> 
>  d="-120">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  ess="59"/>
> 
> 
>   b="-120" d="-180">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  d="-240">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>     
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  
>
>
>  On Wed, 26 Mar 2008 19:25:47 -0300, Corban Baxter <[EMAIL PROTECTED]>
>  wrote:
>
>
>
>  > Hey all,
>  > because of the daylight savings time going on across the world I was
>  > having trouble with the world clocks I setup for a client. I tried to
>  > implement the code below but was un succesful to do it correctly
>  > apparently. Does anyone have any working examples of this. And if so
>  > do you mind sharing? Thanks ALL!!
>  >
>  >
>  >
>  > Code via: Keith Reinsfield (I think* sorry...)
>  > dstPolicies = {
>  >USADLS:new DstPolicy(1,0,4, -1,0,10),
>  >EUDLS:new DstPolicy(-1,0,3, -1,0,10),
>  >AU2003DLS:new DstPolicy(-1,0,10, -1,0,3),
>  >AUTDLS:new DstPolicy(1,1,10, -1,0,3),
>  >RUDLS:new DstPolicy(-1,0,3, -1,0,10),
>  >EGDLS:new DstPolicy(-1,5,4, -1,4,9),
>  >IRDLS:new DstPolicy(-1,6,3, -1,1,9),
>  >IQDLS:new DstPolicy(255, 1,4, 255, 1,10),
>  >ILDLS:new DstPolicy(-1,4,3, 1,4,10),
>  >JODLS:new DstPolicy(-1,3,3, -1,4,10),
>  >NADLS:new DstPolicy(1,0,9, 1,0,4),
>  >PKDLS:new DstPolicy(1,6,4, 1,6,10),
>  >SYDLS:new DstPolicy(255,30,3, 255,21,9),
>  >CLDLS:new DstPolicy(2,0,10, 2,0,3),
>  >CLEDLS:new DstPolicy(2,5,10, 2,6,3),
>  >NZDLS:new DstPolicy(1,0,10, 3,0,3),
>  >PYDLS:new DstPolicy(1,0,9, 1,0,4),
>  >FKDLS:new DstPolicy(1,0,9, -1,0,4)
>  >};
>  >
>  > /*Where the first number is the position (1: first, -1:last, 255:
>  > straight
>  > date), the second and the third are the day/month.
>  > If the position is 255, the date is a straight day/month date, so for
>  > example for IRAQ the start date is April 1.
>  >
>  > The formulas for the calcs are:*/
>  >
>  > /**
>  > * @param y:int Year
>  > * @param m:int Month (0 - 11)
>  > * @param n:int Day of the week (0 for a Sunday, 1 for
>  > a Monday, 2 for a
>  > Tuesday, etc)
>  > * @param w:int Occurence (1:first, 2:second, 3:third,
>  > 4:fourth, -1:last)
>  > * @return real day of the month where the DST starts/ends
>  > *
>  > * first friday = w:1, n:5
>  > * third monday = w:3, n:1
>  > * last monday = w:-1, n:1
>  > */
>  >
>  > function calcStartEnd(y:Number, m:Number, n:Number, w:Numb

[Flashcoders] world clock - revisited

2008-03-26 Thread Corban Baxter
Hey all,
because of the daylight savings time going on across the world I was
having trouble with the world clocks I setup for a client. I tried to
implement the code below but was un succesful to do it correctly
apparently. Does anyone have any working examples of this. And if so
do you mind sharing? Thanks ALL!!



Code via: Keith Reinsfield (I think* sorry...)
dstPolicies = {
   USADLS:new DstPolicy(1,0,4, -1,0,10),
   EUDLS:new DstPolicy(-1,0,3, -1,0,10),
   AU2003DLS:new DstPolicy(-1,0,10, -1,0,3),
   AUTDLS:new DstPolicy(1,1,10, -1,0,3),
   RUDLS:new DstPolicy(-1,0,3, -1,0,10),
   EGDLS:new DstPolicy(-1,5,4, -1,4,9),
   IRDLS:new DstPolicy(-1,6,3, -1,1,9),
   IQDLS:new DstPolicy(255, 1,4, 255, 1,10),
   ILDLS:new DstPolicy(-1,4,3, 1,4,10),
   JODLS:new DstPolicy(-1,3,3, -1,4,10),
   NADLS:new DstPolicy(1,0,9, 1,0,4),
   PKDLS:new DstPolicy(1,6,4, 1,6,10),
   SYDLS:new DstPolicy(255,30,3, 255,21,9),
   CLDLS:new DstPolicy(2,0,10, 2,0,3),
   CLEDLS:new DstPolicy(2,5,10, 2,6,3),
   NZDLS:new DstPolicy(1,0,10, 3,0,3),
   PYDLS:new DstPolicy(1,0,9, 1,0,4),
   FKDLS:new DstPolicy(1,0,9, -1,0,4)
   };

/*Where the first number is the position (1: first, -1:last, 255: straight
date), the second and the third are the day/month.
If the position is 255, the date is a straight day/month date, so for
example for IRAQ the start date is April 1.

The formulas for the calcs are:*/

/**
* @param y:int Year
* @param m:int Month (0 - 11)
* @param n:int Day of the week (0 for a Sunday, 1 for
a Monday, 2 for a
Tuesday, etc)
* @param w:int Occurence (1:first, 2:second, 3:third,
4:fourth, -1:last)
* @return real day of the month where the DST starts/ends
*
* first friday = w:1, n:5
* third monday = w:3, n:1
* last monday = w:-1, n:1
*/

function calcStartEnd(y:Number, m:Number, n:Number, w:Number):Number {
if (w<0) {
var nd:Number = (new Date(y, m, 0)).getDate();
var diff:Number = (getDayOfWeek(y, m+1, nd)-n)%7;
if (diff<0) {
diff += 7;
}
return nd-diff;
}

var nq:Number = 7*w-6+(n-getDayOfWeek(y, m+1, 1))%7;
if (nq<1) {
nq += 7;
}

return nq;
}

/**
* @param y:int Year
* @param m:int Month (1 - 12)
* @param d:int Day (1 - 31)
* @return 0 for a Sunday, 1 for a Monday, 2 for a Tuesday, etc.
*/

function getDayOfWeek(y:Number, m:Number, d:Number):Number {
var a:Number = Number((14-m)/12);
y -= a;
m += 12*a-2;
var r:Number = 
(d+y+Number(y/4)-Number(y/100)+Number(y/400)+int((31*m)/12))%7;
if (r<0) {
return 7+r;

} else {
return r;
    }
}

-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AIR and FTP

2008-03-11 Thread Corban Baxter
wow!

On Mon, Mar 10, 2008 at 5:51 PM, Michael Avila <[EMAIL PROTECTED]> wrote:
> You would need to be able to communicate using the file transfer protocol
>  (FTP) ...
>  Try starting here:http://maliboo.pl/projects/FlexFTP/
>
>
>
>  On Mon, Mar 10, 2008 at 3:36 PM, Corban Baxter <[EMAIL PROTECTED]> wrote:
>
>  > Hey guys I had seen a post a while back about someone talking about
>  > building a FTP client with AIR? Does anyone remember this or am I
>  > dreaming? It is possibly to build right?
>  >
>  > --
>  > Corban Baxter
>  > http://www.projectx4.com
>  > ___
>  > Flashcoders mailing list
>  > Flashcoders@chattyfig.figleaf.com
>  > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>  >
>  ___
>  Flashcoders mailing list
>  Flashcoders@chattyfig.figleaf.com
>  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] AIR and FTP

2008-03-10 Thread Corban Baxter
Hey guys I had seen a post a while back about someone talking about
building a FTP client with AIR? Does anyone remember this or am I
dreaming? It is possibly to build right?

-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] External Interface + Google Analytics + IE7

2008-02-29 Thread Corban Baxter
thanks for sharing those classes Karim!

I had wrote some like this for myself but these are great! thanks!

On Fri, Feb 29, 2008 at 9:44 AM, Karim Beyrouti <[EMAIL PROTECTED]> wrote:
> I know this is not what you are asking for, but I use a getURL command to
>  call the tracking script: getURL("javascript:pageTracker._trackPageview('" +
>  str + "');");
>
>  I have built two classes for google analytics 1 for the urchin tracking, and
>  another for the gaTracker, Here are the links to the classes:
>
>  http://underground-bunker.com/transfer/gaTracker.as
>  http://underground-bunker.com/transfer/urchinTracker.as
>
>  maybe they will be usefull to someone.
>
>
>  - karim
>
>
>
>  -Original Message-
>  From: [EMAIL PROTECTED]
>  [mailto:[EMAIL PROTECTED] On Behalf Of Glen Pike
>  Sent: 29 February 2008 13:57
>  To: Flash Coders List
>  Subject: Re: [Flashcoders] External Interface + Google Analytics + IE7
>
>  Hi,
>
> Does anyone have any ideas about this?
>
> Glen
>
>  Glen Pike wrote:
>  > Hi,
>  >
>  >I have encountered a problem with an ExternalInterface.call causing
>  > IE7 to throw a JS error.
>  >
>  >I get an error message saying:
>  >Line: 1
>  >Char 14:
>  >Error: Expected ';'
>  >Code: 0;
>  >URL: http://www.dijitl.co.uk/beta/
>  >  So, my guessing is that somewhere the ExternalInterface call is
>  > not adding a semi-colon, but that IE 7 maybe getting it's knickers in
>  > a twist.  Either way, it's annoying and my tracking is not working.
>  > Can anyone shed light on this - I am using
>  > so.addParam("allowScriptAccess", "always"); with SWFObject too.
>  >  Ta
>  >
>  >Glen
>  >
>  >AS code is like this:
>  >  var page:String = evt.type.substr(5);
>  >  if (ExternalInterface.available) {
>  >ExternalInterface.call ("trackTesting", page);
>  >}
>  >
>  >Have also tried calling the pageTracker object directly -
>  > ExternalInterface.call("pageTracker._trackPageview", page); - but no joy.
>  >
>  >JS Code is like this:
>  >
>  >
>  >// <![CDATA[
>  >var pageTracker = _gat._getTracker("UA-DELETED");
>  >pageTracker._initData();
>  >pageTracker._trackPageview();
>  >  function trackTesting(page) {
>  >alert("before " + page);
>  >pageTracker._trackPageview(page);
>  >alert("after");
>  >}
>  >  // ]]>
>  >
>
>  --
>
>  Glen Pike
>  01736 759321
>  www.glenpike.co.uk <http://www.glenpike.co.uk>
>  _______
>  Flashcoders mailing list
>  Flashcoders@chattyfig.figleaf.com
>  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>
>  --
>  No virus found in this incoming message.
>  Checked by AVG Free Edition.
>  Version: 7.5.516 / Virus Database: 269.21.2/1304 - Release Date: 29/02/2008
>  08:18
>
>
>
>
>  ___
>  Flashcoders mailing list
>  Flashcoders@chattyfig.figleaf.com
>  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: lightweight AS2 combobox?

2008-02-25 Thread Corban Baxter
hey Brian I put one together a while back. Comboxes are the biggest
pain IMO but anyway. You can find the one i made on my blog at:
http://blog.projectx4.com/2008/01/31/quick-lil-combo-box/. It should
be pretty straight forward when you download it to see how it works.
And you should be able to extended very easily also. If you do will
you let me know. I'd like to see what you decided to do with it and so
would me readers! Thanks!

http://blog.projectx4.com/2008/01/31/quick-lil-combo-box/

On Sun, Feb 24, 2008 at 1:49 PM, Brian Weil <[EMAIL PROTECTED]> wrote:
> I realize it's not that difficult to make a simple combobox-like
>  movieclip, but I do need full functionality like keyboard support,
>  etc... It needs to function just like the browsers select element. The
>  closest thing i've found so far are the Ghostwire AS2 component. Their
>  combobox weighs 17KB  but those don't offer keyboard support either.
>  If I had an extra day I'd create this myself but I don't! I wouldn't
>  mid paying for the ghostwire component if it did what i needed.
>
>  Anyone else? Maybe a class that I could borrow from another AS2
>  framework?
>
>  Thanks,
>
>  Brian
>
>
>  On Feb 23, 2008, at 7:03 AM, [EMAIL PROTECTED]
>  wrote:
>
>  > Message: 16
>  > Date: Fri, 22 Feb 2008 17:28:05 -0500
>  > From: "eric e. dolecki" <[EMAIL PROTECTED]>
>  > Subject: Re: [Flashcoders] lightweight AS2 combobox?
>  > To: "Flash Coders List" 
>  > Message-ID:
>  >   <[EMAIL PROTECTED]>
>  > Content-Type: text/plain; charset=UTF-8
>
>
> >
>  > It wouldn't take much to get that working, unless you needed the
>  > keyboard to
>  > work & solve any focus issues. if its a click to open, scroll &
>  > select, you
>  > can do that with a mc, your own scrollbar & a mask.
>  >
>  > depends on how much functionality you really need.
>  >
>  > On Fri, Feb 22, 2008 at 3:31 PM, Brian Weil <[EMAIL PROTECTED]>
>  > wrote:
>  >
>  >> Does anybody have a good, lightweight AS2 combobox? The default flash
>  >> AS2 combobox is around 50k in an otherwise 5k swf. I just need to
>  >> display the 50 USA states in a flash form and the added 50K is way
>  >> too
>  >> much.
>  >>
>  >> Thanks,
>  >> Brian
>  >>
>  >>
>  >>
>  >>
>  >> ___
>  >> Flashcoders mailing list
>  >> Flashcoders@chattyfig.figleaf.com
>  >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>  >>
>  >
>
>  ___
>  Flashcoders mailing list
>  Flashcoders@chattyfig.figleaf.com
>  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AIR - NativeWindow Resizing

2008-02-19 Thread Corban Baxter
genius! I'd been hacking at this all day from 100 different ways. sigh*

that worked perfect. to bad the help docs suck so bad I'd never found that!

On Feb 19, 2008 5:34 PM, Kenneth Kawamoto <[EMAIL PROTECTED]> wrote:
> You may want to try something like:
>
> stage.nativeWindow.width
>
>
> Kenneth Kawamoto
> http://www.materiaprima.co.uk/
>
>
> Corban Baxter wrote:
> > Hey guys I am trying to get my AIR app's window to resize to the
> > dimensions of the FLV that is being displayed. I am not finding what
> > properties i need to use to make this happen. Can some one point me in
> > the right direction?
> >
> > I have been staring at this:
> > http://livedocs.adobe.com/labs/flex3/langref/flash/display/NativeWindowResize.html
> > trying to make sense of it. But not having much luck. Thanks in advance!
> >
> >
> > var meta:Object = new Object();
> > meta.onMetaData = function(meta:Object)
> > {
> >   video.width = meta.width;
> >   video.height = meta.height;
> >   NativeWindow.width = meta.width;
> >   NativeWindow.height = meta.height;
> >
> > }
> >
> > ns.client = meta;
> _______
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] AIR - NativeWindow Resizing

2008-02-19 Thread Corban Baxter
Hey guys I am trying to get my AIR app's window to resize to the
dimensions of the FLV that is being displayed. I am not finding what
properties i need to use to make this happen. Can some one point me in
the right direction?

I have been staring at this:
http://livedocs.adobe.com/labs/flex3/langref/flash/display/NativeWindowResize.html
trying to make sense of it. But not having much luck. Thanks in advance!


var meta:Object = new Object();
meta.onMetaData = function(meta:Object)
{
video.width = meta.width;
video.height = meta.height;
NativeWindow.width = meta.width;
NativeWindow.height = meta.height;

}

ns.client = meta;





-- 
Corban Baxter
http://blog.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] yahoo list?

2008-02-06 Thread Corban Baxter
sweet! Thanks guys!

On Feb 6, 2008 9:30 AM, Dwayne Neckles <[EMAIL PROTECTED]> wrote:
> http://tech.groups.yahoo.com/group/Flash_tiger/
>
>
>
> > Date: Wed, 6 Feb 2008 09:03:00 -0600
> > From: [EMAIL PROTECTED]
> > To: flashcoders@chattyfig.figleaf.com
> > Subject: [Flashcoders] yahoo list?
>
> >
> > Hey i had say a post a while back about another mailing list some
> > others were getting started that was just a spin off of flashcoders.
> > Could somebody link me? Thanks!
> >
> > --
> > Corban Baxter
> > http://www.projectx4.com
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> _
> Climb to the top of the charts! Play the word scramble challenge with star 
> power.
> http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_jan___
>
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] yahoo list?

2008-02-06 Thread Corban Baxter
Hey i had say a post a while back about another mailing list some
others were getting started that was just a spin off of flashcoders.
Could somebody link me? Thanks!

-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] mc code still runs after being removed...Huh?!?

2008-01-29 Thread Corban Baxter
was it possibly running a global function or method that needed to be
killed before it was removed?

On Jan 29, 2008 2:02 PM, Delmar Patton <[EMAIL PROTECTED]> wrote:
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] simple form validation

2008-01-29 Thread Corban Baxter
hey guys I just wanted some feedback on how you guys handle form's and
simple error checking. this is what I put together quickly this
morning for my form. but I was hoping to get some input on how to do
it better and what other options I have for validation. The project is
all AS2 and flash 8 also. Thanks in advance.


Code:

fName_input.tabEnabled = true;
lName_input.tabEnabled = true;
title_input.tabEnabled = true;
company_input.tabEnabled = true;
other_input.tabEnabled = true;


fName_input.tabIndex = 1;
lName_input.tabIndex = 2;
title_input.tabIndex = 3;
company_input.tabIndex = 4;
other_input.tabIndex = 5;

fName_input.restrict = "a-z A-Z \\- \\. \\,";
lName_input.restrict = "a-z A-Z \\- \\. \\,";

function checkFormCompletion():Void{

if(fName_input.length <= 1 || lName_input.length <= 1 ||
title_input.length <= 1 || company_input.length <= 1 ||
other_input.length <= 2){

_parent.nextBtn.enabled = false;
_parent.nextBtn.gotoAndStop(1);
_parent.nextBtn.onPress = null;


var errorString:String = this._name + "_error";
var errorMc:MovieClip = this._parent[errorString];
errorMc.gotoAndStop("active"); //display error

return; 
}

// if all fields complete turn on nextBtn to allow user to
move to the next step
_parent.nextBtn.enabled = true;
_parent.nextBtn.gotoAndStop(2);
_parent.nextBtn.onPress = _parent.leaveHomeForm;
}

function collectHomepageFormData():Void{
trace("DATA COLLECTED FROM HOMEPAGE FORM");
_global.userfName = fName_input.text;
_global.userlName = lName_input.text;
_global.userTitle = title_input.text;
_global.userCompany = company_input.text;
_global.userOther = other_input.text;

_global.userName = _global.userfName + " " + _global.userlName;
}

fName_input.onChanged = checkFormCompletion;
lName_input.onChanged = checkFormCompletion;
title_input.onChanged = checkFormCompletion;
company_input.onChanged = checkFormCompletion;
other_input.onChanged = checkFormCompletion;



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] scroll bars and live search

2008-01-25 Thread Corban Baxter
Ok so if one of you built this its great! But it made me think about
scrolling in flash and how much of a pain it has been. But this blog:
http://www.hornallanderson.com/#/blog/ has done an amazing job. And it
raised a few questions. Is this just a reskin of the new v3
components? And has anyone built something like this in AS2. I am
thinking of getting started on a simple prototype but we will see.

Also how would you go about doing a live search like they have done in
their blog? Is this one using some type of word press tool like this:
http://swx-wordpress.artillery.ch/. And then going from there. What do
you guys think?

-- 
Corban Baxter
http://blogprojectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Google Analytics ga.js Update

2008-01-17 Thread Corban Baxter
i'm hoping it was just the space! ha love that. I will find out
tomorrow when i start seeing it working in the system!

On Jan 16, 2008 3:06 PM, Jim Robson <[EMAIL PROTECTED]> wrote:
> Right, but my suggestion doesn't change that. I'm just referring to the
> syntax of the code inside your tracking() method; I'm not suggesting that
> you do away with the method.
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Corban
> Baxter
> Sent: Wednesday, January 16, 2008 3:45 PM
> To: Flash Coders List
>
> Subject: Re: [Flashcoders] Google Analytics ga.js Update
>
> I was trying to make it an easy call to the function from anywhere in
> the site. Thats why I created the function. I was hoping to just keep
> from having to write both lines all over the site.
>
> On Jan 16, 2008 2:17 PM, Jim Robson <[EMAIL PROTECTED]> wrote:
> > Corban,
> >
> > This may just be a typo in your email, but there was a space between the
> > underscore and "trackPageview". More to the point, did you try this
> syntax:
> >
> >
> > ExternalInterface.call("pageTracker._trackPageview", page);
> >
> > See:
> > Programming ActionScript 3.0 / Flash Player APIs / Using the external API
> /
> > Using the ExternalInterface class
> >
> > -Jim
> >
> >
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Corban
> > Baxter
> > Sent: Wednesday, January 16, 2008 3:00 PM
> > To: Flash Coders List
> > Subject: [Flashcoders] Google Analytics ga.js Update
> >
> >
> > Hey guys I was working on updating my script for the new Google
> > Analytics ga.js code. Can some one tell me what I might be missing in
> > my code?
> >
> > My actionscript:
> >
> >
> > function tracking(page) {
> > import flash.external.ExternalInterface;
> > ExternalInterface.call("pageTracker._ trackPageview('" + page +
> > "');");
> > }
> >
> > tracking("/flash/home");
> >
> > Google's Javascript:
> >
> > 
> > var gaJsHost = (("https:" == document.location.protocol) ?
> > "<a  rel="nofollow" href="https://ssl."">https://ssl."</a>; : "<a  rel="nofollow" href="http://www."">http://www."</a>;);
> > document.write(unescape("%3Cscript src='" + gaJsHost +
> > "google-analytics.com/ga.js'
> > type='text/javascript'%3E%3C/script%3E"));
> > 
> > 
> > var pageTracker = _gat._getTracker("UA-2876431-9");
> > pageTracker._initData();
> > pageTracker._trackPageview();
> > 
> >
> > Thanks in advance!
> >
> > --
> > -cb
> > http://blog.projectx4.com
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> >
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
>
>
> --
> Corban Baxter
> http://www.projectx4.com
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] progress Bar in AS3

2008-01-17 Thread Corban Baxter
http://www.bit-101.com/blog/?p=946


On Jan 14, 2008 9:27 AM, Gustavo Duenas
<[EMAIL PROTECTED]> wrote:
> Hi There is a way to set up the progress Bar to load the stage or
> main timeline.
>
> I have the component dragged to my stage, then I've click on pulled
> and in the source I'll write: root, _root
> well this one works in AS2, but Actually I've just migrated to AS3,
> so if you know a way to do this, please let me know.
>
> Regards
>
>
> Gustavo
>
>
> Gustavo A. Duenas
> Creative Director
> LEFT AND RIGHT SOLUTIONS
> 904.  265 0330 - 904. 386 7958
> www.leftandrightsolutions.com
> Jacksonville - Florida
>
>
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Google Analytics ga.js Update

2008-01-16 Thread Corban Baxter
I was trying to make it an easy call to the function from anywhere in
the site. Thats why I created the function. I was hoping to just keep
from having to write both lines all over the site.

On Jan 16, 2008 2:17 PM, Jim Robson <[EMAIL PROTECTED]> wrote:
> Corban,
>
> This may just be a typo in your email, but there was a space between the
> underscore and "trackPageview". More to the point, did you try this syntax:
>
>
> ExternalInterface.call("pageTracker._trackPageview", page);
>
> See:
> Programming ActionScript 3.0 / Flash Player APIs / Using the external API /
> Using the ExternalInterface class
>
> -Jim
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Corban
> Baxter
> Sent: Wednesday, January 16, 2008 3:00 PM
> To: Flash Coders List
> Subject: [Flashcoders] Google Analytics ga.js Update
>
>
> Hey guys I was working on updating my script for the new Google
> Analytics ga.js code. Can some one tell me what I might be missing in
> my code?
>
> My actionscript:
>
>
> function tracking(page) {
> import flash.external.ExternalInterface;
> ExternalInterface.call("pageTracker._ trackPageview('" + page +
> "');");
> }
>
> tracking("/flash/home");
>
> Google's Javascript:
>
> 
> var gaJsHost = (("https:" == document.location.protocol) ?
> "<a  rel="nofollow" href="https://ssl."">https://ssl."</a>; : "<a  rel="nofollow" href="http://www."">http://www."</a>;);
> document.write(unescape("%3Cscript src='" + gaJsHost +
> "google-analytics.com/ga.js'
> type='text/javascript'%3E%3C/script%3E"));
> 
> 
> var pageTracker = _gat._getTracker("UA-2876431-9");
> pageTracker._initData();
> pageTracker._trackPageview();
> 
>
> Thanks in advance!
>
> --
> -cb
> http://blog.projectx4.com
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
>
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Google Analytics ga.js Update

2008-01-16 Thread Corban Baxter
Hey guys I was working on updating my script for the new Google
Analytics ga.js code. Can some one tell me what I might be missing in
my code?

My actionscript:


function tracking(page) {
import flash.external.ExternalInterface;
ExternalInterface.call("pageTracker._ trackPageview('" + page + "');");
}

tracking("/flash/home");

Google's Javascript:


var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl."; : "http://www.";);
document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js'
type='text/javascript'%3E%3C/script%3E"));


var pageTracker = _gat._getTracker("UA-2876431-9");
pageTracker._initData();
pageTracker._trackPageview();


Thanks in advance!

-- 
-cb
http://blog.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] 4x3 laptop to a 16x9 tv

2008-01-06 Thread Corban Baxter
well i figured out the video solutions. its called use sorenson! 2pass
encoding is a life saver! why does adobe even have there own FLV
encoding if its going to suck. why would they not want to create a
product that outputs there video as best as humanly possible!?!?!?

On Jan 3, 2008 11:22 AM, eric e. dolecki <[EMAIL PROTECTED]> wrote:
> myVideoObject.smoothing = true
>
> try that
>
>
> On Jan 3, 2008 12:02 PM, Corban Baxter <[EMAIL PROTECTED]> wrote:
>
> > thanks. I'm going to test some things out. I did have things set like...
> >
> > fscommand("fullscreen","true");
> > fscommand("allowscale","false");
> > Stage.scaleMode = "noScale";
> >
> > it is an exe that they are running also.
> >
> > here is the animation...
> > http://thebhatch.com/uniden/ces/dect.swf
> >
> >  the actual movie is 800x600 so I've just been using a background thats
> > huge
> > so it will just center the content wherever its placed. and the background
> > will look stretched from top to bottom...
> >
> > oh and if any knows why I can't get the video in the background to look
> > smooth also that would be nice. thanks! right now its a 1280x720 mov thats
> > converted to the same but an FLV at a 1800 bitrate and its still
> > pixelating!
> > its driving me nuts too. sigh* back from the holidays.
> >
> >
> >
> > On Jan 3, 2008 9:39 AM, Andrew Sinning <[EMAIL PROTECTED]> wrote:
> >
> > > It sounds like either:
> > >
> > > Your client has got his laptop configured incorrectly.  It's possible to
> > > drive a 4x3 monitor at resolutions with different aspect ratios.  I've
> > > seen this on my PC laptop, but MacBooks spare the user the distortion by
> > > cropping the displayed view to render it without distortion.
> > >
> > > Or, you need to fix the aspect ratio of your movie.  Try using
> > > scale=exactfit and width and height = 100%.  This should display at the
> > > correct aspect ratio as long as the monitor setup correctly.
> > >
> > > Corban Baxter wrote:
> > > > hey guys,
> > > >
> > > > I'm working on a flash piece to be displayed on a 16x9 television but
> > > the
> > > > laptop our client is using is 4x3. So when all the art is mirrored
> > onto
> > > the
> > > > TV we get a bunch or squishing of the graphics. Anyone have some type
> > of
> > > > good fix for something like this? Thanks in advance.
> > > >
> > > >
> > >
> > > ___
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> >
> >
> >
> > --
> > Corban Baxter
> > http://www.projectx4.com
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> ___
>
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] 4x3 laptop to a 16x9 tv

2008-01-03 Thread Corban Baxter
thanks. I'm going to test some things out. I did have things set like...

fscommand("fullscreen","true");
fscommand("allowscale","false");
Stage.scaleMode = "noScale";

it is an exe that they are running also.

here is the animation...
http://thebhatch.com/uniden/ces/dect.swf

 the actual movie is 800x600 so I've just been using a background thats huge
so it will just center the content wherever its placed. and the background
will look stretched from top to bottom...

oh and if any knows why I can't get the video in the background to look
smooth also that would be nice. thanks! right now its a 1280x720 mov thats
converted to the same but an FLV at a 1800 bitrate and its still pixelating!
its driving me nuts too. sigh* back from the holidays.



On Jan 3, 2008 9:39 AM, Andrew Sinning <[EMAIL PROTECTED]> wrote:

> It sounds like either:
>
> Your client has got his laptop configured incorrectly.  It's possible to
> drive a 4x3 monitor at resolutions with different aspect ratios.  I've
> seen this on my PC laptop, but MacBooks spare the user the distortion by
> cropping the displayed view to render it without distortion.
>
> Or, you need to fix the aspect ratio of your movie.  Try using
> scale=exactfit and width and height = 100%.  This should display at the
> correct aspect ratio as long as the monitor setup correctly.
>
> Corban Baxter wrote:
> > hey guys,
> >
> > I'm working on a flash piece to be displayed on a 16x9 television but
> the
> > laptop our client is using is 4x3. So when all the art is mirrored onto
> the
> > TV we get a bunch or squishing of the graphics. Anyone have some type of
> > good fix for something like this? Thanks in advance.
> >
> >
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] 4x3 laptop to a 16x9 tv

2008-01-03 Thread Corban Baxter
hey guys,

I'm working on a flash piece to be displayed on a 16x9 television but the
laptop our client is using is 4x3. So when all the art is mirrored onto the
TV we get a bunch or squishing of the graphics. Anyone have some type of
good fix for something like this? Thanks in advance.

-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] AS2 scrollbar class

2007-12-14 Thread Corban Baxter
hey guys I have been looking for a good scroll bar class in AS2 something
that will allow me to chane the text in the scroll field and the scroll bar
will adjust dynamically and also work with the scroll wheel? Does anyone
know of anything out there that might be available? It doesn't have to be a
class just an example FLA would be awesome to. I have wrote a few of them
but i can't get anything to work all that wonderful! Thanks! And happy
flashing this holiday season!

-- 
-cb
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] animation tips?

2007-10-25 Thread Corban Baxter
First of all woohoo! FC is back online! I love it!

Ok so I have a question I'm hoping you guys can help answer for me. I'm
wanting to animate more or less a sine curve line from one point to the next
over like 2 secs or something. Right now I just have it being drawn from the
drawing API but I'd really like to animate its motion. What are my options I
can't wait to hear from you guys thanks!

here is what I have done so far:

function drawLine() {
worldMap.createEmptyMovieClip("connection",this.getNextHighestDepth());

worldMap.connection.lineStyle(1,0xFFA100,100);
worldMap.connection.moveTo(worldMap.UK._x, worldMap.UK._y);
worldMap.connection.curveTo(worldMap.UK._x+200, worldMap.UK._y-80,
worldMap.taiwan._x, worldMap.taiwan._y);
worldMap.connection.lineTo(worldMap.taiwan._x, worldMap.taiwan._y);

}


-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] OT: Force download PDF

2007-09-10 Thread Corban Baxter
thanks for the help guys. i wasn't familiar with the file reference class. i
had seen it in the past but never used it so thanks!

On 9/10/07, Jesse Graupmann <[EMAIL PROTECTED]> wrote:
>
> SOURCE
>
> http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm
> ?context=LiveDocs_Parts&file=2210.html
>
> NOTES
> -   Max 100 MB for download
> -   Only 1 download at a time
>
> //
> //
> //
> //
>
> import flash.net.FileReference;
>
> var listener:Object = new Object();
> var fileRef:FileReference = new FileReference();
> fileRef.addListener(listener);
>
> listener.onSelect = function(file:FileReference):Void {
> trace("onSelect: " + file.name);
> }
>
> listener.onCancel = function(file:FileReference):Void {
> trace ("onCancel");
> }
>
> listener.onOpen = function(file:FileReference):Void {
> trace ("onOpen: " + file.name);
> }
>
> listener.onProgress = function(file:FileReference, bytesLoaded:Number,
> bytesTotal:Number):Void {
> trace ("onProgress with bytesLoaded: " + bytesLoaded + " bytesTotal: "
> +
> bytesTotal);
> }
>
> listener.onComplete = function(file:FileReference):Void {
> trace ("onComplete: " + file.name);
> }
>
> listener.onIOError = function(file:FileReference):Void {
> trace ("onIOError: " + file.name);
> }
>
> //
> //
> //
> //
>
>
> function downloadFile ()
> {
> var url:String = "http://www.MYDOMAIN/DIR/FILENAME.jpg";;
> var success = fileRef.download (url, "savedFileName.jpg");
> if ( success )
> {
>     trace ("dialog box opened.");
> }
> else
> {
> trace ("dialog box failed to open!");
> }
> }
>
> btn.onPress = downloadFile;
>
>
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Corban
> Baxter
> Sent: Monday, September 10, 2007 9:32 AM
> To: Flashcoders mailing list
> Subject: [Flashcoders] OT: Force download PDF
>
> hey if I put a pdf link i flash and I saw. getURL("mypdf.pdf"); it keeps
> trying to open it in the browser. how can i force the browser to download
> the pdf?
>
> --
> Corban Baxter
> http://www.projectx4.com
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] OT: Force download PDF

2007-09-10 Thread Corban Baxter
hey if I put a pdf link i flash and I saw. getURL("mypdf.pdf"); it keeps
trying to open it in the browser. how can i force the browser to download
the pdf?

-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] disappearing menu????

2007-09-10 Thread Corban Baxter
Sorry for the double post but i quickly realized if I comment out the code
in my script for moving the menu the problem is fixed so it has something to
do with all of this code moving the menu... here is what I am doing...


var menuOut:Boolean = false;


btnHolder.onEnterFrame = function(){
minY = 455 - this._height; //done in the on enterframe for the menu to
get the height after all items have been loaded into it
maxY = 6;

//trace(minY);

 Move the img menu up and down

yMov = (230 - _ymouse)/100*10;

//sliding the menu this is where the BIG error occurs in OSX only and
the menu apparently slide off the screen
//if this block is commented out it stays on the screen but i still need
to get the menu to slide
   // ANYONE have some help for me here

yMov = (230 - _ymouse)/100*10;

if(_xmouse >= 8  && _xmouse <= 120 && _ymouse >= 230){

//trace(yMov);

if(this._y - yMov > minY){
this._y += yMov;
}else{
this._y = minY;
}

}else if(_xmouse >= 8 && _xmouse <= 120 && _ymouse <= 230){

//trace(yMov);


if(this._y + yMov < maxY){
this._y += yMov;
}else{
this._y = maxY;
}

}


//  OPENING AND CLOSING img nav   /

if(_xmouse >= 107 && menuOut == false){

//trace("OPENING");

this._parent.gotoAndPlay("open");
menuOut = true;

}else if(_xmouse < 8 && menuOut == true){

//trace("CLOSING");

this._parent.gotoAndPlay("close");
menuOut = false;
}

}

in the code above you can see where i am sliding the btnHolder but for some
reason when its in the browser it all goes to hell. anyone have any ideas
whe might be causeing it to jump off screen when the browser loses focus?

http://www.projectx4.com/quick_files/dissappearing_menu.zip

-- 
-cb
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] state array for combo box?

2007-09-10 Thread Corban Baxter
i was neededing something for the 50 US state. sorry i just wrote it.

On 9/10/07, Andy Herrman <[EMAIL PROTECTED]> wrote:
>
> state array?  I'm not sure what you mean.
>
>   -Andy
>
> On 9/9/07, Corban Baxter <[EMAIL PROTECTED]> wrote:
> > anyone have a simple state array for a combox i could steal? :) thanks!
> >
> > --
> > -cb
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] *** BUG or just plain weird!!!

2007-09-10 Thread Corban Baxter
ok guys I am having the most insanly weird problem. I just started
programming on a mac and testing on one. recently i built a pretty basic
menu that uses xml to load some thumbnails into a scrolling menu. its a
great expandable reusable menu. anyway once i published it and ran it in the
browser everything went to $h!t. For some reason whenever I am using the
site and i click out of the browser to another app and the flash looses
focus the entire menu disappears. just gone... poof... but nothing around it
goes away. WHY?!?!? i cannot figure it out. can anyone please help me with
this. its really only in osx and wither safari or firefox. i attached a link
to a zip that has the necessary files. if you just drag the 'swf' to a
browser window you can see it happen. but it will not do it in the IDE.
ANYONE have any ideas? thanks!

my last explanation might be something quirky with how I am moving the menu
with the _y mouse pos.

http://www.projectx4.com/quick_files/dissappearing_menu.zip


-- 
-cb
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] state array for combo box?

2007-09-09 Thread Corban Baxter
anyone have a simple state array for a combox i could steal? :) thanks!

-- 
-cb
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] coding a world clock

2007-09-07 Thread Corban Baxter
st monday = w:-1, n:1
> >  */
> >
> > private static function calcStartEnd(y:int, m:int,
> n:int,
> > w:int):int{
> > if (w < 0){
> > var nd:Number = (new Date(y, m,
> > 0)).getDate();
> > var diff:Number = (getDayOfWeek(y, m+1,
> > nd) - n) % 7;
> > if (diff < 0) diff += 7;
> > return nd-diff;
> > }
> >
> > var nq:int = 7 * w - 6 + (n - getDayOfWeek(y,
> m+1,
> > 1)) % 7;
> > if (nq < 1) nq += 7;
> >
> > return nq;
> > }
> >
> > /**
> >  * @param y:int Year
> >  * @param m:int Month (1 - 12)
> >  * @param d:int Day (1 - 31)
> >  * @return 0 for a Sunday, 1 for a Monday, 2 for a
> > Tuesday, etc.
> >  */
> >
> > private static function getDayOfWeek(y:int, m:int,
> > d:int):int{
> > var a:int = int((14 - m) / 12);
> > y -= a;
> > m += 12 * a - 2;
> > var r:int =  (d + y + int(y/4) - int(y/100) +
> > int(y/400)
> > + int((31*m)/12))%7;
> > if (r < 0) {
> > return 7+r;
> >
> > } else {
> > return r;
> > }
> > }
> >
> >
> >
> > Hope it helps...
> >
> >
> > On Thu, 06 Sep 2007 13:03:13 -0300, Keith Reinfeld
> > <[EMAIL PROTECTED]> wrote:
> >
> > > Hi Corban,
> > >
> > > Yes, I've been working on mine. I really want to thank Marcelo for the
> > > timezones array. Very helpful! Where did that come from?
> > >
> > > I have worked out a mechanism for applying Daylight Savings Time
> rules.
> > > Now
> > > all I need is the data, by location, to pass in.
> > >
> > > Note to Jim Berkey: First, thank you for the link. Nice touch with the
> > > iconic location graphics. Second, I'm getting a 404 for the worldclock
> > > source file. Just FYI.
> > >
> > > Regards,
> > >
> > > -Keith
> > > http://keithreinfeld.home.comcast.net
> > >
> > >
> > > ___
> > > Flashcoders@chattyfig.figleaf.com
> > > To change your subscription options or search the archive:
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > > Brought to you by Fig Leaf Software
> > > Premier Authorized Adobe Consulting and Training
> > > http://www.figleaf.com
> > > http://training.figleaf.com
> >
> >
> >
> > --
> > Marcelo Volmaro
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
>
>
>
> --
> John Van Horn
> [EMAIL PROTECTED]
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] the disappearing menu

2007-09-07 Thread Corban Baxter
hey guys can you all take a look at this site for me really quickly? I am
getting a strange problem with a menu i built but it only happens on mac. ok
o here is the url...

http://livemodernhomes.com/test/the_studio.html

now on the homepage when the profile loads a menu appears on the far left
side that scrolls thumbnails of a few images that are loaded via an XML file
that has the details of the images. anyway on a mac if I click to another
app the images in that menu just disappear! anyone have any idea what would
cause this. I can provide the FLA if need be also. Thanks!

-- 
cb
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] coding a world clock

2007-09-06 Thread Corban Baxter
t;Gibraltar","Hungary","Italy","Luxembourg","Macedonia","Mallorca
>
> Islands","Malta","Melilla","Monaco","Namibia","Netherlands","Niger","Nigeria","Norway","Poland","Portugal","San
>
> Marino","Slovakia","Slovenia","Spain","Sweden","Switzerland","Tunisia","Vatican
> City","Yugoslavia","Zaire Kinshasa Mbandaka","Croatia"],
> [2.00, "EET Eastern
>
> European","Belarus","Botswana","Bulgaria","Burundi","Cyprus","Egypt","Estonia","Finland","Greece","Israel","Jordan","Latvia","Lebanon","Lesotho","Libya","Lithuania","Malawi","Moldova","Moldovian
> Rep Pridnestrovye","Mozambique","Romania","Russian Federation zone
> one","Rwanda","South
> Africa","Sudan","Swaziland","Syria","Turkey","Ukraine","Zaire Haut
> Zaire","Zaire Kasai","Zaire Kivu","Zaire Shaba","Zambia","Zimbabwe"],
> [3.00,
>
> "Azerbaijan","Bahrain","Djibouti","Eritrea","Ethiopia","Iraq","Kenya","Kuwait","Madagascar","Mayotte","Qatar","Russian
> Federation zone two","Saudi
> Arabia","Somalia","Tanzania","Uganda","Yemen"],
> [3.50, "Iran"],
> [4.00,
> "Armenia","Georgia","Mauritius","Oman","Reunion","Russian
> Federation zone three","Seychelles","United Arab Emirates"],
> [4.50, "Afghanistan"],
> [5.00, "Kyrgyzstan","Maldives","Pakistan","Russian
> Federation zone
> four","Turkmenistan","Uzbekistan"],
> [5.50, "India","Sri Lanka"],
> [5.75, "Nepal"],
> [6.00, "Bangladesh","Bhutan","Kazakhstan","Russian
> Federation zone
> five","Tajikistan"],
> [6.50, "Myanmar"],
> [7.00, "Cambodia","Indonesia West","Laos","Russian
> Federation zone
> six","Thailand","Vietnam"],
> [8.00, "Australia Western","Brunei","China People's
> Rep","Hong
> Kong","Indonesia Central","Malaysia","Mongolia","Philippines","Russian
> Federation zone seven","Singapore","Taiwan"],
> [9.00, "YST: Yukon Standard","Indonesia
> East","Japan","Korea Dem
> Republic of","Korea Republic of","Palau","Russian Federation zone eight"],
> [9.50, "Australia Northern Territory","Australia South"],
> [10.00, "AHST: Alaska-Hawaii Standard","CAT: Central
> Alaska","HST:
> Hawaii Standard","Australia New South Wales","Australia
> Queensland","Australia Tasmania","Australia Victoria","Australian Capital
> Territory","Guam","Mariana Island","Northern Mariana Islands","Papua New
> Guinea","Russian Federation zone nine"],
> [10.50, "Australia Lord Howe Island"],
> [11.00, "Caroline Island","New Caledonia","New
> Hebrides","Ponape
> Island","Russian Federation zone ten","Solomon Islands","Vanuatu"],
> [11.50, "Norfolk Island"],
> [12.00, "IDLE: International Date Line
> East","Fiji","Kiribati","Kusaie","Kwajalein","Marshall Islands","Nauru
> Republic of","New Zealand","Pingelap","Russian Federation zone
> eleven","Tuvalu","Wake Island","Wallis and Futuna Islands"],
> [13.00, "Tonga"],
> [14.00, "Line Islands: Kiritibati"]
> ];
>
>
> Regards,
>
> On Sun, 02 Sep 2007 19:26:15 -0300, Keith Reinfeld
> <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > This thread inspired me to prototype my own world clock. And, yes the
> > Date
> > object does provide the means to convert local time to remote time IF
> you
> > have the remote location's GMT offset value to plug in. I think this is
> > the
> > data Corban was asking after. http://wwp.greenwichmeantime.com/ and
> > Wikipedia maybe good general information sources, but I haven't been
> > able to
> > find a nice tidy list of locations and their GMT offsets that I can
> > effortlessly implement in Flash.
> >
> > Regards,
> >
> > -Keith
> > http://keithreinfeld.home.comcast.net
> >
> >
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
>
>
>
> --
> _
> Marcelo Volmaro
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] SWX and security

2007-09-06 Thread Corban Baxter
i think this is a better question for the swx mailing list...

http://osflash.org/mailman/listinfo/swx_osflash.org

On 5/25/07, Jiri Heitlager | dadata.org <[EMAIL PROTECTED]> wrote:
>
> I have been reading up on  SWX by Aral Balkan and have a question that
> maybe the list can answer. Dealing with sending data to a server from
> flash there is always the question of security. Making games in flash
> and sending data to a server is always a hassle when the sended data
> needs to be obscured.
> I wonder if SWX has the potential to make sending data over the wire
> 'saver', that is when the swf is created on the server side, maybe it
> can be encrypted.
> But still the URL to the gateway on the server can be read with
> different tool, so that makes me wonder if it is possible at all.
>
> Some thoughts on the matter by the more genious among the list would be
> nice ;)
>
> Jiri
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] coding a world clock

2007-08-31 Thread Corban Baxter
Just wanted to know where I could get the data to code world clocks in
flash. Since flash works off the system clock am I able to get the time zone
or do I need to use a web service that is available to make this happen?

-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Flash CMS

2007-08-21 Thread Corban Baxter
Is there a good Flash CMS available for us that allows users to add sections
to nav and sub navs based on templates we setup via XML. Or just a large
robust Flash System that you all would recommend the cheaper the better. :)

-- 
corbanb
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] passing a cookie to a .NET web service

2007-08-08 Thread Corban Baxter
Is there a way for us to pass a cookie in flash to a .NET web service that
has enable session turned on? Anyone ever tried this?

-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Q:Papervision 3D for 'simple' rotating cube effect

2007-08-03 Thread Corban Baxter
this would be much better suited for the pv3d list...

  http://osflash.org/mailman/listinfo/papervision3d_osflash.org

On 7/30/07, Sunil Jolly <[EMAIL PROTECTED]> wrote:
>
> Hi J.Bach,
>
> It would be interesting to see/hear how you get along with this if you
> can post a link back here when it's done?
>
> Thanks,
>
> Sunil
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Zeh
> Fernando
> Sent: 30 July 2007 17:35
> To: flashcoders@chattyfig.figleaf.com
> Subject: Re: [Flashcoders] Q:Papervision 3D for 'simple' rotating cube
> effect
>
> Use PV3D. Just create a couple of planes, place them on the correct
> position, rotate them, and you're done. Works with AS2 and AS3 and
> should be something pretty simple as long as you understand the concept
> of 3d space and cameras.
>
> Zeh
>
> [EMAIL PROTECTED] wrote:
> > I am trying to achieve an effect similar to the 3D User switching
> effect in OSX.
> >
> > Would implementing Papervision 3D be overkill for something like this?
> >
> > Or is there an 'open source' solution available somewhere that uses
> matrix transformations, etc.
> >
> > My concerns for implementing this in order of priority are:
> > 1) Must be AS2 compatible (but ideally easilly upgraded to AS3)
> > 2) File size, don't want to add 80k in code to achieve this!
> > 3) Learning curve, I need to implement within 2 days!!
> >
> >
> > Thanks for any advice!
> >
> >
> > [e] jbach at bitstream.ca
> > [c] 416.668.0034
> > [w] www.bitstream.ca
> > 
> > "...all improvisation is life in search of a style."
> >  - Bruce Mau,'LifeStyle'
> > ___
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>



-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] least to greatest

2007-07-06 Thread Corban Baxter

thanks for all the help guys. I am going to play with sort and see if I
can't get this to work.

On 7/6/07, Steve Abaffy <[EMAIL PROTECTED]> wrote:


I am not sure if there is a sort method for arrays such as
Array.Sort(direction) if such a function does not exists then you can
always
write a quick bubble sort function.

function bubblesort(ArrayName){
changesmade = true;
for(y = 0; y < ArrayName.Length; y++{
if(changesmade){
changesmade = false;
for(x = 0; x < ArrayName.Length-1; x++){
if(ArrayName[x] < ArrayName[x+1]){
temp = ArrayName[x];
ArrayName[x] = ArrayName[x+1];
ArrayName[x+1] = temp;
Changesmade = true;
}
}
}
}
Return ArrayName;
}
If you want to sort in accending order or descending order as well the if
statement just needs to have the less than sign changed to a greater than
sign. There are ways of speeding this function up you can put in a
variable
that checks to see if you made any changes to the array with each pass
If no changes were made then array is sorted. But I might not bother with
this step for only 10 variables.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Corban
Baxter
Sent: Friday, July 06, 2007 8:50 AM
To: Flashcoders mailing list
Subject: [Flashcoders] least to greatest

Hey all I have a list of 10 numbers that I need to push into and array
from
least to greatest fairly often. What would be the fastest way to get this
accomplished? Or maybe just anyway to get this done would be a great help
thanks.

--
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





--
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] least to greatest

2007-07-06 Thread Corban Baxter

Hey all I have a list of 10 numbers that I need to push into and array from
least to greatest fairly often. What would be the fastest way to get this
accomplished? Or maybe just anyway to get this done would be a great help
thanks.

--
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] copying text to clipboard?

2007-06-25 Thread Corban Baxter

Hey guys a client is wanting me to create a combobox that has a button below
it that can copy text to the clipboard. Can flash access the clipboard?

--
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] webservices secure/unsecure

2007-05-15 Thread Corban Baxter

Hey guys I have a huge issue that I am trying to work through right now with
a secure web services call. Ok so here is the situation.

On server "A" I have  all my swfs calling the webservice
Server A is an unsecure server
On server "B" I have my PHP and SOAP files that are used for the web
service.
Server B is a secure non-self signing server

When attempting to connect the swf on server A to the data on server B the
connection never accepts when trying to start the webserviceconnector. But
if I place server A's files on a different server we will call server C that
is the same as server B that is a completely different url then server B it
will connect and transfer data just fine. I have done everything I can think
of with the crosdomain.xml files and the:
System.security.allowDomain("*");
System.security.loadPolicyFile("
https://www.mysecuredomain.com/crossdomain.xml";);

etc...

I have watch nike.com store work going this route but we cannot duplicate
the process with our tests. We have to have the swf domain remain unsecure
and have it connect to the secure domain. Does anyone have ideas or
experiece with these issues?

In a few cases I have read it does not work with the webServicesConnector
component but it should work doing it by importing the component via
actionscript. This is our companies first attempt at trying to accompish
this feat but nothing seems to work out. Not sure if its a domain issue or
browser security issue or flash security issue. Thanks for any help you guys
can give.


--
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Flash - using the back button

2007-03-15 Thread Corban Baxter

check out betrie bsraum's page history class this should get you started.

http://www.betriebsraum.de/blog/downloads/

On 3/15/07, Karim Beyrouti <[EMAIL PROTECTED]> wrote:


Hi All,

I was just wondering what the best way to activate the browser's back
button
for a Flash(8) app?... are there any up to date resources / tutorial about
this?...


Kind regards



Karim



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.11/721 - Release Date:
13/03/2007
16:51


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





--
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] applying themes to v2 components

2007-02-15 Thread Corban Baxter

var initObj:Object = new Object();

initObj.downArrowUpName = "HonkyTonk_ComboDownArrowDisabled";
initObj.downArrowDownName = "HonkyTonk_ComboDownArrowDown";
initObj.downArrowOverName = "HonkyTonk_ComboDownArrowOver";
initObj.downArrowDisabledName = "HonkyTonk_ComboDownArrowUp";
createClassObject(mx.controls.ComboBox,"dob_month",1,initObj);
import mx.controls.List;
import mx.controls.scrollClasses.ScrollBar;
ScrollBar.prototype.downArrowName = "HonkyTonk_ScrollDownArrowDisabled";
ScrollBar.prototype.downArrowUpName = "HonkyTonk_ScrollDownArrowUp";
ScrollBar.prototype.downArrowOverName = "HonkyTonk_ScrollDownArrowOver";
ScrollBar.prototype.downArrowDownName = "HonkyTonk_ScrollDownArrowDown";

ScrollBar.prototype.upArrowName = "HonkyTonk_ScrollUpArrowDisabled";
ScrollBar.prototype.upArrowUpName = "HonkyTonk_ScrollUpArrowUp";
ScrollBar.prototype.upArrowOverName = "HonkyTonk_ScrollUpArrowOver";
ScrollBar.prototype.upArrowDownName = "HonkyTonk_ScrollUpArrowDown";

Why does this not work and has anyone successfully got this to work? When i
run this it works fine for the combo box aarow but when i try to change the
scroll bar it all goes to hell and peices just don't show up together. Is
there any documention on this anywhere to help out with this process? I am
sure someone has done this and got it to work great for them. Does anyone
have a file or a site that helps to explain the process of completely
skinning a v2 comboBox correctly?

--
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] remoting gateways with user:pw

2006-12-12 Thread Corban Baxter

Anyone know why we are unable to get flash to authenticate this way...

var gateway:String = "http://user:[EMAIL PROTECTED]/gateway.php";
var pc:RelayResponder = new RelayResponder(this, "getUserId_Result",
"getUserId_Fault");
var ag:Service = new Service(gateway, null, "AnonGame", null, pc);
ag.getUserId();

or this way...

var gateway:String = "http://www.mysite.com/gateway.php";;
var pc:RelayResponder = new RelayResponder(this, "getUserId_Result",
"getUserId_Fault");
var ag:Service = new Service(gateway, null, "AnonGame", null, pc);
ag.connection.setCredentials("user","pw");
ag.geUserId();


We are trying to create a test app lication with 3 text fields for:
Gateway
Service
Method

it all works fine on a live servers but in a test enviorment that requires a
user:pw neither method works? Errr! any ideas guys?


--
Corban Baxter
http://blog.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] getting 5 random numbers out of 0-16 no dups

2006-11-30 Thread Corban Baxter

thanks guys. I appreciate it.

On 11/30/06, Odie Bracy <[EMAIL PROTECTED]> wrote:


This works for me:


for(i=0; i<5; i++){
seq[i]=99;
do{
mflg=0;
x=Math.floor(Math.random()*16);
for(j=0; j<=i; j++){
if(x==seq[j]) mflg=1;
}
} while(mflg==1);
seq[i]=x;
}

Odie

On Nov 30, 2006, at 5:49 PM, Corban Baxter wrote:

> Quick question. Whats the fastest way to get 5 random numbers out
> of a list
> of X number of numbers without having any duplicates?
>
> Kinda like the script below excpet it graps duplicates...
>
> var loopNum:Number = 16;
>
> function getRandomNums(){
>for(i=0; i<5; i++){
>
>lastNum = newNum;
>
>while(newNum == lastNum){
>newNum = random(loopNum);
>}
>
>questionOrder[i] = newNum;
>}
>trace(questionOrder); // 0,1,3,2,3 "how do I get no duplicates?"
>
> }
>
> --
> Corban Baxter
> http://www.projectx4.com
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





--
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] getting 5 random numbers out of 0-16 no dups

2006-11-30 Thread Corban Baxter

Quick question. Whats the fastest way to get 5 random numbers out of a list
of X number of numbers without having any duplicates?

Kinda like the script below excpet it graps duplicates...

var loopNum:Number = 16;

function getRandomNums(){
   for(i=0; i<5; i++){

   lastNum = newNum;

   while(newNum == lastNum){
   newNum = random(loopNum);
   }

   questionOrder[i] = newNum;
   }
   trace(questionOrder); // 0,1,3,2,3 "how do I get no duplicates?"

}

--
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Changing the Volume of a loaded FLV

2006-09-05 Thread Corban Baxter

hey karim,

this should be no problem. You should be able to use this...

sndLvl = 80;
myFLV.volume = sndLvl;

On 9/5/06, kariminal <[EMAIL PROTECTED]> wrote:


I am having some issues adjusting the volume of a external FLV. The sound
object only seems to me effective when I don't specify a target.

Ideally, I would like to adjust adjust the level of the FLV, instead of
global sound levels:

video_snd = new Sound( )

Anyone got any ideas for this one?



- karim

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





--
Corban Baxter
http://www.projectx4.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] HOW TO: Print a MC - first try.

2006-02-22 Thread Corban Baxter
Well guys I didn't expect me to be a hot topic but...ok here are a few
comments from my stand point...


1. Jason you're my hero. Not cause of this but your can code like a bad
man and your always willing to help out others in need.

2. Steve we all have bad days and can be short... I guess we just need
to all get a long and RTFQ (Read the freaking question). Ha ha.

3. So my question never got answered about best practice but its all in
the good. I got my print job to work. Not sure it's the best idea but it
works. I'd really like to get to the point where I know how I could
print a high-res file out of flash... if possible. That was what I
wanted to do but maybe since its in a 72dpi world it's a no can do.
That's where I was hoping to get some where with out of my post btw. But
I guess some things just get in the way and life doesn't work out.

4. That leaves me with... Well guys I will be off the list for a while I
am taking on a new job with tribalddb.com. Wish me luck. And Steve you
can have sometime off from lazy boys like me. Ha ha j/k ok maybe not. ok
maybe.  And Jason you can be free of helping my helpless ass for a while
also! ;) Hasta la vista. 

cb
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] HOW TO: Print a MC - first try.

2006-02-21 Thread Corban Baxter
And who said a little bitching gets us no where. I am not sure what
saved the b/w issue because it prints in color now fine. So it was a
simple fix. I just duplicated the MC I wanted to print scaled it down
and presto it worked!

cb


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven
Sacks
Sent: Tuesday, February 21, 2006 3:31 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] HOW TO: Print a MC - first try.

> All I get is a overly huge image in black/white that for some unknown
> reason is skewed also. How bout it anyone have some good 
> ideas for this
> first time PrintJob I am doing??? Thanks to you all!

Ok this is a valid question. You're having a specific problem
implementing
code.  Being technical is what this list is all about.

First off, I suggest printing a movieclip and not the stage.  So, put
your
card into the movieclip and specify that as the target instead of the
root.

Next, the reason you're getting something large is because of how Flash
prints pixels. You're printing 675x425.  At 72dpi, that's going to be
9.4x5.9 inches.

If you put your card into a movieclip you can scale down your movieclip
prior to printing.  Important to note that even if you scale it down,
PrintJob.addPage() wants you to pass it the original width and height of
the
movieclip prior to scaling even though it will print the scaled version.
Hopefully this will solve your skewing issue, as well.  I'm not entirely
sure why you're only getting black and white unless some preference for
your
printer on the Print Dialog window is defaulting to print only black and
white (draft perhaps).

You can save yourself ink and paper by printing to a Microsoft Document
Image file (.mdi) and preview your results there (if you're on Windows).
When the print dialog opens, choose Microsoft Office Document Image
Writer
as your printer.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] HOW TO: Print a MC - first try.

2006-02-21 Thread Corban Baxter
Well  if you must say I haven't read anything then do so... maybe I have
maybe I haven't, but I was looking for better suggestions? Who knows all
I know is when I print with the code below its in black and white. The
object is skewed and not even near the size I attended. How the freak do
I get things to print to scale, in color and correctly. That is my
problem and I was hoping to get answers without getting so technical


[code]
on(release)
{
var pj = new PrintJob();
var success = pj.start();
if(success)
{
pj.addPage(0, {xMin:0, xMax:675, yMin:0, yMax:425},
{printAsBitmap:true}, 20);
pj.send();
}
delete pj;
}
[/code]

All I get is a overly huge image in black/white that for some unknown
reason is skewed also. How bout it anyone have some good ideas for this
first time PrintJob I am doing??? Thanks to you all!



cb


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven
Sacks
Sent: Tuesday, February 21, 2006 2:47 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] HOW TO: Print a MC - first try.

> Right... Just wondered about any tutorials or peoples best practices.
> But if you feel like being a jerk to steam your own ego a bit 
> feel free.
> I didn't think this was a jerk off question one can be wrong.

Are you kidding me?  Open the Help panel in Flash and search for
"print".
It's not egotistical to point out that you're being lazy.  Did you even
GOOGLE it?

#2 listing on google for the search "printing in flash"
http://www.devx.com/webdev/Article/27318

It is a jerk off question to ask something this simple without first
searching in Flash and the web for your answer.  Hence, read the
freaking
manual.  But, since you're intent on not doing any footwork on your own,
here is the tutorial that is found inside Flash from the help panel.
Step
by step instructions.

Building a print job
To build a print job, you use functions that complete the tasks in the
order
outlined in this section. The sections that follow the procedure provide
explanations of the functions and properties associated with the
PrintJob
object.

Because you are spooling a print job to the user's operating system
between
your calls to PrintJob.start() and PrintJob.send(), and because the
PrintJob
functions might temporarily affect the Flash Player internal view of
onscreen Flash content, you should implement print-specific activities
only
between your calls to PrintJob.start() and PrintJob.send(). For example,
the
Flash content should not interact with the user between PrintJob.start()
and
PrintJob.send(). Instead, you should expeditiously complete formatting
of
your print job, add pages to the print job, and send the print job to
the
printer.

To build a print job:
Create an instance of the print job object: new PrintJob(). 
Start the print job and display the print dialog box for the operating
system: PrintJob.start(). For more information, see Starting a print
job. 
Add pages to the print job (call once per page to add to the print job):
PrintJob.addPage(). For more information, see Adding pages to a print
job. 
Send the print job to the printer: PrintJob.send(). For more
information,
see Sending the print job to the printer. 
Delete the print job: delete PrintJob. For more information, see
Deleting
the print job. 
The following example shows ActionScript that creates a print job for a
button:

myButton.onRelease = function()
{
  var my_pj = new PrintJob();
  var myResult = my_pj.start();
  if(myResult){
myResult = my_pj.addPage (0, {xMin : 0, xMax: 400, yMin: 0, 
  yMax: 400});
myResult = my_pj.addPage ("myMovieClip", {xMin : 0, xMax: 400, 
  yMin: 400, yMax: 800},{printAsBitmap:true}, 1);
myResult = my_pj.addPage (1, null,{printAsBitmap:false}, 2);
myResult = my_pj.addPage (0);

my_pj.send();
  }
  delete my_pj;
}

Only one print job can run at any given time. A second print job cannot
be
created until one of the following events has happened with the previous
print job: 

The print job was entirely successful and PrintJob.send() method was
called.

The PrintJob.start() method returned a value of false. 
The PrintJob.addPage() method returned a value of false. 
The delete PrintJob method has been called. 
 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

RE: [Flashcoders] HOW TO: Print a MC - first try.

2006-02-21 Thread Corban Baxter
Right... Just wondered about any tutorials or peoples best practices.
But if you feel like being a jerk to steam your own ego a bit feel free.
I didn't think this was a jerk off question one can be wrong.

cb


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven
Sacks
Sent: Tuesday, February 21, 2006 1:08 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] HOW TO: Print a MC - first try.

RTFM.

PrintJob

 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Corban Baxter
> Sent: Tuesday, February 21, 2006 8:18 AM
> To: flashcoders@chattyfig.figleaf.com
> Subject: [Flashcoders] HOW TO: Print a MC - first try.
> 
> 
> Hey guys I am looking to find a few good examples and maybe 
> get some of
> you to share a few good ideas. I am needing to setup up an online
> membership card that will have multiple dynamic parts from a 
> user image
> to member number, name etc. That part will be easy to display but what
> is the best way to capture this image to set to print. I 
> really want the
> easiest way but best way also. Can I just capture the MC and print it.
> Can I capture it as a JPEG or what is the best... flash paper? PDF? 
> 
> I would really appreciate any ideas/tutorials you all could 
> help me out
> with before I start this project. Thanks!
> 
> cb
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] HOW TO: Print a MC - first try.

2006-02-21 Thread Corban Baxter

Hey guys I am looking to find a few good examples and maybe get some of
you to share a few good ideas. I am needing to setup up an online
membership card that will have multiple dynamic parts from a user image
to member number, name etc. That part will be easy to display but what
is the best way to capture this image to set to print. I really want the
easiest way but best way also. Can I just capture the MC and print it.
Can I capture it as a JPEG or what is the best... flash paper? PDF? 

I would really appreciate any ideas/tutorials you all could help me out
with before I start this project. Thanks!

cb
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] styleSheets and Links

2006-02-17 Thread Corban Baxter
Does anyone have some good examples of Flash using CSS to stylize links with 
hover properties etc. I can't seem to get my color to work properly.

[code]
//first try at this one
var style_sheet = new TextField.StyleSheet();

style_sheet.setStyle("a", 
 { color: "#CC",
 fontFamily: "Verdana, sans-serif",
 fontSize: "11px",
 display: "inline"}
);

//attach movie BG
this.attachMovie("button_mc", "link_1", 2);
//add text field to button_mc clip
link_1.createTextField("my_title", 3, 1, 2, 0, 30);
link_1.my_title.autoSize = "center";
//apply style
link_1.my_title.styleSheet = style_sheet;

//add link
link_1.my_title.html = true;
link_1.my_title.htmlText="hey world!";

//find width of text
trace(link_1.my_title._width);

//resize bg for text - 49 is used for the extra pixel width added to the field.
link_1.button_bg._width = link_1.my_title._width + 49;
trace(link_1.button_bg._width);

//center link in BG area...
link_1.my_title._x = 25;

[/code]

Also how do I implement hovers when I do, do it?

Corban Baxter  |  rich media designer  |  www.funimation.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] flv playback won't work on live server.

2006-02-09 Thread Corban Baxter
Hey guys I know I asked this before but I never heard an answer. I cannot get 
the ClearOverAll.swf from the flash 8 flv component to load for me on a live 
server. Its only 6KB and it won't show up. I have tried everything anyone seen 
this issue?

Corban Baxter  |  rich media designer  |  www.funimation.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] FLVPlayback - ClearOverAll.swf

2006-02-08 Thread Corban Baxter
Will autohide do this?

cb

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Corban Baxter
Sent: Wednesday, February 08, 2006 5:09 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] FLVPlayback - ClearOverAll.swf

I guess you are trying to do an autohide?

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Boutin
Sent: Wednesday, February 08, 2006 2:59 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] FLVPlayback - ClearOverAll.swf

Hi Corban,

I  am having this same problem except I cant get the controls to go away 
once they popped up :) But everything works fine when testing locally.

Corban Baxter wrote:

>Hey guys I am working with the flash video playback component in flash 8 for 
>the first time today and I am having some problems getting the controls to 
>show up on line. Everything works fine locally but when I upload it to a 
>server the controls will never show up online. It's like the swf won't load 
>in. One thing I am doing this on a cold fusion site that uses the old include 
>method. Which always throws off the loading of things on a directory 
>structure? So I put the ClearOverAll.swf in the two locations that would make 
>sense. Does anyone know how that component loads into my file or what is 
>causing this?
>
>Corban Baxter  |  rich media designer  |  www.funimation.com
>
>
>___
>Flashcoders mailing list
>Flashcoders@chattyfig.figleaf.com
>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>
>
>  
>

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] FLVPlayback - ClearOverAll.swf

2006-02-08 Thread Corban Baxter
I guess you are trying to do an autohide?

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Boutin
Sent: Wednesday, February 08, 2006 2:59 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] FLVPlayback - ClearOverAll.swf

Hi Corban,

I  am having this same problem except I cant get the controls to go away 
once they popped up :) But everything works fine when testing locally.

Corban Baxter wrote:

>Hey guys I am working with the flash video playback component in flash 8 for 
>the first time today and I am having some problems getting the controls to 
>show up on line. Everything works fine locally but when I upload it to a 
>server the controls will never show up online. It's like the swf won't load 
>in. One thing I am doing this on a cold fusion site that uses the old include 
>method. Which always throws off the loading of things on a directory 
>structure? So I put the ClearOverAll.swf in the two locations that would make 
>sense. Does anyone know how that component loads into my file or what is 
>causing this?
>
>Corban Baxter  |  rich media designer  |  www.funimation.com
>
>
>___
>Flashcoders mailing list
>Flashcoders@chattyfig.figleaf.com
>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>
>
>  
>

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] FLVPlayback - ClearOverAll.swf

2006-02-08 Thread Corban Baxter
Hey guys I am working with the flash video playback component in flash 8 for 
the first time today and I am having some problems getting the controls to show 
up on line. Everything works fine locally but when I upload it to a server the 
controls will never show up online. It's like the swf won't load in. One thing 
I am doing this on a cold fusion site that uses the old include method. Which 
always throws off the loading of things on a directory structure? So I put the 
ClearOverAll.swf in the two locations that would make sense. Does anyone know 
how that component loads into my file or what is causing this?

Corban Baxter  |  rich media designer  |  www.funimation.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] dynamic text field whoas

2006-02-07 Thread Corban Baxter
Can anyone tell me why my text won't change in my percent.text field that I am 
creating dynamicly...?

[code]

var ldrFormat:TextFormat = new TextFormat();
ldrFormat.color = 0x00;
ldrFormat.font = "dirty_head";
ldrFormat.size = 69;

posX = 91;
posY = 0;
this.createTextField("percent", this.getNextHighestDepth(), posX, posY, 1, 1);
percent.autoSize = true;
percent.text = "0";
percent.embedFonts = true;
percent.setTextFormat(ldrFormat);

trace("percent.posX: " + posX);
trace("percent.posY: " + posY);


percentIcon_mc.onEnterFrame = function(){
spacing = percent._width+93;
//trace(this.percent);
this._x = spacing;
//trace(_parent.spacing);

loaded = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
//trace(total);
//trace(loaded);
percentNum = Math.floor((loaded/total)*100);
//percentNum.toString();
percent.text = percentNum;
    trace(percentNum);
}

stop();

[/code]

Corban Baxter  |  rich media designer  |  www.funimation.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] dynamic text field width

2006-02-07 Thread Corban Baxter
Hey guys just a quick question about creating dynamic text fields. 
I am working on a horizontal scrolling menu that uses xml to store url's and 
website titles that will be used to create a menu.
Below is example XML.


http://www.google.com />
http://www.msn.com />
http://www.yahoo.com />
etc


What I want to do is place the "title" in a dynamic text field and create a 
button around that text field. 
Problem is I need to determine the width of the text field by the length of the 
string so the buttons can vary in size.
Cause "google" is a lot longer than "MSN" etc..

|___|_title_|___| - Example button.. the blank area would be extend area for 
the hit state.

So is there a way to adjust the text field width to the length of the string?
I hope this makes enough sense to get the question answered. 
If you need more help let me know and I will put together some kind of a test 
to show.
I have tried but not really getting the results I want. Thanks all!


Corban Baxter  |  rich media designer  |  www.funimation.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] FFMPEG info

2006-02-03 Thread Corban Baxter
Could you guys help me out for a second I am looking for some good
information on FFMPEG the system that google uses to convert all video
formats to flv's for video.google.com. I am one looking for the download
and two looking for any information people have posted about there
experiences with FFMPEG. Thanks!

//cb


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] scope of function... undefined?

2006-02-03 Thread Corban Baxter
Well guys thanks for all the help! Everything is starting to work
besides one step. Which makes me wonder why Macromedia had it possible
to give a jpg a linkage id and it won't even work. I had all this going
all the scope in place and guess what it still didn't work. So then I
went back though all 106 images I had already given linkage ids to and
had to delete the linkage id and then make the image a movie clip and
give that one the correct linkage id. Anyway you guys rock! Thanks
again!

But why won't linkage id's work on jpgs and they give you the option?

//cb


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: Thursday, February 02, 2006 7:48 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] scope of function... undefined?

Dude - you didn't anger me - I was just trying to help calm you down  -
sometimes (and I speak from first hand experience) frustration with code
will compound and effect your ability to solve problems with logic -
sorry if I gave the wrong impression.  e-mail is a strange medium.  glad
you got it working.

Jason Merrill  
ICF Consulting E-learning Solutions









>>-Original Message-
>>From: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED] Behalf Of Corban
>>Baxter
>>Sent: Thursday, February 02, 2006 6:16 PM
>>To: Flashcoders mailing list
>>Subject: RE: [Flashcoders] scope of function... undefined?
>>
>>
>>Anyone? Sorry Jason I didn't mean to anger you. I have been looking at
>>this for almost 10hours now and I can't take it anymore!
>>
>>//cb
>>
>>
>>-Original Message-
>>From: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED] On Behalf Of Corban
>>Baxter
>>Sent: Thursday, February 02, 2006 3:50 PM
>>To: flashcoders@chattyfig.figleaf.com
>>Subject: [Flashcoders] scope of function... undefined?
>>
>>Hey all this is kind of a repost but I have a weird 
>>problem... Ok I have
>>a function I am calling on the root timeline and when I trace(this)
>>inside of it I am getting a return of undefined. What would 
>>cause this?
>>Here is the function. 
>>
>>[code]
>>
>>function loadImages(imagesToGrab:Number) {
>>  if (imagesToGrab == 0) {
>>  //stop loading images
>>  clearInterval(loadImgInterval);
>>  trace("hitting the clear");
>>  } else {
>>  var randomPos:Number = random(imagesToGrab)+1;
>>  var rfcClip:MovieClip = rfcsArray[randomPos];
>>  var imgID:String = imgArray[randomPos];
>>  
>>  //delete from array to keep from running one more than
>>once
>>  rfcsArray.splice(randomPos, 1);
>>  imgArray.splice(randomPos, 1);
>>  
>>  //trying to decipher wtf is going on
>>  trace("imgID: "+imgID); //returns layout5_set3_img10
>>  trace("rfcClip: "+rfcClip); //returns lay5_img10
>>  trace(this[rfcClip]); //returns undefined - WHY!
>>  trace(this); //returns undefined - WHY!
>>  
>>  //ALL ISSUES ARE OCCURING IN THIS LINE OF CODE FROM WHAT
>>I UNDERSTAND
>>  this[rfcClip].container.attachMovie(imgID, imgID,
>>this.getNextHighestDepth());
>>  
>>  
>>  imagesToGrab--;
>>  clearInterval(loadImgInterval);
>>  loadImgInterval = setInterval(loadImages, 2000,
>>imagesToGrab);
>>  }
>>  trace("imagesLeftToLoad: "+imagesToGrab);
>>  trace(" ");
>>}
>>
>>[/code]
>>
>>if you want to look at my FLA be my guest...
>>http://webdev.funimation.com/fun2004/coders/s3.zip
>>
>>
>>//cb
>>
>>
>>___
>>Flashcoders mailing list
>>Flashcoders@chattyfig.figleaf.com
>>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>___
>>Flashcoders mailing list
>>Flashcoders@chattyfig.figleaf.com
>>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
NOTICE:
This message is for the designated recipient only and may contain
privileged or confidential information. If you have received it in
error, please notify the sender immediately and delete the original. Any
other use of this e-mail by you is prohibited.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] scope of function... undefined?

2006-02-02 Thread Corban Baxter
Holy bageezaus!!! It no longer says undefined. No to just get these damn images 
to load correctly. Wow so I guess you need to give a scope to the Interval to 
help out. That's great! Thanks!

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Phelan
Sent: Thursday, February 02, 2006 5:45 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] scope of function... undefined?

Corban

Change your setInterval to this

loadImgInterval = setInterval(this,"loadImages", 2000,
imagesToGrab);

Jim

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Corban
Baxter
Sent: Thursday, February 02, 2006 6:16 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] scope of function... undefined?

Anyone? Sorry Jason I didn't mean to anger you. I have been looking at
this for almost 10hours now and I can't take it anymore!

//cb


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Corban
Baxter
Sent: Thursday, February 02, 2006 3:50 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] scope of function... undefined?

Hey all this is kind of a repost but I have a weird problem... Ok I have
a function I am calling on the root timeline and when I trace(this)
inside of it I am getting a return of undefined. What would cause this?
Here is the function. 

[code]

function loadImages(imagesToGrab:Number) {
if (imagesToGrab == 0) {
//stop loading images
clearInterval(loadImgInterval);
trace("hitting the clear");
} else {
var randomPos:Number = random(imagesToGrab)+1;
var rfcClip:MovieClip = rfcsArray[randomPos];
var imgID:String = imgArray[randomPos];

//delete from array to keep from running one more than
once
rfcsArray.splice(randomPos, 1);
imgArray.splice(randomPos, 1);

//trying to decipher wtf is going on
trace("imgID: "+imgID); //returns layout5_set3_img10
trace("rfcClip: "+rfcClip); //returns lay5_img10
trace(this[rfcClip]); //returns undefined - WHY!
trace(this); //returns undefined - WHY!

//ALL ISSUES ARE OCCURING IN THIS LINE OF CODE FROM WHAT
I UNDERSTAND
this[rfcClip].container.attachMovie(imgID, imgID,
this.getNextHighestDepth());


imagesToGrab--;
clearInterval(loadImgInterval);
loadImgInterval = setInterval(loadImages, 2000,
imagesToGrab);
}
trace("imagesLeftToLoad: "+imagesToGrab);
trace(" ");
}

[/code]

if you want to look at my FLA be my guest...
http://webdev.funimation.com/fun2004/coders/s3.zip


//cb


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] scope of function... undefined?

2006-02-02 Thread Corban Baxter
Anyone? Sorry Jason I didn't mean to anger you. I have been looking at
this for almost 10hours now and I can't take it anymore!

//cb


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Corban
Baxter
Sent: Thursday, February 02, 2006 3:50 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] scope of function... undefined?

Hey all this is kind of a repost but I have a weird problem... Ok I have
a function I am calling on the root timeline and when I trace(this)
inside of it I am getting a return of undefined. What would cause this?
Here is the function. 

[code]

function loadImages(imagesToGrab:Number) {
if (imagesToGrab == 0) {
//stop loading images
clearInterval(loadImgInterval);
trace("hitting the clear");
} else {
var randomPos:Number = random(imagesToGrab)+1;
var rfcClip:MovieClip = rfcsArray[randomPos];
var imgID:String = imgArray[randomPos];

//delete from array to keep from running one more than
once
rfcsArray.splice(randomPos, 1);
imgArray.splice(randomPos, 1);

//trying to decipher wtf is going on
trace("imgID: "+imgID); //returns layout5_set3_img10
trace("rfcClip: "+rfcClip); //returns lay5_img10
trace(this[rfcClip]); //returns undefined - WHY!
trace(this); //returns undefined - WHY!

//ALL ISSUES ARE OCCURING IN THIS LINE OF CODE FROM WHAT
I UNDERSTAND
this[rfcClip].container.attachMovie(imgID, imgID,
this.getNextHighestDepth());


imagesToGrab--;
clearInterval(loadImgInterval);
loadImgInterval = setInterval(loadImages, 2000,
imagesToGrab);
}
trace("imagesLeftToLoad: "+imagesToGrab);
trace(" ");
}

[/code]

if you want to look at my FLA be my guest...
http://webdev.funimation.com/fun2004/coders/s3.zip


//cb


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] scope of function... undefined?

2006-02-02 Thread Corban Baxter
Hey all this is kind of a repost but I have a weird problem... Ok I have
a function I am calling on the root timeline and when I trace(this)
inside of it I am getting a return of undefined. What would cause this?
Here is the function. 

[code]

function loadImages(imagesToGrab:Number) {
if (imagesToGrab == 0) {
//stop loading images
clearInterval(loadImgInterval);
trace("hitting the clear");
} else {
var randomPos:Number = random(imagesToGrab)+1;
var rfcClip:MovieClip = rfcsArray[randomPos];
var imgID:String = imgArray[randomPos];

//delete from array to keep from running one more than
once
rfcsArray.splice(randomPos, 1);
imgArray.splice(randomPos, 1);

//trying to decipher wtf is going on
trace("imgID: "+imgID); //returns layout5_set3_img10
trace("rfcClip: "+rfcClip); //returns lay5_img10
trace(this[rfcClip]); //returns undefined - WHY!
trace(this); //returns undefined - WHY!

//ALL ISSUES ARE OCCURING IN THIS LINE OF CODE FROM WHAT
I UNDERSTAND
this[rfcClip].container.attachMovie(imgID, imgID,
this.getNextHighestDepth());


imagesToGrab--;
clearInterval(loadImgInterval);
loadImgInterval = setInterval(loadImages, 2000,
imagesToGrab);
}
trace("imagesLeftToLoad: "+imagesToGrab);
trace(" ");
}

[/code]

if you want to look at my FLA be my guest...
http://webdev.funimation.com/fun2004/coders/s3.zip


//cb


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];

2006-02-02 Thread Corban Baxter
So this is what happened...
trace("imgID: "+imgID); //returns layout5_set3_img10
trace("rfcClip: "+rfcClip); //returns lay5_img10
trace(this[rfcClip]); //returns undefined
trace(this); //returns undefined

and this will sound stuipid but wtf does all that mean? How can the loadImages 
function have and undefined scope?

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Corban Baxter
Sent: Thursday, February 02, 2006 2:22 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];

And how can traceing(this) return undefined? Is that possible?

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason
Sent: Thursday, February 02, 2006 2:14 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];

C'mon Corban - you can do this  - don't get frustrated and ask us to do 
everything ;) - walk back a little in your code. What does trace(rfcClip) show? 
 

That should be the same name as your clip.

What does trace(this) show in your loadImages function show?  That should be 
the same timeline as the clip you are targeting... 

I know you're frustrated, don't give up.  Just a little logic with trace 
statements will show you where you are going wrong.  

Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com










>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Corban Baxter
>>Sent: Thursday, February 02, 2006 3:07 PM
>>To: Flashcoders mailing list
>>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
>>
>>Well as you said it is a tracing issue and it's giving me an 'undefined'? 
>>What would
>>cause this? I have the clips on the stage with the same instances? Any ideas?
>>
>>Corban Baxter  |  rich media designer  |  www.funimation.com
>>
>>
>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Merrill, Jason
>>Sent: Thursday, February 02, 2006 2:02 PM
>>To: Flashcoders mailing list
>>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
>>
>>Have been out of the loop since yesterday, but again, some proper tracing 
>>should
>>knock this down.
>>
>>Instead of tracing
>>
>>trace("rfcClip: "+rfcClip+" - typeof("+typeof (rfcClip)+")");
>>
>>(ick!)
>>
>>do:
>>
>>trace(this[rfcClip])
>>
>>In your code, you have rfcClip as just a string, so no, it's not going to be 
>>a movie
>>clip until you do this[rfcClip] - which you should trace to see if its 
>>resolving to an
>>actual clip.
>>
>>
>>Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>>>-Original Message-
>>>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>>>[EMAIL PROTECTED] On Behalf Of Corban Baxter
>>>>Sent: Thursday, February 02, 2006 2:56 PM
>>>>To: Flashcoders mailing list
>>>>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
>>>>
>>>>Could some one please take a look at my fla or the code and tell me why 
>>>>flash
>>>>won't attach this clips correctly? Please! I'm not much of a beggar but 
>>>>this is
>>>>getting out of hand. I feel like I have done this a thousand times and this 
>>>>time
>>it
>>>>won't work.
>>>>
>>>>[code]
>>>>
>>>>///varibles setup
>>>>var layoutNum:Number;
>>>>var setsArray:Array = [null, 3, 3, 3, 3, 4];
>>>>var totalSetsNLayout:Number;
>>>>var totalImagesNLayout:Array = [null, 9, 8, 6, 6, 11];
>>>>var imagesToGrab:Number;
>>>>var imgArray:Array = new Array();
>>>>var rfcsArray:Array = new Array();
>>>>var randomSet:Number;
>>>>
>>>>function selectLayoutNum() {
>>>>//check if it was the last layout
>>>>//set layoutNum
>>>>layoutNum = random(5)+1;
>>>>while (layoutNum == oldNum) {
>>>>layoutNum = random(5)+1;
>>>>}
>>>>var oldNum:Number = layoutNum;
>>>>tra

RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];

2006-02-02 Thread Corban Baxter
And how can traceing(this) return undefined? Is that possible?

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason
Sent: Thursday, February 02, 2006 2:14 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];

C'mon Corban - you can do this  - don't get frustrated and ask us to do 
everything ;) - walk back a little in your code. What does trace(rfcClip) show? 
 

That should be the same name as your clip.

What does trace(this) show in your loadImages function show?  That should be 
the same timeline as the clip you are targeting... 

I know you're frustrated, don't give up.  Just a little logic with trace 
statements will show you where you are going wrong.  

Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com










>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Corban Baxter
>>Sent: Thursday, February 02, 2006 3:07 PM
>>To: Flashcoders mailing list
>>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
>>
>>Well as you said it is a tracing issue and it's giving me an 'undefined'? 
>>What would
>>cause this? I have the clips on the stage with the same instances? Any ideas?
>>
>>Corban Baxter  |  rich media designer  |  www.funimation.com
>>
>>
>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Merrill, Jason
>>Sent: Thursday, February 02, 2006 2:02 PM
>>To: Flashcoders mailing list
>>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
>>
>>Have been out of the loop since yesterday, but again, some proper tracing 
>>should
>>knock this down.
>>
>>Instead of tracing
>>
>>trace("rfcClip: "+rfcClip+" - typeof("+typeof (rfcClip)+")");
>>
>>(ick!)
>>
>>do:
>>
>>trace(this[rfcClip])
>>
>>In your code, you have rfcClip as just a string, so no, it's not going to be 
>>a movie
>>clip until you do this[rfcClip] - which you should trace to see if its 
>>resolving to an
>>actual clip.
>>
>>
>>Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>>>-Original Message-
>>>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>>>[EMAIL PROTECTED] On Behalf Of Corban Baxter
>>>>Sent: Thursday, February 02, 2006 2:56 PM
>>>>To: Flashcoders mailing list
>>>>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
>>>>
>>>>Could some one please take a look at my fla or the code and tell me why 
>>>>flash
>>>>won't attach this clips correctly? Please! I'm not much of a beggar but 
>>>>this is
>>>>getting out of hand. I feel like I have done this a thousand times and this 
>>>>time
>>it
>>>>won't work.
>>>>
>>>>[code]
>>>>
>>>>///varibles setup
>>>>var layoutNum:Number;
>>>>var setsArray:Array = [null, 3, 3, 3, 3, 4];
>>>>var totalSetsNLayout:Number;
>>>>var totalImagesNLayout:Array = [null, 9, 8, 6, 6, 11];
>>>>var imagesToGrab:Number;
>>>>var imgArray:Array = new Array();
>>>>var rfcsArray:Array = new Array();
>>>>var randomSet:Number;
>>>>
>>>>function selectLayoutNum() {
>>>>//check if it was the last layout
>>>>//set layoutNum
>>>>layoutNum = random(5)+1;
>>>>while (layoutNum == oldNum) {
>>>>layoutNum = random(5)+1;
>>>>}
>>>>var oldNum:Number = layoutNum;
>>>>trace("layoutNum: "+layoutNum);
>>>>getSetsNLayout(layoutNum);
>>>>}
>>>>function getSetsNLayout(layoutNum) {
>>>>totalSetsNLayout = setsArray[layoutNum];
>>>>trace("totalSetsNLayout: "+totalSetsNLayout);
>>>>gatherImages4Layout(totalSetsNLayout, layoutNum);
>>>>}
>>>>
>>>>function gatherImages4Layout(totalSetsNLayout, layoutNum) {
>>>>imagesToGrab = totalImagesNLayout[layoutNum];
>>>>trace("imagesToGrab: "+imagesToGrab);
>>>>//dynamicly create array of images to be used 

RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];

2006-02-02 Thread Corban Baxter
Really. Whats sad is I really don't know how all this works. I have been coding 
AS1 for about 2 years now and I have gotten this far without really know much 
besides understanding basic logic really well. I don't mean to ask a lot of 
questions I am just at one of those humps in my learning that I need a little 
insight into what's possible. 

I never knew I could get different scopes by tracing(this)... Interesting 
stuff. I am going to look more but sorry if I have to ask...

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason
Sent: Thursday, February 02, 2006 2:14 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];

C'mon Corban - you can do this  - don't get frustrated and ask us to do 
everything ;) - walk back a little in your code. What does trace(rfcClip) show? 
 

That should be the same name as your clip.

What does trace(this) show in your loadImages function show?  That should be 
the same timeline as the clip you are targeting... 

I know you're frustrated, don't give up.  Just a little logic with trace 
statements will show you where you are going wrong.  

Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com










>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Corban Baxter
>>Sent: Thursday, February 02, 2006 3:07 PM
>>To: Flashcoders mailing list
>>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
>>
>>Well as you said it is a tracing issue and it's giving me an 'undefined'? 
>>What would
>>cause this? I have the clips on the stage with the same instances? Any ideas?
>>
>>Corban Baxter  |  rich media designer  |  www.funimation.com
>>
>>
>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Merrill, Jason
>>Sent: Thursday, February 02, 2006 2:02 PM
>>To: Flashcoders mailing list
>>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
>>
>>Have been out of the loop since yesterday, but again, some proper tracing 
>>should
>>knock this down.
>>
>>Instead of tracing
>>
>>trace("rfcClip: "+rfcClip+" - typeof("+typeof (rfcClip)+")");
>>
>>(ick!)
>>
>>do:
>>
>>trace(this[rfcClip])
>>
>>In your code, you have rfcClip as just a string, so no, it's not going to be 
>>a movie
>>clip until you do this[rfcClip] - which you should trace to see if its 
>>resolving to an
>>actual clip.
>>
>>
>>Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>>>-Original Message-
>>>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>>>[EMAIL PROTECTED] On Behalf Of Corban Baxter
>>>>Sent: Thursday, February 02, 2006 2:56 PM
>>>>To: Flashcoders mailing list
>>>>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
>>>>
>>>>Could some one please take a look at my fla or the code and tell me why 
>>>>flash
>>>>won't attach this clips correctly? Please! I'm not much of a beggar but 
>>>>this is
>>>>getting out of hand. I feel like I have done this a thousand times and this 
>>>>time
>>it
>>>>won't work.
>>>>
>>>>[code]
>>>>
>>>>///varibles setup
>>>>var layoutNum:Number;
>>>>var setsArray:Array = [null, 3, 3, 3, 3, 4];
>>>>var totalSetsNLayout:Number;
>>>>var totalImagesNLayout:Array = [null, 9, 8, 6, 6, 11];
>>>>var imagesToGrab:Number;
>>>>var imgArray:Array = new Array();
>>>>var rfcsArray:Array = new Array();
>>>>var randomSet:Number;
>>>>
>>>>function selectLayoutNum() {
>>>>//check if it was the last layout
>>>>//set layoutNum
>>>>layoutNum = random(5)+1;
>>>>while (layoutNum == oldNum) {
>>>>layoutNum = random(5)+1;
>>>>}
>>>>var oldNum:Number = layoutNum;
>>>>trace("layoutNum: "+layoutNum);
>>>>getSetsNLayout(layoutNum);
>>>>}
>>>>function getSetsNLayout(layoutNum) {
>>>>totalSetsNLayout = setsArray[layoutNum];
>>>>trace(&quo

RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];

2006-02-02 Thread Corban Baxter
Well as you said it is a tracing issue and it's giving me an 'undefined'? What 
would cause this? I have the clips on the stage with the same instances? Any 
ideas?

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason
Sent: Thursday, February 02, 2006 2:02 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];

Have been out of the loop since yesterday, but again, some proper tracing 
should knock this down.

Instead of tracing 

trace("rfcClip: "+rfcClip+" - typeof("+typeof (rfcClip)+")");

(ick!)

do:

trace(this[rfcClip])

In your code, you have rfcClip as just a string, so no, it's not going to be a 
movie clip until you do this[rfcClip] - which you should trace to see if its 
resolving to an actual clip.


Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com










>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Corban Baxter
>>Sent: Thursday, February 02, 2006 2:56 PM
>>To: Flashcoders mailing list
>>Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];
>>
>>Could some one please take a look at my fla or the code and tell me why flash
>>won't attach this clips correctly? Please! I'm not much of a beggar but this 
>>is
>>getting out of hand. I feel like I have done this a thousand times and this 
>>time it
>>won't work.
>>
>>[code]
>>
>>///varibles setup
>>var layoutNum:Number;
>>var setsArray:Array = [null, 3, 3, 3, 3, 4];
>>var totalSetsNLayout:Number;
>>var totalImagesNLayout:Array = [null, 9, 8, 6, 6, 11];
>>var imagesToGrab:Number;
>>var imgArray:Array = new Array();
>>var rfcsArray:Array = new Array();
>>var randomSet:Number;
>>
>>function selectLayoutNum() {
>>  //check if it was the last layout
>>  //set layoutNum
>>  layoutNum = random(5)+1;
>>  while (layoutNum == oldNum) {
>>  layoutNum = random(5)+1;
>>  }
>>  var oldNum:Number = layoutNum;
>>  trace("layoutNum: "+layoutNum);
>>  getSetsNLayout(layoutNum);
>>}
>>function getSetsNLayout(layoutNum) {
>>  totalSetsNLayout = setsArray[layoutNum];
>>  trace("totalSetsNLayout: "+totalSetsNLayout);
>>  gatherImages4Layout(totalSetsNLayout, layoutNum);
>>}
>>
>>function gatherImages4Layout(totalSetsNLayout, layoutNum) {
>>  imagesToGrab = totalImagesNLayout[layoutNum];
>>  trace("imagesToGrab: "+imagesToGrab);
>>  //dynamicly create array of images to be used in layout
>>  for (i=0; i<=imagesToGrab; i++) {
>>  randomSet = random(totalSetsNLayout)+1;
>>  while (randomSet == oldSet) {
>>  randomSet = random(totalSetsNLayout)+1;
>>  }
>>  var oldSet:Number = randomSet;
>>  var img:String = "layout"+layoutNum+"_set"+randomSet+"_img"+i;
>>  imgArray.push(img);
>>  var myMC:String = "lay"+layoutNum+"_img"+i;
>>  rfcsArray.push(myMC);
>>  }
>>  //trace("imgArray= [" + imgArray + "]");
>>  //trace(" ");
>>  //trace("rfcsArray = [" + rfcsArray + "]");
>>  gotoAndPlay("lay_"+layoutNum);
>>}
>>
>>//loadImages is called in an interval when the playhead hits the marker 
>>specified
>>//like "lay_2" etc
>>//loadImgInterval = setInterval(loadImages, 2000, imagesToGrab);
>>function loadImages(imagesToGrab) {
>>  if (imagesToGrab == 0) {
>>  //stop loading images
>>  clearInterval(loadImgInterval);
>>  trace("hitting the clear");
>>  } else {
>>  var randomPos:Number = random(imagesToGrab)+1;
>>  var rfcClip:String = rfcsArray[randomPos];
>>  var imgID:String = imgArray[randomPos];
>>  rfcsArray.splice(randomPos, 1);
>>  imgArray.splice(randomPos, 1);
>>  //select and image id
>>  trace("imgID: "+imgID);
>>  //select corisponding rfcClip
>>  trace("rfcClip: "+rfcClip+" - typeof("+typeof (rfcClip)+")");
>>  //will strict data typing not assure me that I am pulling cli

RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];

2006-02-02 Thread Corban Baxter
Could some one please take a look at my fla or the code and tell me why flash 
won't attach this clips correctly? Please! I'm not much of a beggar but this is 
getting out of hand. I feel like I have done this a thousand times and this 
time it won't work.

[code]

///varibles setup
var layoutNum:Number;
var setsArray:Array = [null, 3, 3, 3, 3, 4];
var totalSetsNLayout:Number;
var totalImagesNLayout:Array = [null, 9, 8, 6, 6, 11];
var imagesToGrab:Number;
var imgArray:Array = new Array();
var rfcsArray:Array = new Array();
var randomSet:Number;

function selectLayoutNum() {
//check if it was the last layout
//set layoutNum
layoutNum = random(5)+1;
while (layoutNum == oldNum) {
layoutNum = random(5)+1;
}
var oldNum:Number = layoutNum;
trace("layoutNum: "+layoutNum);
getSetsNLayout(layoutNum);
}
function getSetsNLayout(layoutNum) {
totalSetsNLayout = setsArray[layoutNum];
trace("totalSetsNLayout: "+totalSetsNLayout);
gatherImages4Layout(totalSetsNLayout, layoutNum);
}

function gatherImages4Layout(totalSetsNLayout, layoutNum) {
imagesToGrab = totalImagesNLayout[layoutNum];
trace("imagesToGrab: "+imagesToGrab);
//dynamicly create array of images to be used in layout
for (i=0; i<=imagesToGrab; i++) {
randomSet = random(totalSetsNLayout)+1;
while (randomSet == oldSet) {
randomSet = random(totalSetsNLayout)+1;
}
var oldSet:Number = randomSet;
var img:String = "layout"+layoutNum+"_set"+randomSet+"_img"+i;
imgArray.push(img);
var myMC:String = "lay"+layoutNum+"_img"+i;
rfcsArray.push(myMC);
}
//trace("imgArray= [" + imgArray + "]");
//trace(" ");
//trace("rfcsArray = [" + rfcsArray + "]");
gotoAndPlay("lay_"+layoutNum);
}

//loadImages is called in an interval when the playhead hits the marker 
specified
//like "lay_2" etc
//loadImgInterval = setInterval(loadImages, 2000, imagesToGrab);
function loadImages(imagesToGrab) {
if (imagesToGrab == 0) {
//stop loading images
clearInterval(loadImgInterval);
trace("hitting the clear");
} else {
var randomPos:Number = random(imagesToGrab)+1;
var rfcClip:String = rfcsArray[randomPos];
var imgID:String = imgArray[randomPos];
rfcsArray.splice(randomPos, 1);
imgArray.splice(randomPos, 1);
//select and image id
trace("imgID: "+imgID);
//select corisponding rfcClip
trace("rfcClip: "+rfcClip+" - typeof("+typeof (rfcClip)+")");
//will strict data typing not assure me that I am pulling clip 
references?
//ALL ISSUES ARE OCCURING IN THIS LINE OF CODE FROM WHAT I 
UNDERSTAND
//COULD ANYONE HELP ME OUT WITH THIS?
this[rfcClip].container.attachMovie(imgID, imgID, 
this.getNextHighestDepth());
imagesToGrab--;
clearInterval(loadImgInterval);
loadImgInterval = setInterval(loadImages, 2000, imagesToGrab);
}
trace("imagesLeftToLoad: "+imagesToGrab);
    trace(" ");
}

selectLayoutNum();
stop();

[/code]

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Corban Baxter
Sent: Thursday, February 02, 2006 1:29 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];

Sorry that's what I meant to type. It's in the code correct. Any other ideas?

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adrian Lynch
Sent: Thursday, February 02, 2006 11:55 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];

Try: this[rfcClip].container.attachMovie(imgID);

Ade

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Corban
Baxter
Sent: 02 February 2006 17:15
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] this[rfcClip].container.attachMovie[imgID];


Hey guys I am working on this project still that is doing a whole lot of
random things. Since I have not converted over to AS2 yet I am having
some problems with doing this...
"this[rfcClip].container.attachMovie[imgID];" the rfcClip and the imgID
variables are pulling from arr

RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];

2006-02-02 Thread Corban Baxter
Sorry that's what I meant to type. It's in the code correct. Any other ideas?

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adrian Lynch
Sent: Thursday, February 02, 2006 11:55 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] this[rfcClip].container.attachMovie[imgID];

Try: this[rfcClip].container.attachMovie(imgID);

Ade

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Corban
Baxter
Sent: 02 February 2006 17:15
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] this[rfcClip].container.attachMovie[imgID];


Hey guys I am working on this project still that is doing a whole lot of
random things. Since I have not converted over to AS2 yet I am having
some problems with doing this...
"this[rfcClip].container.attachMovie[imgID];" the rfcClip and the imgID
variables are pulling from arrays and seem to trace perfect but for some
reason the clip's are not showing up nor attaching to my stage. I was
hoping someone could take a quick look at the file and tell me what they
think might be the problem. I have uploaded a zip with the FLA to my dev
server. Any help would be greatly appreciated. Thanks!

http://webdev.funimation.com/fun2004/coders/s3.zip - FLA file

Problem occurs in the loadImage function on frame 9 line 51. This
function is called though an interval at the end of each marker: ie
marker: lay_1, lay_2 etc...

//cb


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] understanding the for loop - EXTENDED HELP NEEDED.

2006-02-02 Thread Corban Baxter
So I am trying to convert the scripts to AS2 and get strict datatyping to work 
but nothing seems to work the way I imagined it to work. I tried to do what I 
could best and nothing still is working. All the data is in place but nothing 
will get my MC's to load in the images from the library... 


[code]
///varibles setup
var layoutNum:Number;
var oldNum:Number;
var setsArray:Array = new Array();
var totalSetsNLayout:Number;
var totalImagesNLayout:Array = new Array();
var imagesToGrab:Number;
var imgArray:Array = new Array();
var rfcsArray:Array = new Array();
var randomSet:Number;
var oldSet:Number;
var img:String;
var myMC:String;
var randomPos:Number;
var rfcClip:MovieClip;
var imgID:String;

function selectLayoutNum(){
//check if it was the last layout
//set layoutNum
layoutNum = random(5) +1;
while(layoutNum == oldNum){
layoutNum = random(5) +1;
}
oldNum = layoutNum;
trace("layoutNum: " + layoutNum);
getSetsNLayout(layoutNum);
}

function getSetsNLayout(layoutNum){
setsArray = [null, 3, 3, 3, 3, 4];
totalSetsNLayout = setsArray[layoutNum];
trace("totalSetsNLayout: " + totalSetsNLayout);

gatherImages4Layout(totalSetsNLayout, layoutNum);
}

function gatherImages4Layout(totalSetsNLayout, layoutNum){
totalImagesNLayout = [null, 9, 8, 6, 6, 11];
imagesToGrab = totalImagesNLayout[layoutNum];
trace("imagesToGrab: " + imagesToGrab);


//dynamicly create array of images to be used in layout
for(i=0; i<=imagesToGrab; i++){
randomSet = random(totalSetsNLayout) + 1;
while(randomSet == oldSet){
randomSet = random(totalSetsNLayout) + 1;
}
oldSet = randomSet;

img = "layout" + layoutNum + "_set" + randomSet + "_img" + i;
imgArray.push(img);
myMC = "lay" + layoutNum + "_img" + i;
rfcsArray.push(myMC);
}
//trace("imgArray= [" + imgArray + "]");
//trace(" ");
//trace("rfcsArray = [" + rfcsArray + "]");
gotoAndPlay("lay_" + layoutNum);
}

//loadImages is called in an interval when the playhead hits the marker 
specified
//like "lay_2" etc
//loadImgInterval = setInterval(loadImages, 2000, imagesToGrab);

function loadImages(imagesToGrab){
if(imagesToGrab == 0){
//stop loading images
clearInterval(loadImgInterval);
trace("hitting the clear");
}else{
randomPos = random(imagesToGrab)+1;

rfcClip = rfcsArray[randomPos];
imgID = imgArray[randomPos];

rfcsArray.splice(randomPos, 1);
imgArray.splice(randomPos, 1);

//select and image id
trace("imgID: " + imgID);

//select corisponding rfcClip
trace("rfcClip: " + rfcClip);

//ALL ISSUES ARE OCCURING IN THIS LINE OF CODE FROM WHAT I 
UNDERSTAND
//COULD ANYONE HELP ME OUT WITH THIS?
rfcClip.container.attachMovie(imgID);

imagesToGrab--;
clearInterval(loadImgInterval);
    loadImgInterval = setInterval(loadImages, 2000, imagesToGrab);
}
trace("imagesLeftToLoad: " + imagesToGrab);
trace(" ");
}

selectLayoutNum();
stop();
[/code]


Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Corban Baxter
Sent: Thursday, February 02, 2006 10:45 AM
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] understanding the for loop - EXTENDED HELP NEEDED.

Well, I am going to take a stab at strict formatting. Not sure how well this is 
going to go but wish me luck as I venture off. Hopefully I can get some help as 
I take this new road. I appreciate the insight Andreas,

//cb


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Rønning
Sent: Wednesday, February 01, 2006 6:25 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] understanding the for loop - EXTENDED HELP NEEDED.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] this[rfcClip].container.attachMovie[imgID];

2006-02-02 Thread Corban Baxter
Hey guys I am working on this project still that is doing a whole lot of
random things. Since I have not converted over to AS2 yet I am having
some problems with doing this...
"this[rfcClip].container.attachMovie[imgID];" the rfcClip and the imgID
variables are pulling from arrays and seem to trace perfect but for some
reason the clip's are not showing up nor attaching to my stage. I was
hoping someone could take a quick look at the file and tell me what they
think might be the problem. I have uploaded a zip with the FLA to my dev
server. Any help would be greatly appreciated. Thanks!

http://webdev.funimation.com/fun2004/coders/s3.zip - FLA file

Problem occurs in the loadImage function on frame 9 line 51. This
function is called though an interval at the end of each marker: ie
marker: lay_1, lay_2 etc...

//cb


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] understanding the for loop - EXTENDED HELP NEEDED.

2006-02-02 Thread Corban Baxter
Well, I am going to take a stab at strict formatting. Not sure how well this is 
going to go but wish me luck as I venture off. Hopefully I can get some help as 
I take this new road. I appreciate the insight Andreas,

//cb


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Rønning
Sent: Wednesday, February 01, 2006 6:25 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] understanding the for loop - EXTENDED HELP NEEDED.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] understanding the for loop - EXTENDED HELP NEEDED.

2006-02-02 Thread Corban Baxter
 They lie in 
wait like wolves, the smell of blood in their nostrils. And then!
Whammy. I'm willing to bet you've had bugs because of this in the past, 
and the sooner you get down with the var-ness, the better.

Anyway i'm just sleepy so don't think i'm trying to tell you off. I'm 
just pointing out shit that really killed my head back around flash 5 up 
til late MX, and
i feel your pain.

Cheers,

- Andreas

Corban Baxter wrote:
> Well it's kind of working. I'd love to have some help on this to get me
> going correctly. So with that said I'll try and explain what this is.
>
> Ok so we are creating a screensaver that has 5 img layouts/templates
> with different numbers of images per layout but they have empty MC's in
> place to place the images later.
>
> For each template we have created sets of images to choose from that
> will be placed in each template. These images have linkage id's in the
> lib.
>
> What we want to do is select a random "LAYOUT" (template). Then select
> images for each position in the layout/template at random from a set of
> images designed for each template. So with that said it's a mouth full.
>
> What I thought I could do is generate all this random stuff and create
> an array from it that stores my images to be used. Then I need to
> generate a list of MC's to place these images into. Which is more or
> less determined in each template but each template has a different # of
> images in it.
>
> NEXT issue is this. Once I have both array's one of "linkage id's" for
> the template and another array that holds my "MC references". I want to
> load these images into the corresponding MC but in another random order.
> (I know I know but we don't ever want ANYTHING to look the same twice). 
>
> So what I will have to do is then figure out a decent way to get the
> loading to work without killing myself.
>
> Now my new problem is flash is telling me my function "createMCrfcs " is
> some sorta infinite loop and can't finish the task. Which makes no sense
> cause I am more or less doing the same thing above. But what ever. I
> hope this makes sense and someone can throw some insight to me after
> typing all this! Thanks for listening boys!
>
> I'm going crazy and this might sound crazy but any help would be GREATLY
> appericated
>
>
> //setup vars
> clipNum = 1;
>
> selectLayoutNum = function(){
>   //check if it was the last layout
>   //set layoutNum
>   layoutNum = random(5) +1;
>   while(layoutNum == oldNum){
>   layoutNum = random(5) +1;
>   }
>   oldNum = layoutNum;
>   trace("layoutNum: " + layoutNum);
>   getSetsNLayout(layoutNum);
> }
>
> getSetsNLayout = function(layoutNum){
>   setsArray = [null, 3, 3, 3, 3, 4];
>   totalSetsNLayout = setsArray[layoutNum];
>   trace("totalSetsNLayout: " + totalSetsNLayout);
>   gatherImages4Layout(totalSetsNLayout, layoutNum);
> }
>
> gatherImages4Layout = function(totalSetsNLayout, layoutNum){
>   totalImagesNLayout = [null, 9, 8, 6, 6, 11];
>   imagesToGrab = totalImagesNLayout[layoutNum];
>   trace("imagesToGrab: " + imagesToGrab);
>
>   
>   //dynamicly create array of images to be used in layout
>   imgArray = new Array();
>   for(i=0; i<=imagesToGrab; i++){
>   randomSet = random(totalSetsNLayout) + 1;
>   while(randomSet == oldSet){
>   randomSet = random(totalSetsNLayout) + 1;
>   }
>   oldSet = randomSet;
>   
>   img = "layout" + layoutNum + "_set" + randomSet + "_img"
> + i;
>   imgArray.push(img);
>   }
>   trace("imgArray= [" + imgArray + "]");
>   gotoAndPlay("lay_" + layoutNum);
>   createMCrfcs(layoutNum, totalImagesNLayout);
> }
>
> createMCrfcs = function(layoutNum, totalImagesNLayout){
>   trace("totalSetsNLayout: " + totalSetsNLayout);
>   //create clip array...
>   rfcsArray = new Array();
>   for(p=0; p<=totalImagesNLayout; p++){
>   myMC = "lay" + layoutNum + "_img" + p;
>   rfcsArray.push(myMC);   
>   }
>   trace("rfcsArray = [" + rfcsArray + "]");
> }
>
> selectLayoutNum();
> stop();
>
>
>
>
> //cb
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>   

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] quick array question

2006-02-02 Thread Corban Baxter
Thanks. great help!

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Cox
Sent: Wednesday, February 01, 2006 6:17 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] quick array question

Use Array.splice() to remove an element.

randomPos = random(total);
rfcClip = rfcsArray[randomPos];
imgID = imgArray[randomPos];

rfcsArray.splice(randomPos, 1);
imgArray.splice(randomPos, 1);

total--;



Corban Baxter wrote:

>Ok one quick array question...
>
>randomPos = random(total);
>rfcClip = rfcsArray[randomPos];
>imgID = imgArray[randomPos];
>total--;
>//now how can I delete those two records from my two arrays and
>recompile the arrays for use next time? I want to slowing delete the
>entire array so that I never use one twice... thanks.
>___
>Flashcoders mailing list
>Flashcoders@chattyfig.figleaf.com
>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>  
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] understanding the for loop - EXTENDED HELP NEEDED.

2006-02-01 Thread Corban Baxter
Thanks a million Jason!

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Corban Baxter
Sent: Wednesday, February 01, 2006 5:53 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] understanding the for loop - EXTENDED HELP NEEDED.

That would be great I'd love to see other approaches to this. But things are 
looking up I simplified that function into the one before it and it works fine. 
I am hoping to get this working fairly shortly. If so I will send you the file. 
Its going to be fun to look at I'm sure...

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason
Sent: Wednesday, February 01, 2006 5:48 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] understanding the for loop - EXTENDED HELP NEEDED.

I gotta run home, maybe someone else can help - I'll try and write up
some examples if I can later  - but relax, don't go nuts on us.  And you
didn't have to change your sig just because I teased you a little!  :)  

Seriously, I'll try and work up an example that might be a little
cleaner if I can find some time tonight or tomorrow. 

Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com










>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Corban Baxter
>>Sent: Wednesday, February 01, 2006 6:42 PM
>>To: Flashcoders mailing list
>>Subject: RE: [Flashcoders] understanding the for loop - EXTENDED HELP
NEEDED.
>>
>>Well it's kind of working. I'd love to have some help on this to get
me
>>going correctly. So with that said I'll try and explain what this is.
>>
>>Ok so we are creating a screensaver that has 5 img layouts/templates
>>with different numbers of images per layout but they have empty MC's
in
>>place to place the images later.
>>
>>For each template we have created sets of images to choose from that
>>will be placed in each template. These images have linkage id's in the
>>lib.
>>
>>What we want to do is select a random "LAYOUT" (template). Then select
>>images for each position in the layout/template at random from a set
of
>>images designed for each template. So with that said it's a mouth
full.
>>
>>What I thought I could do is generate all this random stuff and create
>>an array from it that stores my images to be used. Then I need to
>>generate a list of MC's to place these images into. Which is more or
>>less determined in each template but each template has a different #
of
>>images in it.
>>
>>NEXT issue is this. Once I have both array's one of "linkage id's" for
>>the template and another array that holds my "MC references". I want
to
>>load these images into the corresponding MC but in another random
order.
>>(I know I know but we don't ever want ANYTHING to look the same
twice).
>>
>>So what I will have to do is then figure out a decent way to get the
>>loading to work without killing myself.
>>
>>Now my new problem is flash is telling me my function "createMCrfcs "
is
>>some sorta infinite loop and can't finish the task. Which makes no
sense
>>cause I am more or less doing the same thing above. But what ever. I
>>hope this makes sense and someone can throw some insight to me after
>>typing all this! Thanks for listening boys!
>>
>>I'm going crazy and this might sound crazy but any help would be
GREATLY
>>appericated
>>
>>
>>//setup vars
>>clipNum = 1;
>>
>>selectLayoutNum = function(){
>>  //check if it was the last layout
>>  //set layoutNum
>>  layoutNum = random(5) +1;
>>  while(layoutNum == oldNum){
>>  layoutNum = random(5) +1;
>>  }
>>  oldNum = layoutNum;
>>  trace("layoutNum: " + layoutNum);
>>  getSetsNLayout(layoutNum);
>>}
>>
>>getSetsNLayout = function(layoutNum){
>>  setsArray = [null, 3, 3, 3, 3, 4];
>>  totalSetsNLayout = setsArray[layoutNum];
>>  trace("totalSetsNLayout: " + totalSetsNLayout);
>>  gatherImages4Layout(totalSetsNLayout, layoutNum);
>>}
>>
>>gatherImages4Layout = function(totalSetsNLayout, layoutNum){
>>  totalImagesNLayout = [null, 9, 8, 6, 6, 11];
>>  imagesToGrab = totalImagesNLayout[layoutNum];
>

[Flashcoders] quick array question

2006-02-01 Thread Corban Baxter
Ok one quick array question...

randomPos = random(total);
rfcClip = rfcsArray[randomPos];
imgID = imgArray[randomPos];
total--;
//now how can I delete those two records from my two arrays and
recompile the arrays for use next time? I want to slowing delete the
entire array so that I never use one twice... thanks.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] understanding the for loop - EXTENDED HELP NEEDED.

2006-02-01 Thread Corban Baxter
That would be great I'd love to see other approaches to this. But things are 
looking up I simplified that function into the one before it and it works fine. 
I am hoping to get this working fairly shortly. If so I will send you the file. 
Its going to be fun to look at I'm sure...

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason
Sent: Wednesday, February 01, 2006 5:48 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] understanding the for loop - EXTENDED HELP NEEDED.

I gotta run home, maybe someone else can help - I'll try and write up
some examples if I can later  - but relax, don't go nuts on us.  And you
didn't have to change your sig just because I teased you a little!  :)  

Seriously, I'll try and work up an example that might be a little
cleaner if I can find some time tonight or tomorrow. 

Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com










>>-Original Message-
>>From: [EMAIL PROTECTED] [mailto:flashcoders-
>>[EMAIL PROTECTED] On Behalf Of Corban Baxter
>>Sent: Wednesday, February 01, 2006 6:42 PM
>>To: Flashcoders mailing list
>>Subject: RE: [Flashcoders] understanding the for loop - EXTENDED HELP
NEEDED.
>>
>>Well it's kind of working. I'd love to have some help on this to get
me
>>going correctly. So with that said I'll try and explain what this is.
>>
>>Ok so we are creating a screensaver that has 5 img layouts/templates
>>with different numbers of images per layout but they have empty MC's
in
>>place to place the images later.
>>
>>For each template we have created sets of images to choose from that
>>will be placed in each template. These images have linkage id's in the
>>lib.
>>
>>What we want to do is select a random "LAYOUT" (template). Then select
>>images for each position in the layout/template at random from a set
of
>>images designed for each template. So with that said it's a mouth
full.
>>
>>What I thought I could do is generate all this random stuff and create
>>an array from it that stores my images to be used. Then I need to
>>generate a list of MC's to place these images into. Which is more or
>>less determined in each template but each template has a different #
of
>>images in it.
>>
>>NEXT issue is this. Once I have both array's one of "linkage id's" for
>>the template and another array that holds my "MC references". I want
to
>>load these images into the corresponding MC but in another random
order.
>>(I know I know but we don't ever want ANYTHING to look the same
twice).
>>
>>So what I will have to do is then figure out a decent way to get the
>>loading to work without killing myself.
>>
>>Now my new problem is flash is telling me my function "createMCrfcs "
is
>>some sorta infinite loop and can't finish the task. Which makes no
sense
>>cause I am more or less doing the same thing above. But what ever. I
>>hope this makes sense and someone can throw some insight to me after
>>typing all this! Thanks for listening boys!
>>
>>I'm going crazy and this might sound crazy but any help would be
GREATLY
>>appericated
>>
>>
>>//setup vars
>>clipNum = 1;
>>
>>selectLayoutNum = function(){
>>  //check if it was the last layout
>>  //set layoutNum
>>  layoutNum = random(5) +1;
>>  while(layoutNum == oldNum){
>>  layoutNum = random(5) +1;
>>  }
>>  oldNum = layoutNum;
>>  trace("layoutNum: " + layoutNum);
>>  getSetsNLayout(layoutNum);
>>}
>>
>>getSetsNLayout = function(layoutNum){
>>  setsArray = [null, 3, 3, 3, 3, 4];
>>  totalSetsNLayout = setsArray[layoutNum];
>>  trace("totalSetsNLayout: " + totalSetsNLayout);
>>  gatherImages4Layout(totalSetsNLayout, layoutNum);
>>}
>>
>>gatherImages4Layout = function(totalSetsNLayout, layoutNum){
>>  totalImagesNLayout = [null, 9, 8, 6, 6, 11];
>>  imagesToGrab = totalImagesNLayout[layoutNum];
>>  trace("imagesToGrab: " + imagesToGrab);
>>
>>
>>  //dynamicly create array of images to be used in layout
>>  imgArray = new Array();
>>  for(i=0; i<=imagesToGrab; i++){
>>  randomSet = random(totalSetsNLayout) + 1;
>>  while(randomSet == oldSet){
>>

RE: [Flashcoders] understanding the for loop - EXTENDED HELP NEEDED.

2006-02-01 Thread Corban Baxter
Well it's kind of working. I'd love to have some help on this to get me
going correctly. So with that said I'll try and explain what this is.

Ok so we are creating a screensaver that has 5 img layouts/templates
with different numbers of images per layout but they have empty MC's in
place to place the images later.

For each template we have created sets of images to choose from that
will be placed in each template. These images have linkage id's in the
lib.

What we want to do is select a random "LAYOUT" (template). Then select
images for each position in the layout/template at random from a set of
images designed for each template. So with that said it's a mouth full.

What I thought I could do is generate all this random stuff and create
an array from it that stores my images to be used. Then I need to
generate a list of MC's to place these images into. Which is more or
less determined in each template but each template has a different # of
images in it.

NEXT issue is this. Once I have both array's one of "linkage id's" for
the template and another array that holds my "MC references". I want to
load these images into the corresponding MC but in another random order.
(I know I know but we don't ever want ANYTHING to look the same twice). 

So what I will have to do is then figure out a decent way to get the
loading to work without killing myself.

Now my new problem is flash is telling me my function "createMCrfcs " is
some sorta infinite loop and can't finish the task. Which makes no sense
cause I am more or less doing the same thing above. But what ever. I
hope this makes sense and someone can throw some insight to me after
typing all this! Thanks for listening boys!

I'm going crazy and this might sound crazy but any help would be GREATLY
appericated


//setup vars
clipNum = 1;

selectLayoutNum = function(){
//check if it was the last layout
//set layoutNum
layoutNum = random(5) +1;
while(layoutNum == oldNum){
layoutNum = random(5) +1;
}
oldNum = layoutNum;
trace("layoutNum: " + layoutNum);
getSetsNLayout(layoutNum);
}

getSetsNLayout = function(layoutNum){
setsArray = [null, 3, 3, 3, 3, 4];
totalSetsNLayout = setsArray[layoutNum];
trace("totalSetsNLayout: " + totalSetsNLayout);
gatherImages4Layout(totalSetsNLayout, layoutNum);
}

gatherImages4Layout = function(totalSetsNLayout, layoutNum){
totalImagesNLayout = [null, 9, 8, 6, 6, 11];
imagesToGrab = totalImagesNLayout[layoutNum];
trace("imagesToGrab: " + imagesToGrab);


//dynamicly create array of images to be used in layout
imgArray = new Array();
for(i=0; i<=imagesToGrab; i++){
randomSet = random(totalSetsNLayout) + 1;
while(randomSet == oldSet){
randomSet = random(totalSetsNLayout) + 1;
}
oldSet = randomSet;

img = "layout" + layoutNum + "_set" + randomSet + "_img"
+ i;
imgArray.push(img);
}
trace("imgArray= [" + imgArray + "]");
gotoAndPlay("lay_" + layoutNum);
createMCrfcs(layoutNum, totalImagesNLayout);
}

createMCrfcs = function(layoutNum, totalImagesNLayout){
trace("totalSetsNLayout: " + totalSetsNLayout);
//create clip array...
rfcsArray = new Array();
for(p=0; p<=totalImagesNLayout; p++){
myMC = "lay" + layoutNum + "_img" + p;
rfcsArray.push(myMC);   
}
trace("rfcsArray = [" + rfcsArray + "]");
}

selectLayoutNum();
stop();




//cb
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] understanding the for loop

2006-02-01 Thread Corban Baxter
Yeah I know. I just meant what is wrong with me having fnctions that call 
functions etc? Do I have a better way to do something like this?

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason
Sent: Wednesday, February 01, 2006 4:41 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] understanding the for loop

>>Jason could you possibly help me off list on a better way to throw
this stuff
>>around? I am really in the dark here and it would be a huge help if
you could
>>explain a better way to format this. Or anyone for that matter.
Thanks!

Nah, don't be silly. ;) I spent a little more digging and found it:

In the getSetsNLayout function, you have:

   gatherImages4Layout(totalSets, layoutNum);

But there is no "totalSets".  It should be this instead:

   gatherImages4Layout(totalSetsNLayout, layoutNum);

You just need a little more practice tracing values, and you can find
stuff like this.  I don't mean that as condescending, don't take it that
way.  But this is just a matter of tracing exact variables and finding
back where things are breaking. 


Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com






NOTICE:
This message is for the designated recipient only and may contain privileged or 
confidential information. If you have received it in error, please notify the 
sender immediately and delete the original. Any other use of this e-mail by you 
is prohibited.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] understanding the for loop

2006-02-01 Thread Corban Baxter
Oh and I found where it was not being passed right. But I would appericate 
beyond belief if you had some ideas for me. Thanks!

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Corban Baxter
Sent: Wednesday, February 01, 2006 4:36 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] understanding the for loop

Jason could you possibly help me off list on a better way to throw this stuff 
around? I am really in the dark here and it would be a huge help if you could 
explain a better way to format this. Or anyone for that matter. Thanks!

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason
Sent: Wednesday, February 01, 2006 4:32 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] understanding the for loop

>>// and I really need to learn OOP and AS2 I'm sure life would be a lot
>>//easier.

Maybe, though the problems you're having aren't really related to any
issue that OOP would fix - this is more plain old calling functions,
passing parameters, etc.

Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com






NOTICE:
This message is for the designated recipient only and may contain privileged or 
confidential information. If you have received it in error, please notify the 
sender immediately and delete the original. Any other use of this e-mail by you 
is prohibited.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] understanding the for loop

2006-02-01 Thread Corban Baxter
Jason could you possibly help me off list on a better way to throw this stuff 
around? I am really in the dark here and it would be a huge help if you could 
explain a better way to format this. Or anyone for that matter. Thanks!

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason
Sent: Wednesday, February 01, 2006 4:32 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] understanding the for loop

>>// and I really need to learn OOP and AS2 I'm sure life would be a lot
>>//easier.

Maybe, though the problems you're having aren't really related to any
issue that OOP would fix - this is more plain old calling functions,
passing parameters, etc.

Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com






NOTICE:
This message is for the designated recipient only and may contain privileged or 
confidential information. If you have received it in error, please notify the 
sender immediately and delete the original. Any other use of this e-mail by you 
is prohibited.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] understanding the for loop

2006-02-01 Thread Corban Baxter
In a world. In a time. Wait that is weird.
Better?

//cb

Ok those are determinded in an array in a previous function.
Here is EVERYTHING THAT I AM GOING TO THIS POINT. 
I will change the code for random later I just need to figure this out.
Oon step at a time. The random works fine above so I feel ok about it
for now.

[code] 
//this can be copy and pasted into script window to see results.
// and I really need to learn OOP and AS2 I'm sure life would be a lot
//easier.

//setup vars
clipNum = 1;

selectLayoutNum = function(){
//check if it was the last layout
//set layoutNum
layoutNum = random(5) +1;
while(layoutNum == oldNum){
layoutNum = random(5) +1;
}
oldNum = layoutNum;
trace("layoutNum: " + layoutNum);
getSetsNLayout(layoutNum);
}

getSetsNLayout = function(layoutNum){
setsArray = [null, 3, 3, 3, 3, 4];
totalSetsNLayout = setsArray[layoutNum];
trace("totalSetsNLayout: " + totalSetsNLayout);
gatherImages4Layout(totalSets, layoutNum);
}

gatherImages4Layout = function(totalSetsNLayout, layoutNum){
totalImagesNLayout = [null, 9, 8, 6, 6, 11];
imagesToGrab = totalImagesNLayout[layoutNum];
trace("imagesToGrab: " + imagesToGrab);


//dynamicly create array of images to be used in layout
imgArray = new Array();
for(i=0; i<=imagesToGrab; i++){

randomSet = random(totalSetsNLayout) + 1;
//totalSetsNLayout = 4
//shouldn't i get a random number between 1-4?
trace("randomSet: " + randomSet);
img = "layout" + layoutNum + "_set" + randomSet + "_img"
+ i;
imgArray.push(img);
}
trace("imgArray= [" + imgArray + "]");
gotoAndPlay("lay_" + layoutNum);
}

loadImages = function(layoutNum){
myMC = "lay" + layoutNum + "_img" + clipNum;

clipNum++;
}

selectLayoutNum();
stop();

[/code]




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: Wednesday, February 01, 2006 4:12 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] understanding the for loop

By the way, with that e-mail signature line of yours, I feel like I am
talking to my alter-self from a parallel universe.  

Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com



>>>>Jason so its bad to use this old way of random huh?
>>>>
>>>>Corban Baxter  |  rich media designer  |
www.funimation.com




NOTICE:
This message is for the designated recipient only and may contain
privileged or confidential information. If you have received it in
error, please notify the sender immediately and delete the original. Any
other use of this e-mail by you is prohibited.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] understanding the for loop

2006-02-01 Thread Corban Baxter
Jason so its bad to use this old way of random huh?

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason
Sent: Wednesday, February 01, 2006 3:51 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] understanding the for loop

>> img = random(imagesToGrab)+1;

Yeah - first part of is probably that your use of random is... well...
incorrect.  

Math.random() retruns a random number of 0.0 or between 0.0 and 1.0.
You should convert it to a whole number first.  

function getRandom(min:Number, max:number){
return min+Math.floor(Math.random()*(max+1-min));
}

The other part is that you're overwriting the img variable:

img = random(imagesToGrab)+1;
img = "layout" + layoutNum + "_set" + randomSet + "_img" + i;

So in effect, the first value of img is replaced in the second line.  

Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com




NOTICE:
This message is for the designated recipient only and may contain privileged or 
confidential information. If you have received it in error, please notify the 
sender immediately and delete the original. Any other use of this e-mail by you 
is prohibited.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] understanding the for loop

2006-02-01 Thread Corban Baxter
Here is a better idea of what I need I think I posted the code off a little...

[code]
imgArray = new Array();
for(i=0; i<=imagesToGrab; i++){

randomSet = random(totalSetsNLayout) + 1; //totalSetsNLayout = 4
//shouldn't i get a random number between 1-4?
trace("randomSet: " + randomSet);
img = "layout" + layoutNum + "_set" + randomSet + "_img" + i;
imgArray.push(img);
}
trace("imgArray: " + imgArray);
[/code]

[output]
layoutNum: 4
totalSetsNLayout: 3
imagesToGrab: 6
randomSet: 1 //needs to be random
randomSet: 1 //needs to be random
randomSet: 1 //needs to be random
randomSet: 1 //needs to be random
randomSet: 1 //needs to be random
randomSet: 1 //needs to be random
randomSet: 1 //needs to be random
imgArray = 
[layout4_set1_img0,layout4_set1_img1,layout4_set1_img2,layout4_set1_img3,layout4_set1_img4,layout4_set1_img5,layout4_set1_img6]
[/output]

so why is the randomSet never random?


Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adrian Lynch
Sent: Wednesday, February 01, 2006 3:44 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] understanding the for loop

You're not incrementing imagesToGrab anywhere.

for (...) {
.
imagesToGrab++;
}

Ade

-Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Corban
Baxter
Sent: 01 February 2006 21:29
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] understanding the for loop


Ok guys I am working with this for loop to help me grab random images. My
problem is it seems like the for loop won't reset and random var each time
it runs. Below is my code...

[code]
for(i=0; i<=imagesToGrab; i++){
randomSet = random(totalSetsNLayout) + 1;
img = random(imagesToGrab)+1;
img = "layout" + layoutNum + "_set" + randomSet + "_img" + i;
imgArray.push(img);
}
[/code]

imgArray = [
layout5_set1_img0,
layout5_set1_img1,
layout5_set1_img2,
layout5_set1_img3,
layout5_set1_img4,
layout5_set1_img5,
layout5_set1_img6,
layout5_set1_img7,
layout5_set1_img8,
layout5_set1_img9,
layout5_set1_img10,
layout5_set1_img11]

as you can see my problem is that it doesn't change my set randomly at all?
Any ideas why this happens?

Corban Baxter  |  rich media designer  |  www.funimation.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] understanding the for loop

2006-02-01 Thread Corban Baxter
Ok guys I am working with this for loop to help me grab random images. My 
problem is it seems like the for loop won't reset and random var each time it 
runs. Below is my code...

[code]
for(i=0; i<=imagesToGrab; i++){
randomSet = random(totalSetsNLayout) + 1;
img = random(imagesToGrab)+1;
img = "layout" + layoutNum + "_set" + randomSet + "_img" + i;
imgArray.push(img);
}
[/code]

imgArray = [
layout5_set1_img0,
layout5_set1_img1,
layout5_set1_img2,
layout5_set1_img3,
layout5_set1_img4,
layout5_set1_img5,
layout5_set1_img6,
layout5_set1_img7,
layout5_set1_img8,
layout5_set1_img9,
layout5_set1_img10,
layout5_set1_img11]

as you can see my problem is that it doesn't change my set randomly at all? Any 
ideas why this happens?

Corban Baxter  |  rich media designer  |  www.funimation.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] except onRelease

2006-01-30 Thread Corban Baxter
That's retarded. But thanks for the insight. So I changed the code to attach a 
MC for the library that had another MC inside to load the img into and it 
worked fine. So all is good again today. Thanks!

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Winterhalder
Sent: Monday, January 30, 2006 4:25 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] except onRelease

hi Corban,

> this[charThumb_MC].loadMovie(charThumb);

loadMovie is delayed until all scripts in the frame have finished, so
you assign the onRelease to a movieclip that will be replaced by a
newly loaded one moments later.
use a container to load it into, and assign your onRelease to the container.

btw, createEmptyMovieClip returns a reference to the new clip, very
useful if you don't want to type this[charThumb_MC] over and over
again:

var clip = this.createEmptyMovieClip(charThumb_MC, this.getNextHighestDepth());
clip._x = ...

hth,
mark



On 1/30/06, Corban Baxter <[EMAIL PROTECTED]> wrote:
> Guys can you tell me why this entire block of code work in F8 except the part 
> where it hits the onRelease its like it doesn't even make it a button when 
> applied. Any ideas?
>
> buildCharMenu = function(totalChars, setNum){
> setMax = setNum * 5;
> trace("setMax: " + setMax); //if set is 1 this returns 4
> setMin = setMax - 5; //limits total created in set to be 5
> trace("setMin: " + setMin); //if setMax is 4 this returns 0
>
> for(i=setMin; i charThumb = xmlNode.childNodes[i].attributes.thumb;
> trace("charThumb: " + charThumb);
> charThumb_MC = "charThumb" + i; //set new mc name
> trace(charThumb_MC);
> this.createEmptyMovieClip(charThumb_MC, 
> this.getNextHighestDepth());
> this[charThumb_MC]._x = 365 + (50 * i); //initially the value 
> is 0 so nothing is added
> this[charThumb_MC]._y = 408;
> //trace(charThumb_MC + ": " + this[charThumb_MC]._x);
> this[charThumb_MC].loadMovie(charThumb);
> this[charThumb_MC].myNum = i;
>
> this[charThumb_MC].onRelease = function(){
> input_char_info(myNum);
> trace("myNum: " + myNum);
> }
> }
> }
>
> Corban Baxter |rich media designer |www.funimation.com
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>


--
http://snafoo.org/
jabber: [EMAIL PROTECTED]
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] except onRelease

2006-01-30 Thread Corban Baxter
Guys can you tell me why this entire block of code work in F8 except the part 
where it hits the onRelease its like it doesn't even make it a button when 
applied. Any ideas?

buildCharMenu = function(totalChars, setNum){
setMax = setNum * 5; 
trace("setMax: " + setMax); //if set is 1 this returns 4
setMin = setMax - 5; //limits total created in set to be 5
trace("setMin: " + setMin); //if setMax is 4 this returns 0

for(i=setMin; ihttp://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] f8 preloader

2006-01-30 Thread Corban Baxter
Hey guys I am trying to paste some preloader code from a f6 project into an f8 
project but its acting really weird. The traces I have put in for watching my 
percent grow don't even begine to trace until about 46%. I figured it would be 
some kind of issue with exporting to first frame stuff but I have none of that 
in the project. And the graphic I have on the first frame are like 1/10 of the 
total size of the project. Anyone know why this code might not work right in 
f8. Can I not run traces right away with code in f8? Weird stuff...

[code on first frame]
preloader_mc.onEnterFrame = function() {
totalNum = getBytesTotal();
loadedNum = getBytesLoaded();
trace("loadedNum: "+loadedNum);
trace("totalNum: "+totalNum);
percent = Math.round((loadedNum/totalNum)*100);
trace("percent:"+percent);
if (percent == 100) {
trace("PLAY!!!");
preloader_mc.percent_txt.text = "100";
//preloader_mc._yscale = 100;
//preloader_mc._xscale = 100;
play();
} else if (percent > 0) {
preloader_mc.percent_txt.text = percent;
//preloader_mc._yscale = percent;
//preloader_mc._xscale = percent;
}
};
stop();
[/code on first frame]

Corban Baxter  |  rich media designer  |  www.funimation.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  1   2   >