RE: [Flashcoders] Crossword generator advice

2009-06-01 Thread Paul Steven
I am still struggling to find a solution to this crossword generator and
could do with some advice on a possible solution I want to try.

If I enter my list of 16 words in a particular order (an order based on what
looks like the order the solution would place them), the generator creates
the puzzle in a matter of seconds.

However if I enter them in a different order, the generator always breaks
out of the loop by my exit condition (number of loops  5000). I am assuming
this is either due to an error in my code or due to the fact there are so
many combinations to try. 

I am therefore thinking a possible solution is to try every permutation (I
think this is the right word) of the 16 words. If I am correct there would
be 240 possible permutations. ((X - 1) * X) where X is the number of items
in the list.

I am not sure however how to create the 240 variations of the list.

Any advice on how to create these 240 permutations of the list would be much
appreciated.

Thanks

Paul

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


Re: [Flashcoders] Crossword generator advice

2009-06-01 Thread Paul Andrews

You should use recursion.

At each stage you should loop through the available words, trying to lay 
them onto the crossword area.


Paul

It goes a bit like this:

var wordList = [word1,word2,word3, ..   ];
var xwordSolution:XwordSolution;
var currentSolution= new XwordSolution(maxWidth, maxHeight); // emptyGrid

xwordSolution = layoutXword(wordList, currentSolution);

if (xwordSolution.isValid())
trace(Solved!)
else
trace(no solution found);

function layoutXword(words:Array, 
currentSolution:XwordSolution):XwordSolution

{
while (words.length  0){
currentWord = words.pop();

// horizontal

newSolution = layoutHorizontalWord(currentWord, currentSolution);
if (newSolution.isValid())
{
   newSolution = layoutXword(words, newSolution );
   if (newSolution.isValid())
   return newSolution; // solved
}
// the horizontal layout wasn't possible, try vertical
newSolution = layoutVerticalWord(currentWord, currentSolution);
if (newSolution.isValid())
{
   newSolution = layoutXword(words, newSolution );
   if (newSolution.isValid())
   return newSolution; // solved
}
// couldn't layout this word, try the next
}
// Couldn't layout any of the words - solution failed.
return newSolution; // this will be failed
}



















- Original Message - 
From: Paul Steven paul_ste...@btinternet.com

To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
Sent: Monday, June 01, 2009 10:33 AM
Subject: RE: [Flashcoders] Crossword generator advice



I am still struggling to find a solution to this crossword generator and
could do with some advice on a possible solution I want to try.

If I enter my list of 16 words in a particular order (an order based on 
what

looks like the order the solution would place them), the generator creates
the puzzle in a matter of seconds.

However if I enter them in a different order, the generator always breaks
out of the loop by my exit condition (number of loops  5000). I am 
assuming

this is either due to an error in my code or due to the fact there are so
many combinations to try.

I am therefore thinking a possible solution is to try every permutation (I
think this is the right word) of the 16 words. If I am correct there would
be 240 possible permutations. ((X - 1) * X) where X is the number of items
in the list.

I am not sure however how to create the 240 variations of the list.

Any advice on how to create these 240 permutations of the list would be 
much

appreciated.

Thanks

Paul

___
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] Crossword generator advice

2009-06-01 Thread Paul Andrews
I've realised that there needs to be further loops around the layout code. 
For the crossword grid a viable set of horizontal  layout positions may 
start at a given (x,y) position and the solution should search in terms of 
increasing x, then y, so the code might then go something like this..


layoutFrom=Point(0,0); // top left

while  (layoutFrom!=null)
{
   newSolution = layoutHorizontalWord(layFrom, currentWord, 
currentSolution);

   if (newSolution.isValid())
   {
   newSolution = layoutXword(words, newSolution );
   if (newSolution.isValid())
   return newSolution; // solved
}
   layoutFrom= newSolution.getNextPosition(); // returns the next x,y 
position after the last position used, or null if none left.

}

Paul





- Original Message - 
From: Paul Andrews p...@ipauland.com

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Monday, June 01, 2009 11:14 AM
Subject: Re: [Flashcoders] Crossword generator advice



You should use recursion.

At each stage you should loop through the available words, trying to lay 
them onto the crossword area.


Paul

It goes a bit like this:

var wordList = [word1,word2,word3, ..   ];
var xwordSolution:XwordSolution;
var currentSolution= new XwordSolution(maxWidth, maxHeight); // emptyGrid

xwordSolution = layoutXword(wordList, currentSolution);

if (xwordSolution.isValid())
trace(Solved!)
else
trace(no solution found);

function layoutXword(words:Array, 
currentSolution:XwordSolution):XwordSolution

