Re: [Flashcoders] swf doesn't work the same online

2010-03-08 Thread Valentin Schmidt
 Hi; I built a swf that works the way I want it in Flash, but when I
 upload it, it acts differently! I built buttons in as3 like this:

your code is corrupted:

 function onRollOutHandler(e:MouseEvent)
 {
 if (e.currentTarget.name == ' Home ') 
 {
 Navigation(' Home ', 'index', 235, 0x0e778a);
 }

the IF statement is not closed!

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


Re: [Flashcoders] swf doesn't work the same online

2010-03-08 Thread John Singleton






From: Valentin Schmidt v...@dasdeck.com
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Mon, March 8, 2010 1:48:18 PM
Subject: Re: [Flashcoders] swf doesn't work the same online

 Hi; I built a swf that works the way I want it in Flash, but when I
 upload it, it acts differently! I built buttons in as3 like this:

your code is corrupted:

 function onRollOutHandler(e:MouseEvent)
 {
 if (e.currentTarget.name == ' Home ') 
 {
 Navigation(' Home ', 'index', 235, 0x0e778a);
 }

the IF statement is not closed!

No, the if statements were closed. I just edited some stuff out and missed 
that. The code works perfectly well in the swf in my Flash, and that's what 
confuses me.
John

cheers,
valentin
___
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] swf doesn't work the same online

2010-03-08 Thread Mattheis, Erik (MIN - WSW)
What's broken about it? I recently had an issue with filters working 
differently in the browser than the authoring environment ...

_ _ _
Erik Mattheis
Senior Web Developer
Minneapolis
T  952 346 6610
C 612 377 2272

Weber Shandwick
Advocacy starts here.

PRWeek Global Agency Report Card 2009 - Gold Medal Winner
The Holmes Report Global Agency of the Year
PR News Agency of the Year

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John Singleton
Sent: Monday, March 08, 2010 11:31 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] swf doesn't work the same online

Hi;
I built a swf that works the way I want it in Flash, but when I upload it, it 
acts differently! I built buttons in as3 like this:

function nav(nname:String, nurl:String, myX:int, bgcolor:uint):void
{
myfont2 = 'Arial';
mydize = 15;
mytxtcolor = 0x00;
myborder = true;
mybordercolor = 0xFF;
myY = 170;
myfill = 0x97f9ec;
mynav = new TextField();
var format:TextFormat = new TextFormat();
format.font = myfont2;
format.size = mysize;
mynav.htmlText = 'a href=' + nurl + '.html' + nname + '/a';
mynav.textColor = myTextColor;
mynav.border = myborder;
mynav.borderColor = mybordercolor;
mynav.background=true;
mynav.backgroundColor = bgcolor;
mynav.autoSize = TextFieldAutoSize.LEFT;
mynav.x = myX;
mynav.y = myY;
mynav.setTextFormat(format);
var navdrop:DropShadowFilter = new DropShadowFilter();
navdrop.color = 0x00;
navdrop.blurX = 3;
navdrop.blurY = 3;
navdrop.angle = 0;
navdrop.alpha = 0.5;
navdrop.distance = 3;
var navfilters:Array = new Array(navdrop);
mynav.filters = navFiltersArray;
var nsprite:Sprite = new Sprite();
addChild(nsprite);
nsprite.name = nname;
nsprite.addChild(mynav);
var len:int = mynav.numLines;
for (var i:int = 0; i  len; i++) 
{
var metrics:TextLineMetrics = mynav.getLineMetrics(i);
with(nsprite.graphics)
{
beginFill(myfill, 1);
drawRect(mynav.x, mynav.y, metrics.width + 4, 
metrics.height + metrics.descent + 1);
endFill();
}
}
addChild(nsprite);
nsprite.addEventListener(MouseEvent.ROLL_OVER, onRollOverHandler);
nsprite.addEventListener(MouseEvent.ROLL_OUT, onRollOutHandler);
nsprite.addEventListener(MouseEvent.CLICK, onClickHandler);
nsprite.addEventListener(MouseEvent.MOUSE_DOWN, onPressHandler);
nsprite.addEventListener(MouseEvent.MOUSE_UP, onReleaseHandler);
nsprite.mouseChildren = false;
nsprite.buttonMode = true;
}

function onRollOverHandler(e:MouseEvent) 
{
if (e.currentTarget.name == ' Home ') 
{
Navigation(' Home ', 'index', 235, 0x97f9ec);
}
}

function onRollOutHandler(e:MouseEvent)
{
if (e.currentTarget.name == ' Home ') 
{
Navigation(' Home ', 'index', 235, 0x0e778a);
}

function onClickHandler(e:MouseEvent)
{
mynav.textColor = 0x00;
mynav.borderColor = 0xFF;
}

function onPressHandler(e:MouseEvent)
{
if (e.currentTarget.name == ' Home ') 
{
Navigation(' Home ', 'index', 235, 0xff);
}
}

function onReleaseHandler(e:MouseEvent)
{
if (e.currentTarget.name == ' Home ') 
{
Navigation(' Home ', 'index', 235, 0x0e778a);
}
}

I can't figure out why it doesn't work online like it does in Flash. Online, 
it's all broken. Is this common? What should I do?
Thanks,
John


  
___
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