Re: [Flashcoders] Omit Files on Build in Flash Builder

2010-05-19 Thread Elia Morlin
No, the files are not directly included. They are files residing in source
folders which should be omitted. I see that I can set a whole folder to be
read-only or archive. Is there no option to Omit from build?

The flow you describe would work I guess. It just seems very cumbersome.

Thanks
Elia

On Sat, May 15, 2010 at 9:28 PM, Dave Watts dwa...@figleaf.com wrote:

  How do I define which files to omit when the building process occurs in
  Flash Builder.
 
  Flash Builder likes to include every single swf, gif, png.

 Are any of those files directly included in the file you're building
 via the Embed directive? If so, they're going to be included in the
 build process, as they have to be read by the compiler into the
 output.

 In other cases, you can define a working set that includes just the
 resources you want, then uncheck Build Automatically and build the
 working set instead.

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 http://training.figleaf.com/

 Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
 GSA Schedule, and provides the highest caliber vendor-authorized
 instruction at our training centers, online, or onsite.
 ___
 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] Apple developing flash-like alternative

2010-05-19 Thread John McCormack

On 08/05/2010 07:48, Jared wrote:
http://thenextweb.com/apple/2010/05/08/apple-is-developing-a-flash-alternative-and-has-been-for-almost-a-year/ 



Don't know how valid this is but it would explain a lot


This gives a 'balanced' view:

At a stroke Apple’s quality argument is effectively blown out of the 
water.

http://www.pcpro.co.uk/blogs/2010/04/12/the-phoney-war-apple-vs-adobe/

John




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


[Flashcoders] FDT4 or Flash Builder 4

2010-05-19 Thread Tom Gooding
I am about to invest in a few desks worth of AS3 IDEs (we have both straight 
Flash projects and future requirements for Flex applications). 

I currently use FDT and am pretty happy with it (though not used it for MXML) - 
my main gripe being the absence of the Flash Builder profiling features - I see 
FDT is introducing this and has a Beta available which looks good (possibly 
better than FlashBuilder).

Has anyone been through any kind of evaluation/comparison? Has anyone used both 
in conjunction? Any steer would be appreciated... What say the masses? 

Cheers,

Tom




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


Re: [Flashcoders] flash cs5 any good for coding? if not is it any good at all?

2010-05-19 Thread Eric E. Dolecki
It's better than CS4 for sure. Depends on how you like to work on whether or
not it's for you.

On Wed, May 19, 2010 at 1:44 AM, Henrik Andersson he...@henke37.cjb.netwrote:

 Better than cs 4. The improved code assist is one of those features you
 never knew that you where missing.

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




-- 
http://ericd.net
Interactive design and development
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] FDT4 or Flash Builder 4

2010-05-19 Thread John McCormack

Hi Tom,

 Has anyone used both in conjunction?

This setup of FDT with FB looks promising - I will be trying it next week:
http://blog.hexagonstar.com/setting-up-the-ultimate-flash-development-environment/

John

On 19/05/2010 10:52, Tom Gooding wrote:

I am about to invest in a few desks worth of AS3 IDEs (we have both straight 
Flash projects and future requirements for Flex applications).

I currently use FDT and am pretty happy with it (though not used it for MXML) - 
my main gripe being the absence of the Flash Builder profiling features - I see 
FDT is introducing this and has a Beta available which looks good (possibly 
better than FlashBuilder).

Has anyone been through any kind of evaluation/comparison? Has anyone used both 
in conjunction? Any steer would be appreciated... What say the masses?

Cheers,

Tom




___
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] flash cs5 any good for coding? if not is it any good at all?

2010-05-19 Thread Ktu
 code assist is one of those features you
 never knew that you where missing.

If you never knew you were missing it, then you were REALLY missing it.

CS5 is better for coding. The code hinting is much better. Code hinting
saves you millions of keystrokes when you get used to it. Also, CS5 has the
snippets panel which when used properly can save even more keystrokes.

I've you've only ever used the Flash IDE for coding, then yes, CS5 is much
better for it. However, if you've used FDT, Flash Builder/Eclipse, or
FlashDevelop, then there is nothing new.

Ktu

On Wed, May 19, 2010 at 8:43 AM, Eric E. Dolecki edole...@gmail.com wrote:

 It's better than CS4 for sure. Depends on how you like to work on whether
 or
 not it's for you.

 On Wed, May 19, 2010 at 1:44 AM, Henrik Andersson he...@henke37.cjb.net
 wrote:

  Better than cs 4. The improved code assist is one of those features you
  never knew that you where missing.
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 http://ericd.net
 Interactive design and development
 ___
 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] CS4 properties panel

2010-05-19 Thread Glen Pike

Hello,

Is there any way of getting the Properties panel in CS4 to layout 
in the old horizontal fashion?
We are not all blessed with super wide screens and I have not 
really got that much real-estate to p*** it away with panel that is half 
populated a lot of the time...


Grrr.

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


[Flashcoders] Line break in dynamic text imported from xml

2010-05-19 Thread Paul Jinks
It's been a long time since I've done any coding. I think this is
pretty straightforward but it has me beat. Can you help?