{
while (words.length  0){
currentWord = words.pop();

// horizontal

newSolution = layoutHorizontalWord(currentWord, currentSolution);
if (newSolution.isValid())
{
   newSolution = layoutXword(words, newSolution );
   if (newSolution.isValid())
   return newSolution; // solved
}
// the horizontal layout wasn't possible, try vertical
newSolution = layoutVerticalWord(currentWord, currentSolution);
if (newSolution.isValid())
{
   newSolution = layoutXword(words, newSolution );
   if (newSolution.isValid())
   return newSolution; // solved
}
// couldn't layout this word, try the next
}
// Couldn't layout any of the words - solution failed.
return newSolution; // this will be failed
}



















- Original Message - 
From: Paul Steven paul_ste...@btinternet.com

To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
Sent: Monday, June 01, 2009 10:33 AM
Subject: RE: [Flashcoders] Crossword generator advice



I am still struggling to find a solution to this crossword generator and
could do with some advice on a possible solution I want to try.

If I enter my list of 16 words in a particular order (an order based on 
what
looks like the order the solution would place them), the generator 
creates

the puzzle in a matter of seconds.

However if I enter them in a different order, the generator always breaks
out of the loop by my exit condition (number of loops  5000). I am 
assuming

this is either due to an error in my code or due to the fact there are so
many combinations to try.

I am therefore thinking a possible solution is to try every permutation 
(I
think this is the right word) of the 16 words. If I am correct there 
would
be 240 possible permutations. ((X - 1) * X) where X is the number of 
items

in the list.

I am not sure however how to create the 240 variations of the list.

Any advice on how to create these 240 permutations of the list would be 
much

appreciated.

Thanks

Paul

___
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] ie 8 flash crashes

2009-06-01 Thread Hans Wichman
Hi,

ok thanks both! I didn't think it was this issue since I'm not using the
webcam and/or video but apparently it is, nice:).

regards
JC

On Fri, May 29, 2009 at 5:52 PM, Anthony Pace anthony.p...@utoronto.cawrote:

 //Its a blue tooth webcam video capture filter, and it is not a part of the
 default windows or ie8 installation.  Rename the dll and things should be
 fine.

 Hans Wichman wrote:

  Hi list,

 we're getting reports some of our flash sites are crashing in ie8, mostly
 player 10 it seems.
 Anyone experiencing this, it seems to come from BtwVdpCapFilter.dll.

 Both content in both as2 and as3 is crashing.

 Any insights would be appreciated. This is content that has run fine for
 about 3 to 4 years now in previous versions of IE and flash.

 regards
 JC
 ___
 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] issue with mc height

2009-06-01 Thread Fabio Pinatti
Hello!

@Andrei, hey pal, your solutions seems to work. For me that issue was a big
surprise and the fix more yet, since I thought when content is masked (like
my case), the off area wasn't rendered. Pretty good know about that.

@Karl, your fix is a lot elegant and it would be the pretty nice in terms of
acessibility improvement, but you know, as the website (that was a bit
problematic) is done, I'm scared in redoing a lot of code... But I'll keep
the advice in mind, sounds very good.

I will keep you posted if the problem persists

Thanks!
Pinatti