I'm working on a quiz using AS1 (I think) that reads questions and
answers from an xml file. (see below for the script).

I'd like to introduce line breaks into the feedback, how do I do this?
I've tried using \r but it just displays this as text.

Ideally I'd like to display the text as html but so far my efforts to
do this have broken the script - any pointers?

Here's the action script for the quiz. I hope it makes sense:

function QuizItem(question)
{
this.question=question;
this.answers=new Array();
this.feedbacks=new Array();
this.numOfAnswers=0;
this.correctAnswer=0;
this.getQuestion=function()
{
return this.question;
}
this.addAnswer=function(answer, isCorrectAnswer, feedback)
{
this.answers[this.numOfAnswers]=answer;
this.feedbacks[this.numOfAnswers]=feedback;
if (isCorrectAnswer)
this.correctAnswer=this.numOfAnswers;
this.numOfAnswers++;
}

this.getAnswer=function(answerNumberToGet)
{
return this.answers[answerNumberToGet];
}
this.getFeedback=function(answerNumberToGet)
{
return this.feedbacks[answerNumberToGet];
}

this.getCorrectAnswerNumber=function()
{
return this.correctAnswer;
}

this.checkAnswerNumber=function(userAnswerNumber)
{
if (userAnswerNumber==this.getCorrectAnswerNumber()) {
numOfQuestionsAnsweredCorrectly++;
} else {
numOfQuestionsAnsweredIncorrectly++;
}
feedback = _root[feedback+parseInt((userAnswerNumber+1))]
gotoAndPlay(Feedback);
}
}

function onQuizData(success)
{
var quizNode=this.firstChild;
var quizTitleNode=quizNode.firstChild;  
title=quizTitleNode.firstChild.nodeValue;

var i=0;
// items follows title
var itemsNode=quizNode.childNodes[1];
while (itemsNode.childNodes[i])
{
var itemNode=itemsNode.childNodes[i];
// item consists of  question and one or more answer
// question always comes before answers (node 0 of item)
var questionNode=itemNode.childNodes[0];
quizItems[i]=new QuizItem(questionNode.firstChild.nodeValue);
var a=1;
// answer follows question
var answerNode=itemNode.childNodes[a++];
while (answerNode)
{
//trace(answerNode);
var isCorrectAnswer=false;
if (answerNode.attributes.correct==y)
isCorrectAnswer=true;
//get answer
tempAnswer = answerNode.firstChild.nodeValue;
//go to next node
answerNode=itemNode.childNodes[a++];
//get feedback
tempFeedback = answerNode.firstChild.nodeValue;
//add answer and feedback to current answer/feedback 
'pair'
quizItems[i].addAnswer(tempAnswer, isCorrectAnswer, 
tempFeedback);
// goto the next answer
answerNode=itemNode.childNodes[a++];
}
i++;
}
gotoAndStop(Start);
}

var quizItems=new Array();
var myData=new XML();
myData.ignoreWhite=true;
myData.onLoad=onQuizData;
myData.load(google_quiz.xml);
stop();

And this is what the xml file looks like:

!DOCTYPE quiz [
!ELEMENT quiz (title, items)
!ELEMENT title (#PCDATA)
!ELEMENT items (item)+
!ELEMENT item (question, answer, answer+)
!ELEMENT question (#PCDATA)
!ELEMENT answer (#PCDATA)
!ELEMENT feedback (#PCDATA)
!ATTLIST answer correct (y) #IMPLIED
]
quiz
titleMy quiz/title
items
item
  questionWhat colour are greenfly/question
  answerRed/answer
  feedbackYou chose answer [a]. This is incorrect. The correct
answer is [d]./feedback
  answerBlue/answer
  feedbackYou chose answer [b]. This is incorrect. The correct
answer is [d]./feedback
  answerCheese/answer
  feedbackSorry, cheese is not a colour./feedback
  answer correct=yGreen/answer
  feedbackCorrect!/feedback 
/item
/quiz

Thanks for reading, any help would be very gratefully received.

Paul
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com

Re: [Flashcoders] FDT4 or Flash Builder 4

2010-05-19 Thread Tom Gooding
Thanks - not sure I can justify buying both though - is the only unique feature 
to Flash Builder the ability to do Wysiwyg layouts on Flex forms?

On 19 May 2010, at 14:22, John McCormack wrote:

Hi Tom,

 Has anyone used both in conjunction?

This setup of FDT with FB looks promising - I will be trying it next week:
http://blog.hexagonstar.com/setting-up-the-ultimate-flash-development-environment/

John

On 19/05/2010 10:52, Tom Gooding wrote:
 I am about to invest in a few desks worth of AS3 IDEs (we have both straight 
 Flash projects and future requirements for Flex applications).
 
 I currently use FDT and am pretty happy with it (though not used it for MXML) 
 - my main gripe being the absence of the Flash Builder profiling features - I 
 see FDT is introducing this and has a Beta available which looks good 
 (possibly better than FlashBuilder).
 
 Has anyone been through any kind of evaluation/comparison? Has anyone used 
 both in conjunction? Any steer would be appreciated... What say the masses?
 
 Cheers,
 
 Tom
 
 
 
 
 ___
 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] FDT4 or Flash Builder 4

2010-05-19 Thread Eric E. Dolecki
It pairs nicely with Flash CS5... do your UI stuff in the IDE and have the
project live in FB4. It's a workflow with document class that I've been
banging on for a while and I personally like it a lot. The Flex stuff is a
bonus.

Eric


On Wed, May 19, 2010 at 11:05 AM, Tom Gooding t...@quickthinkmedia.co.ukwrote:

 Thanks - not sure I can justify buying both though - is the only unique
 feature to Flash Builder the ability to do Wysiwyg layouts on Flex forms?

 On 19 May 2010, at 14:22, John McCormack wrote:

 Hi Tom,

  Has anyone used both in conjunction?

 This setup of FDT with FB looks promising - I will be trying it next week:

 http://blog.hexagonstar.com/setting-up-the-ultimate-flash-development-environment/

 John

 On 19/05/2010 10:52, Tom Gooding wrote:
  I am about to invest in a few desks worth of AS3 IDEs (we have both
 straight Flash projects and future requirements for Flex applications).
 
  I currently use FDT and am pretty happy with it (though not used it for
 MXML) - my main gripe being the absence of the Flash Builder profiling
 features - I see FDT is introducing this and has a Beta available which
 looks good (possibly better than FlashBuilder).
 
  Has anyone been through any kind of evaluation/comparison? Has anyone
 used both in conjunction? Any steer would be appreciated... What say the
 masses?
 
  Cheers,
 
  Tom
 
 
 
 
  ___
  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




-- 
http://ericd.net
Interactive design and development
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] RE: Astra Components

2010-05-19 Thread Mattheis, Erik (MIN - WSW)
I found this quite thorough: 
http://developer.yahoo.com/flash/astra-flash/classreference/ - 

_ _ _
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 Lehr, Theodore
Sent: Tuesday, May 18, 2010 8:00 AM
To: Flash Coders List
Subject: [Flashcoders] Astra Components

Does anyone know of any good documentation for the Astra components? The stuff 
that comes with it is not very thorough... I am trying to figure out how to 
customize the charts
___
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] Line break in dynamic text imported from xml

2010-05-19 Thread Nathan Mynarcik
I believe you can use \n in your feedback string and it makes a new line.




On Wed, May 19, 2010 at 10:56 AM, Paul Jinks p...@pauljinks.co.uk wrote:
 It's been a long time since I've done any coding. I think this is
 pretty straightforward but it has me beat. Can you help?

 I'm working on a quiz using AS1 (I think) that reads questions and
 answers from an xml file. (see below for the script).

 I'd like to introduce line breaks into the feedback, how do I do this?
 I've tried using \r but it just displays this as text.

 Ideally I'd like to display the text as html but so far my efforts to
 do this have broken the script - any pointers?

 Here's the action script for the quiz. I hope it makes sense:

 function QuizItem(question)
 {
        this.question=question;
        this.answers=new Array();
        this.feedbacks=new Array();
        this.numOfAnswers=0;
        this.correctAnswer=0;
        this.getQuestion=function()
        {
                return this.question;
        }
        this.addAnswer=function(answer, isCorrectAnswer, feedback)
        {
                this.answers[this.numOfAnswers]=answer;
                this.feedbacks[this.numOfAnswers]=feedback;
                if (isCorrectAnswer)
                        this.correctAnswer=this.numOfAnswers;
                this.numOfAnswers++;
        }

        this.getAnswer=function(answerNumberToGet)
        {
                return this.answers[answerNumberToGet];
        }
        this.getFeedback=function(answerNumberToGet)
        {
                return this.feedbacks[answerNumberToGet];
        }

        this.getCorrectAnswerNumber=function()
        {
                return this.correctAnswer;
        }

        this.checkAnswerNumber=function(userAnswerNumber)
        {
                if (userAnswerNumber==this.getCorrectAnswerNumber()) {
                        numOfQuestionsAnsweredCorrectly++;
                } else {
                        numOfQuestionsAnsweredIncorrectly++;
                }
                feedback = _root[feedback+parseInt((userAnswerNumber+1))]
                gotoAndPlay(Feedback);
        }
 }

 function onQuizData(success)
 {
        var quizNode=this.firstChild;
        var quizTitleNode=quizNode.firstChild;
        title=quizTitleNode.firstChild.nodeValue;

        var i=0;
        // items follows title
        var itemsNode=quizNode.childNodes[1];
        while (itemsNode.childNodes[i])
        {
                var itemNode=itemsNode.childNodes[i];
                // item consists of  question and one or more answer
                // question always comes before answers (node 0 of item)
                var questionNode=itemNode.childNodes[0];
                quizItems[i]=new QuizItem(questionNode.firstChild.nodeValue);
                var a=1;
                // answer follows question
                var answerNode=itemNode.childNodes[a++];
                while (answerNode)
                {
                        //trace(answerNode);
                        var isCorrectAnswer=false;
                        if (answerNode.attributes.correct==y)
                                isCorrectAnswer=true;
                        //get answer
                        tempAnswer = answerNode.firstChild.nodeValue;
                        //go to next node
                        answerNode=itemNode.childNodes[a++];
                        //get feedback
                        tempFeedback = answerNode.firstChild.nodeValue;
                        //add answer and feedback to current answer/feedback 
 'pair'
                        quizItems[i].addAnswer(tempAnswer, isCorrectAnswer, 
 tempFeedback);
                        // goto the next answer
                        answerNode=itemNode.childNodes[a++];
                }
                i++;
        }
        gotoAndStop(Start);
 }

 var quizItems=new Array();
 var myData=new XML();
 myData.ignoreWhite=true;
 myData.onLoad=onQuizData;
 myData.load(google_quiz.xml);
 stop();

 And this is what the xml file looks like:

 !DOCTYPE quiz [
        !ELEMENT quiz (title, items)
        !ELEMENT title (#PCDATA)
        !ELEMENT items (item)+
        !ELEMENT item (question, answer, answer+)
        !ELEMENT question (#PCDATA)
        !ELEMENT answer (#PCDATA)
        !ELEMENT feedback (#PCDATA)
        !ATTLIST answer correct (y) #IMPLIED
 ]
 quiz
        titleMy quiz/title
        items
        item
          questionWhat colour are greenfly/question
          answerRed/answer
          feedbackYou chose answer [a]. This is incorrect. The correct
 answer is [d]./feedback
          answerBlue/answer
          feedbackYou chose answer [b]. This is incorrect. The correct
 answer is [d]./feedback
          answerCheese/answer
          feedbackSorry, cheese is not a colour./feedback
          answer correct=yGreen/answer
          feedbackCorrect!/feedback
        /item
 /quiz

 Thanks for reading, any help would be very gratefully received.

 Paul
 

Re: [Flashcoders] Line break in dynamic text imported from xml

2010-05-19 Thread Ktu
From what I remember when using xml with html, you need to wrap your html
inside of a* ![CDATA[**]]* to get it to render properly. You can put a \r
or \n in it as well.


On Wed, May 19, 2010 at 10:56 AM, Paul Jinks p...@pauljinks.co.uk wrote:

 It's been a long time since I've done any coding. I think this is
 pretty straightforward but it has me beat. Can you help?

 I'm working on a quiz using AS1 (I think) that reads questions and
 answers from an xml file. (see below for the script).

 I'd like to introduce line breaks into the feedback, how do I do this?
 I've tried using \r but it just displays this as text.

 Ideally I'd like to display the text as html but so far my efforts to
 do this have broken the script - any pointers?

 Here's the action script for the quiz. I hope it makes sense:

 function QuizItem(question)
 {
this.question=question;
this.answers=new Array();
this.feedbacks=new Array();
this.numOfAnswers=0;
this.correctAnswer=0;
this.getQuestion=function()
{
return this.question;
}
this.addAnswer=function(answer, isCorrectAnswer, feedback)
{
this.answers[this.numOfAnswers]=answer;
this.feedbacks[this.numOfAnswers]=feedback;
if (isCorrectAnswer)
this.correctAnswer=this.numOfAnswers;
this.numOfAnswers++;
}

this.getAnswer=function(answerNumberToGet)
{
return this.answers[answerNumberToGet];
}
this.getFeedback=function(answerNumberToGet)
{
return this.feedbacks[answerNumberToGet];
}

this.getCorrectAnswerNumber=function()
{
return this.correctAnswer;
}

this.checkAnswerNumber=function(userAnswerNumber)
{
if (userAnswerNumber==this.getCorrectAnswerNumber()) {
numOfQuestionsAnsweredCorrectly++;
} else {
numOfQuestionsAnsweredIncorrectly++;
}
feedback = _root[feedback+parseInt((userAnswerNumber+1))]
gotoAndPlay(Feedback);
}
 }

 function onQuizData(success)
 {
var quizNode=this.firstChild;
var quizTitleNode=quizNode.firstChild;
title=quizTitleNode.firstChild.nodeValue;

var i=0;
// items follows title
var itemsNode=quizNode.childNodes[1];
while (itemsNode.childNodes[i])
{
var itemNode=itemsNode.childNodes[i];
// item consists of  question and one or more answer
// question always comes before answers (node 0 of
 item)
var questionNode=itemNode.childNodes[0];
quizItems[i]=new
 QuizItem(questionNode.firstChild.nodeValue);
var a=1;
// answer follows question
var answerNode=itemNode.childNodes[a++];
while (answerNode)
{
//trace(answerNode);
var isCorrectAnswer=false;
if (answerNode.attributes.correct==y)
isCorrectAnswer=true;
//get answer
tempAnswer = answerNode.firstChild.nodeValue;
//go to next node
answerNode=itemNode.childNodes[a++];
//get feedback
tempFeedback = answerNode.firstChild.nodeValue;
//add answer and feedback to current answer/feedback
 'pair'
quizItems[i].addAnswer(tempAnswer, isCorrectAnswer,
 tempFeedback);
// goto the next answer
answerNode=itemNode.childNodes[a++];
}
i++;
}
gotoAndStop(Start);
 }

 var quizItems=new Array();
 var myData=new XML();
 myData.ignoreWhite=true;
 myData.onLoad=onQuizData;
 myData.load(google_quiz.xml);
 stop();

 And this is what the xml file looks like:

 !DOCTYPE quiz [
!ELEMENT quiz (title, items)
!ELEMENT title (#PCDATA)
!ELEMENT items (item)+
!ELEMENT item (question, answer, answer+)
!ELEMENT question (#PCDATA)
!ELEMENT answer (#PCDATA)
!ELEMENT feedback (#PCDATA)
!ATTLIST answer correct (y) #IMPLIED
 ]
 quiz
titleMy quiz/title
items
item
  questionWhat colour are greenfly/question
  answerRed/answer
  feedbackYou chose answer [a]. This is incorrect. The correct
 answer is [d]./feedback
  answerBlue/answer
  feedbackYou chose answer [b]. This is incorrect. The correct
 answer is [d]./feedback
  answerCheese/answer
  feedbackSorry, cheese is not a colour./feedback
  answer correct=yGreen/answer
  feedbackCorrect!/feedback

Re: [Flashcoders] Line break in dynamic text imported from xml

2010-05-19 Thread Paul Jinks
Thanks for your reply Nathan

I've tried \n and it shows up as plain text the same as \r. I'm not
sure why this should be, but I'll keep digging.

Paul

On 19 May 2010 16:35, Nathan Mynarcik nat...@mynarcik.com wrote:
 I believe you can use \n in your feedback string and it makes a new line.




 On Wed, May 19, 2010 at 10:56 AM, Paul Jinks p...@pauljinks.co.uk wrote:
 It's been a long time since I've done any coding. I think this is
 pretty straightforward but it has me beat. Can you help?

 I'm working on a quiz using AS1 (I think) that reads questions and
 answers from an xml file. (see below for the script).

 I'd like to introduce line breaks into the feedback, how do I do this?
 I've tried using \r but it just displays this as text.

 Ideally I'd like to display the text as html but so far my efforts to
 do this have broken the script - any pointers?

 Here's the action script for the quiz. I hope it makes sense:

 function QuizItem(question)
 {
        this.question=question;
        this.answers=new Array();
        this.feedbacks=new Array();
        this.numOfAnswers=0;
        this.correctAnswer=0;
        this.getQuestion=function()
        {
                return this.question;
        }
        this.addAnswer=function(answer, isCorrectAnswer, feedback)
        {
                this.answers[this.numOfAnswers]=answer;
                this.feedbacks[this.numOfAnswers]=feedback;
                if (isCorrectAnswer)
                        this.correctAnswer=this.numOfAnswers;
                this.numOfAnswers++;
        }

        this.getAnswer=function(answerNumberToGet)
        {
                return this.answers[answerNumberToGet];
        }
        this.getFeedback=function(answerNumberToGet)
        {
                return this.feedbacks[answerNumberToGet];
        }

        this.getCorrectAnswerNumber=function()
        {
                return this.correctAnswer;
        }

        this.checkAnswerNumber=function(userAnswerNumber)
        {
                if (userAnswerNumber==this.getCorrectAnswerNumber()) {
                        numOfQuestionsAnsweredCorrectly++;
                } else {
                        numOfQuestionsAnsweredIncorrectly++;
                }
                feedback = _root[feedback+parseInt((userAnswerNumber+1))]
                gotoAndPlay(Feedback);
        }
 }

 function onQuizData(success)
 {
        var quizNode=this.firstChild;
        var quizTitleNode=quizNode.firstChild;
        title=quizTitleNode.firstChild.nodeValue;

        var i=0;
        // items follows title
        var itemsNode=quizNode.childNodes[1];
        while (itemsNode.childNodes[i])
        {
                var itemNode=itemsNode.childNodes[i];
                // item consists of  question and one or more answer
                // question always comes before answers (node 0 of item)
                var questionNode=itemNode.childNodes[0];
                quizItems[i]=new QuizItem(questionNode.firstChild.nodeValue);
                var a=1;
                // answer follows question
                var answerNode=itemNode.childNodes[a++];
                while (answerNode)
                {
                        //trace(answerNode);
                        var isCorrectAnswer=false;
                        if (answerNode.attributes.correct==y)
                                isCorrectAnswer=true;
                        //get answer
                        tempAnswer = answerNode.firstChild.nodeValue;
                        //go to next node
                        answerNode=itemNode.childNodes[a++];
                        //get feedback
                        tempFeedback = answerNode.firstChild.nodeValue;
                        //add answer and feedback to current answer/feedback 
 'pair'
                        quizItems[i].addAnswer(tempAnswer, isCorrectAnswer, 
 tempFeedback);
                        // goto the next answer
                        answerNode=itemNode.childNodes[a++];
                }
                i++;
        }
        gotoAndStop(Start);
 }

 var quizItems=new Array();
 var myData=new XML();
 myData.ignoreWhite=true;
 myData.onLoad=onQuizData;
 myData.load(google_quiz.xml);
 stop();

 And this is what the xml file looks like:

 !DOCTYPE quiz [
        !ELEMENT quiz (title, items)
        !ELEMENT title (#PCDATA)
        !ELEMENT items (item)+
        !ELEMENT item (question, answer, answer+)
        !ELEMENT question (#PCDATA)
        !ELEMENT answer (#PCDATA)
        !ELEMENT feedback (#PCDATA)
        !ATTLIST answer correct (y) #IMPLIED
 ]
 quiz
        titleMy quiz/title
        items
        item
          questionWhat colour are greenfly/question
          answerRed/answer
          feedbackYou chose answer [a]. This is incorrect. The correct
 answer is [d]./feedback
          answerBlue/answer
          feedbackYou chose answer [b]. This is incorrect. The correct
 answer is [d]./feedback
          answerCheese/answer
          

Re: [Flashcoders] Line break in dynamic text imported from xml

2010-05-19 Thread Paul Jinks
Thanks Ktu

Yes, that sounds right. However, I'm not trying to enter the text as
html. When I've tried to alter the script to allow this, it's crashed.

I probably ought to go back and fix this properly, but I'm looking for
a way to put line breaks in non-html dynamic text. I'll keep digging
and let you know how I get on.

Paul

On 19 May 2010 16:38, Ktu ktu_fl...@cataclysmicrewind.com wrote:
 From what I remember when using xml with html, you need to wrap your html
 inside of a* ![CDATA[**]]* to get it to render properly. You can put a \r
 or \n in it as well.


 On Wed, May 19, 2010 at 10:56 AM, Paul Jinks p...@pauljinks.co.uk wrote:

 It's been a long time since I've done any coding. I think this is
 pretty straightforward but it has me beat. Can you help?

 I'm working on a quiz using AS1 (I think) that reads questions and
 answers from an xml file. (see below for the script).

 I'd like to introduce line breaks into the feedback, how do I do this?
 I've tried using \r but it just displays this as text.

 Ideally I'd like to display the text as html but so far my efforts to
 do this have broken the script - any pointers?

 Here's the action script for the quiz. I hope it makes sense:

 function QuizItem(question)
 {
        this.question=question;
        this.answers=new Array();
        this.feedbacks=new Array();
        this.numOfAnswers=0;
        this.correctAnswer=0;
        this.getQuestion=function()
        {
                return this.question;
        }
        this.addAnswer=function(answer, isCorrectAnswer, feedback)
        {
                this.answers[this.numOfAnswers]=answer;
                this.feedbacks[this.numOfAnswers]=feedback;
                if (isCorrectAnswer)
                        this.correctAnswer=this.numOfAnswers;
                this.numOfAnswers++;
        }

        this.getAnswer=function(answerNumberToGet)
        {
                return this.answers[answerNumberToGet];
        }
        this.getFeedback=function(answerNumberToGet)
        {
                return this.feedbacks[answerNumberToGet];
        }

        this.getCorrectAnswerNumber=function()
        {
                return this.correctAnswer;
        }

        this.checkAnswerNumber=function(userAnswerNumber)
        {
                if (userAnswerNumber==this.getCorrectAnswerNumber()) {
                        numOfQuestionsAnsweredCorrectly++;
                } else {
                        numOfQuestionsAnsweredIncorrectly++;
                }
                feedback = _root[feedback+parseInt((userAnswerNumber+1))]
                gotoAndPlay(Feedback);
        }
 }

 function onQuizData(success)
 {
        var quizNode=this.firstChild;
        var quizTitleNode=quizNode.firstChild;
        title=quizTitleNode.firstChild.nodeValue;

        var i=0;
        // items follows title
        var itemsNode=quizNode.childNodes[1];
        while (itemsNode.childNodes[i])
        {
                var itemNode=itemsNode.childNodes[i];
                // item consists of  question and one or more answer
                // question always comes before answers (node 0 of
 item)
                var questionNode=itemNode.childNodes[0];
                quizItems[i]=new
 QuizItem(questionNode.firstChild.nodeValue);
                var a=1;
                // answer follows question
                var answerNode=itemNode.childNodes[a++];
                while (answerNode)
                {
                        //trace(answerNode);
                        var isCorrectAnswer=false;
                        if (answerNode.attributes.correct==y)
                                isCorrectAnswer=true;
                        //get answer
                        tempAnswer = answerNode.firstChild.nodeValue;
                        //go to next node
                        answerNode=itemNode.childNodes[a++];
                        //get feedback
                        tempFeedback = answerNode.firstChild.nodeValue;
                        //add answer and feedback to current answer/feedback
 'pair'
                        quizItems[i].addAnswer(tempAnswer, isCorrectAnswer,
 tempFeedback);
                        // goto the next answer
                        answerNode=itemNode.childNodes[a++];
                }
                i++;
        }
        gotoAndStop(Start);
 }

 var quizItems=new Array();
 var myData=new XML();
 myData.ignoreWhite=true;
 myData.onLoad=onQuizData;
 myData.load(google_quiz.xml);
 stop();

 And this is what the xml file looks like:

 !DOCTYPE quiz [
        !ELEMENT quiz (title, items)
        !ELEMENT title (#PCDATA)
        !ELEMENT items (item)+
        !ELEMENT item (question, answer, answer+)
        !ELEMENT question (#PCDATA)
        !ELEMENT answer (#PCDATA)
        !ELEMENT feedback (#PCDATA)
        !ATTLIST answer correct (y) #IMPLIED
 ]
 quiz
        titleMy quiz/title
        items
        item
          questionWhat colour are greenfly/question
          

[Flashcoders] Flashing Flash

2010-05-19 Thread John Singleton
Hi;
I have this code:

big_container.removeChild(container_middle);
big_container.removeChild(container_middle2);
container_middle = new Sprite();
big_container.addChild(container_middle)

It loops and is called in each iteration except the first. The problem is, when 
it runs, the image in the container momentarily disappears then reappears, 
which doesn't look good. How work around this?
TIA,
John


  

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


Re: [Flashcoders] Flashing Flash

2010-05-19 Thread Bob Wohl
W/O seeing what is exactly going on... maybe set the alpha to 0 till it's
been added?

On Wed, May 19, 2010 at 9:19 AM, John Singleton
johnsingleton...@yahoo.comwrote:

 Hi;
 I have this code:

big_container.removeChild(container_middle);
big_container.removeChild(container_middle2);
container_middle = new Sprite();
big_container.addChild(container_middle)

 It loops and is called in each iteration except the first. The problem is,
 when it runs, the image in the container momentarily disappears then
 reappears, which doesn't look good. How work around this?
 TIA,
 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


Re: [Flashcoders] Flashing Flash

2010-05-19 Thread jonathan howe
Looping in frame code, looping in ENTER_FRAME event or looping via a timer?

On Wed, May 19, 2010 at 1:16 PM, Bob Wohl bob.w...@gmail.com wrote:

 W/O seeing what is exactly going on... maybe set the alpha to 0 till it's
 been added?

 On Wed, May 19, 2010 at 9:19 AM, John Singleton
 johnsingleton...@yahoo.comwrote:

  Hi;
  I have this code:
 
 big_container.removeChild(container_middle);
 big_container.removeChild(container_middle2);
 container_middle = new Sprite();
 big_container.addChild(container_middle)
 
  It loops and is called in each iteration except the first. The problem
 is,
  when it runs, the image in the container momentarily disappears then
  reappears, which doesn't look good. How work around this?
  TIA,
  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




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


RE: [Flashcoders] Flashing Flash

2010-05-19 Thread Keith Reinfeld
Don't remove container_middle at all. Instead add/remove its children:

container_middle.addChildAt(newImage, 0);
container_middle.removeChildAt(1);
 
Regards,

Keith Reinfeld
Home Page: http://keithreinfeld.home.comcast.net

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-
 boun...@chattyfig.figleaf.com] On Behalf Of jonathan howe
 Sent: Wednesday, May 19, 2010 12:23 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] Flashing Flash
 
 Looping in frame code, looping in ENTER_FRAME event or looping via a
 timer?
 
 On Wed, May 19, 2010 at 1:16 PM, Bob Wohl bob.w...@gmail.com wrote:
 
  W/O seeing what is exactly going on... maybe set the alpha to 0 till
 it's
  been added?
 
  On Wed, May 19, 2010 at 9:19 AM, John Singleton
  johnsingleton...@yahoo.comwrote:
 
   Hi;
   I have this code:
  
  big_container.removeChild(container_middle);
  big_container.removeChild(container_middle2);
  container_middle = new Sprite();
  big_container.addChild(container_middle)
  
   It loops and is called in each iteration except the first. The
 problem
  is,
   when it runs, the image in the container momentarily disappears
 then
   reappears, which doesn't look good. How work around this?
   TIA,
   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
 
 
 
 
 --
 -jonathan howe
 ___
 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] tint a movieclip

2010-05-19 Thread Mendelsohn, Michael
Hi list...

This is probably a bitwise question, which is why I'm posting.  I have a 
grayscale movieclip and I want to give it a particular hue based on a hex 
value.  I don't want it to be tint, where it approaches being a solid color, 
but rather like watercolors.

Additionally, I know that the left side values of the Advanced color pallet 
does this, and the right side values are for tinting.  I'm just not sure at the 
moment how to do that through code.

Thanks if anyone knows!
- Michael M.

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


Re: [Flashcoders] tint a movieclip

2010-05-19 Thread Juan Pablo Califano
To apply in code the same transform you set at author time in the IDE:

var colTransf:ColorTransform = mc.transform.colorTransform;
colTransf.redMultiplier = -0.18;
colTransf.greenMultiplier = -0.42;
colTransf.blueMultiplier = 0.22;
colTransf.alphaMultiplier = 0.26;
mc.transform.colorTransform = colTransf;

The left values in the panel are the multipliers (one for each channel).
There's a difference: in code the values are expressed as normal value in
the range 0-1 (whereas in the IDE it's represented as a percetage, 0 - 100).

So the above code will have the same effect as setting the left values to
-18%, -42%, 22% and 26%.

If you want to change the values in the right of the panel through code, set
the offsets instead (the properties redOffset, greenOffset, etc in the
ColorTransform object). They are expressed in the same units both in code
and the IDE.

Cheers
Juan Pablo Califano

2010/5/19 Mendelsohn, Michael michael.mendels...@fmglobal.com

 Hi list...

 This is probably a bitwise question, which is why I'm posting.  I have a
 grayscale movieclip and I want to give it a particular hue based on a hex
 value.  I don't want it to be tint, where it approaches being a solid color,
 but rather like watercolors.

 Additionally, I know that the left side values of the Advanced color pallet
 does this, and the right side values are for tinting.  I'm just not sure at
 the moment how to do that through code.

 Thanks if anyone knows!
 - Michael M.

 ___
 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] FDT4 or Flash Builder 4

2010-05-19 Thread Latcho

can I addin to this:
FlashDevelop 3.1.1 has a profiler now too, simple but yet effective. 
Also their debugger took off finally.
The only thing I miss on FD is SVN integration. But in regard of 
setting-up-the-ultimate-flash-development-environment article which 
takes half a day to install I guess, I'm up and running in 5 mins on a 
new machine by downloading the SDK and FD. Click'nPlay.


Latcho.


On 19-05-10 17:20, Eric E. Dolecki wrote:

It pairs nicely with Flash CS5... do your UI stuff in the IDE and have the
project live in FB4. It's a workflow with document class that I've been
banging on for a while and I personally like it a lot. The Flex stuff is a
bonus.

Eric


On Wed, May 19, 2010 at 11:05 AM, Tom Goodingt...@quickthinkmedia.co.ukwrote:

   

Thanks - not sure I can justify buying both though - is the only unique
feature to Flash Builder the ability to do Wysiwyg layouts on Flex forms?

On 19 May 2010, at 14:22, John McCormack wrote:

Hi Tom,

  Has anyone used both in conjunction?

This setup of FDT with FB looks promising - I will be trying it next week:

http://blog.hexagonstar.com/setting-up-the-ultimate-flash-development-environment/

John

On 19/05/2010 10:52, Tom Gooding wrote:
 

I am about to invest in a few desks worth of AS3 IDEs (we have both
   

straight Flash projects and future requirements for Flex applications).
 

I currently use FDT and am pretty happy with it (though not used it for
   

MXML) - my main gripe being the absence of the Flash Builder profiling
features - I see FDT is introducing this and has a Beta available which
looks good (possibly better than FlashBuilder).
 

Has anyone been through any kind of evaluation/comparison? Has anyone
   

used both in conjunction? Any steer would be appreciated... What say the
masses?
 

Cheers,

Tom




___
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


[SPAM] Re: [Flashcoders] tint a movieclip

2010-05-19 Thread Latcho
Spam detection software, running on the system he01.virtec.org, has
identified this incoming email as possible spam.  The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email.  If you have any questions, see
the administrator of that system for details.

Content preview:  codewise this offers you all the info and possibilities:
  http://www.adobe.com/devnet/flash/articles/matrix_transformations.html
  On 20-05-10 2:42, Juan Pablo Califano wrote:  To apply in code the same
  transform you set at author time in the IDE:   var
  colTransf:ColorTransform = mc.transform.colorTransform; 
  colTransf.redMultiplier = -0.18;  colTransf.greenMultiplier = -0.42; 
  colTransf.blueMultiplier = 0.22;  colTransf.alphaMultiplier = 0.26; 
  mc.transform.colorTransform = colTransf;   The left values in the
  panel are the multipliers (one for each channel).  There's a
  difference: in code the values are expressed as normal value in  the
  range 0-1 (whereas in the IDE it's represented as a percetage, 0 - 100).
So the above code will have the same effect as setting the left
  values to  -18%, -42%, 22% and 26%.   If you want to change the
  values in the right of the panel through code, set  the offsets instead
  (the properties redOffset, greenOffset, etc in the  ColorTransform
  object). They are expressed in the same units both in code  and the
  IDE.   Cheers  Juan Pablo Califano   2010/5/19 Mendelsohn,
  Michaelmichael.mendels...@fmglobal.comHi list...   This is
  probably a bitwise question, which is why I'm posting. I have a 
  grayscale movieclip and I want to give it a particular hue based on a
  hex  value. I don't want it to be tint, where it approaches being a
  solid color,  but rather like watercolors.   Additionally, I know
  that the left side values of the Advanced color pallet  does this, and
  the right side values are for tinting. I'm just not sure at  the
  moment how to do that through code.   Thanks if anyone knows!  -
  Michael M.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   [...] 

Content analysis details:   (7.2 points, 5.5 required)

 pts rule name  description
 -- --
 1.7 RATWARE_GECKO_BUILDBulk email fingerprint (Gecko faked) found
-0.2 BAYES_40   BODY: Bayesian spam probability is 20 to 40%
[score: 0.2520]
 2.0 RCVD_IN_SORBS_DUL  RBL: SORBS: sent directly from dynamic IP address
[195.240.16.75 listed in dnsbl.sorbs.net]
 1.7 DNS_FROM_RFC_POST  RBL: Envelope sender in
postmaster.rfc-ignorant.org
 2.0 RCVD_IN_PBLRBL: Received via a relay in Spamhaus PBL
[195.240.16.75 listed in zen.spamhaus.org]


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