On Sun, May 31, 2009 at 6:55 PM, Karl DeSaulniers k...@designdrumm.comwrote:

 Maybe try setting a max number of images that can be loaded at one time.
 Set it up so that as you scroll, it deletes one from where you came from
 (if scrolling down then where you came from was the - top)
 and adds one to where you are going (if scrolling down, where your going is
 - down).
 Then you only have a max number of images loading your users screen and you
 can get rid of that jumpy scroll.

 (I presume you use that because you don't want it to take forever to scroll
 your long page,
 well its a little hard to follow and gets a little tiresome after two or
 three slides.. :)

 well it did for me.

 You need to set an array for holding the amount of images, the amount of
 images being displayed, which one is loading and which one is being removed
 and set up your scroll to cycle though according.
 HTH


 Karl DeSaulniers
 Design Drumm
 http://designdrumm.com


 On May 31, 2009, at 1:44 PM, Fabio Pinatti wrote:

  Hello all,

 I'm running an issue that is taking my sleep away. If you go to that url:

 http://www.costanostra.net/costinha/

 you'll see a lot images loading. So, I load one, after loaded I show it,
 start load the second one, etc. Until all my xml is complete. The big
 issue
 is, in a moment (almost in the all xml loading end), a greyed rectangle
 appears over my images. Seems that black rectangle has the hue of one of
 the
 latest images loaded. Not sure why or what this is happening, but looks
 like
 some issue about the maximum movieclip height. If you see the last image
 of
 list, it's weird, seems the pixels are pulled along the image, and then
 the
 issued image starts again in 0 y position.

 I have a trace after all images being loaded, I have a total height of
 19209px (yes, I know, It's a lot big). Any thoughts about that maximum
 movieclip height? Suggestions? The website is basically done, but I'm
 suprised with that size issue =(

 Thank you

 --
 Fabio Pinatti
 :: web.developer
  www.pinatti.com.br
 :: 19. 9184.3745 / 3342.1130
 ___
 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




-- 
Fabio Pinatti
:: web.developer
 www.pinatti.com.br
:: 19. 9184.3745 / 3342.1130
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Crossword generator advice

2009-06-01 Thread Charles Parcell
As Paul has stated, recursion is the answer to building this generator
correctly.

But just as a sanity check, have you traced out the combinations that your
currect generator is attempting? That may put some light on where it was
breaking. If for nothing else, it will help you understand where the logic
broke down. Learning from our mistakes is always helpful.

Charles P.



On Mon, Jun 1, 2009 at 6:59 AM, Paul Andrews p...@ipauland.com wrote:

 I've realised that there needs to be further loops around the layout code.
 For the crossword grid a viable set of horizontal  layout positions may
 start at a given (x,y) position and the solution should search in terms of
 increasing x, then y, so the code might then go something like this..

 layoutFrom=Point(0,0); // top left

 while  (layoutFrom!=null)
 {
   newSolution = layoutHorizontalWord(layFrom, currentWord,
 currentSolution);
   if (newSolution.isValid())
   {
   newSolution = layoutXword(words, newSolution );
   if (newSolution.isValid())
   return newSolution; // solved
}
   layoutFrom= newSolution.getNextPosition(); // returns the next x,y
 position after the last position used, or null if none left.
 }

 Paul





 - Original Message - From: Paul Andrews p...@ipauland.com
 To: Flash Coders List flashcoders@chattyfig.figleaf.com
 Sent: Monday, June 01, 2009 11:14 AM
 Subject: Re: [Flashcoders] Crossword generator advice


  You should use recursion.

 At each stage you should loop through the available words, trying to lay
 them onto the crossword area.

 Paul

 It goes a bit like this:

 var wordList = [word1,word2,word3, ..   ];
 var xwordSolution:XwordSolution;
 var currentSolution= new XwordSolution(maxWidth, maxHeight); // emptyGrid

 xwordSolution = layoutXword(wordList, currentSolution);

 if (xwordSolution.isValid())
 trace(Solved!)
 else
 trace(no solution found);

 function layoutXword(words:Array,
 currentSolution:XwordSolution):XwordSolution
 {
 while (words.length  0){
 currentWord = words.pop();

 // horizontal

 newSolution = layoutHorizontalWord(currentWord, currentSolution);
 if (newSolution.isValid())
 {
   newSolution = layoutXword(words, newSolution );
   if (newSolution.isValid())
   return newSolution; // solved
 }
 // the horizontal layout wasn't possible, try vertical
 newSolution = layoutVerticalWord(currentWord, currentSolution);
 if (newSolution.isValid())
 {
   newSolution = layoutXword(words, newSolution );
   if (newSolution.isValid())
   return newSolution; // solved
 }
 // couldn't layout this word, try the next
 }
 // Couldn't layout any of the words - solution failed.
 return newSolution; // this will be failed
 }



















 - Original Message - From: Paul Steven 
 paul_ste...@btinternet.com
 To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
 Sent: Monday, June 01, 2009 10:33 AM
 Subject: RE: [Flashcoders] Crossword generator advice


  I am still struggling to find a solution to this crossword generator and
 could do with some advice on a possible solution I want to try.

 If I enter my list of 16 words in a particular order (an order based on
 what
 looks like the order the solution would place them), the generator
 creates
 the puzzle in a matter of seconds.

 However if I enter them in a different order, the generator always breaks
 out of the loop by my exit condition (number of loops  5000). I am
 assuming
 this is either due to an error in my code or due to the fact there are so
 many combinations to try.

 I am therefore thinking a possible solution is to try every permutation
 (I
 think this is the right word) of the 16 words. If I am correct there
 would
 be 240 possible permutations. ((X - 1) * X) where X is the number of
 items
 in the list.

 I am not sure however how to create the 240 variations of the list.

 Any advice on how to create these 240 permutations of the list would be
 much
 appreciated.

 Thanks

 Paul

 ___
 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


[Flashcoders] Flash and Video

2009-06-01 Thread Lehr, Theodore M (N-SGIS)
I have a .mov file that I want to import into a movie and then slow it
down (slow motion). Any way to do this?

 

Ted

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


RE: [Flashcoders] Crossword generator advice

2009-06-01 Thread Paul Steven
Thanks for all the new advice. Yes I figured a recursive solution was
required and even though my code doesn't technically recurse, it more or
less does the same thing.

Anyway I have just figured out the problem with my code after painstakingly
tracing variables for the last few days.

I was not accounting for the fact a word can be placed either across or
down in my backtracking code. So words were being crossed off the list
without giving them a second chance at having a stab at trying all
combinations that occurred from placing it in the alternative orientation
(assuming this was a valid positioning).

I am extremely pleased to have cracked this and will celebrate with a cold
beer in the garden. I will also come back and look implementing a recursive
solution - thought the word recursion hurts my head:)

Cheers

Paul

Thanks again to Paul and Charles for their help in my times of need.

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


Re: [Flashcoders] Flash and Video

2009-06-01 Thread laurent
Maybe you can import it in a 60 fps swf, make it fit to the frame rate 
and then get your mc to 30.


Or if you can, use after effects or final cut pro.

Laurent

Lehr, Theodore M (N-SGIS) a écrit :

I have a .mov file that I want to import into a movie and then slow it
down (slow motion). Any way to do this?

 


Ted

___
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] [JOB] Flash Developers (PV3D) Belfast, Northern Ireland

2009-06-01 Thread Steven Henry
Faktura is a Belfast based multi-discipline studio. We are currently  
seeking freelance Flash developers for contract work.


Several years OOP development experience
Strong command of Actionscript 2 and 3
Papervision3D, Away3D (or similar) experience

Graduates welcome.

Please send CVs and/or examples of work to ste...@kingsteven.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] FLV - FLVPlayback

2009-06-01 Thread Boerner, Brian J

I have a customer that is loading FLVs and FLVPlayback skin at
runtime... which has worked great for them as a no fuss method of
getting video up

At their request I added timecodes, large playbutton, and preview image
(from FLV) to the playback skin. 

The problem:
The playback skin works fine as stand alone but doesn't when using code
that loads it to the FLV at runtime. Since instance names get assigned
at runtime I'm having difficulty connecting FLV and skin with added
functionality.

Any ideas?



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


[Flashcoders] Combobox.visible blows out fonts

2009-06-01 Thread Mendelsohn, Michael
Hi list...

[CS3, AS3 Combobox component]

I am toggling the visible property of a combobox.  This combobox.textField has 
embedFonts set to true, and I can see the text if at first I keep the instance 
visible.  But, if I set the instance to visible=false, and then return it back 
to visible=true, the embedded font doesn't render in the combobox.textField.

Anyone encounter this before?

Thanks,
- Michael M.

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


[Flashcoders] AS 2.0 and JAX-WS

2009-06-01 Thread Rodney Green
When trying to load the wsdl for a web service created with jax-ws, I get an
undefined in the xsd path.  Is Flash able to load this?  I read something
about Flash not being able to load external xsd files.  Is this the case?
What can I do to read the wsdl properly?  I'm using CS3 ans AS 2 - does CS4
have any updated web service (AS 2) capabilities?

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


Re: [Flashcoders] Flash and Video

2009-06-01 Thread Jordan L. Chilcott
Depends on how you want to slow it down. If you want to Flash to play  
an already slowed down movie, you can generate that in either Adobe  
Premiere, Final Cut Pro or iMovie and then either convert it FLV or  
H264.


If you are wanting to slow it down in Flash, you'll have to set up an  
interval to use a BitmapData to take a snapshot of the video and  
display that, as videos in Flash play at full speed, regardless of the  
frame rate. You may want to encode the video at the full 30fps in  
order not to lose too much when playing it back this way.


jord
On Jun 1, 2009, at 9:44 AM, Lehr, Theodore M (N-SGIS) wrote:


I have a .mov file that I want to import into a movie and then slow it
down (slow motion). Any way to do this?



Ted


Jordan L. Chilcott, President
Interactivity Unlimited
Guelph, Ontario
-
Tel:  (519) 837-1879
Fax: (519) 837-8610
mailto:jchilc...@interactivityunlimited.com
http://www.interactivityunlimited.com
iChat/AIM: j1chilcott
Skype: bear-faced-cow
SightSpeed: jchilc...@interactivityunlimited.com

Author: Building Web Sites with Macromedia Studio MX
Author: Building Dynamic Web Sites with Macromedia Studio MX
Author: Flash Professional 8: Training From the Source
Author: Foundation Flash 8 Video


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