ccby
02-20-2008, 02:57 PM
Hi guys,
Possible or not possible in Action Script??
Background:
- a given folder
- many pictures in the folder (D1.jpg, D2.jpg, etc...screenshots genre)
Goal:
- automate the embedding of the pictures at compile time (for info, the future SWF will latter show synchronised screenshots with an audio recording)
Newbie problem:
- I know how to do it "by hand" (see below)
- I don't see how I can "automate" the embedding of the pictures, ie:
By hand (I search for an AS3 solution for now, UIcomponent gave me problems while trying to find a Flex solution):
~
"""
package
{
import flash.display.Sprite;
public class Main extends Sprite {
private var screenshots:Array = new Array(); // screenshots instances array
[Embed("../assets/screenshots/D1.jpg")] // how do I automate that?
private var Screen1:Class; // how do I automate that?
[Embed("../assets/screenshots/D2.jpg")] // how do I automate that?
private var Screen2:Class; // how do I automate that?
public function Main() {
screenshots.push(new Screen1()); // populate the screenshots array
screenshots.push(new Screen2());
addChild(screenshots[0]); // show the screenshots
addChild(screenshots[1]);
}
}
}
"""
If we know that in the given folder there is let say 30 screenshots, how do I automate the embedding of these pictures in the script above ? (or a Flex alternative?)
Or is it just impossible in Action Script 3 :(
Sounds like nobody was able to reply to this guy who had a similar question:
http://www.actionscript.org/forums/showpost.php3?p=637912&postcount=1
Hope it's possible in AS3 or Flex, I'm new to AS/Flex and I already had nightmare with the insane sandbox (I need to setup a proxy just to access a public XML feed...)
Please save me form Silverlight 2 Beta coming out very soon ....:eek:
Thanks
Possible or not possible in Action Script??
Background:
- a given folder
- many pictures in the folder (D1.jpg, D2.jpg, etc...screenshots genre)
Goal:
- automate the embedding of the pictures at compile time (for info, the future SWF will latter show synchronised screenshots with an audio recording)
Newbie problem:
- I know how to do it "by hand" (see below)
- I don't see how I can "automate" the embedding of the pictures, ie:
By hand (I search for an AS3 solution for now, UIcomponent gave me problems while trying to find a Flex solution):
~
"""
package
{
import flash.display.Sprite;
public class Main extends Sprite {
private var screenshots:Array = new Array(); // screenshots instances array
[Embed("../assets/screenshots/D1.jpg")] // how do I automate that?
private var Screen1:Class; // how do I automate that?
[Embed("../assets/screenshots/D2.jpg")] // how do I automate that?
private var Screen2:Class; // how do I automate that?
public function Main() {
screenshots.push(new Screen1()); // populate the screenshots array
screenshots.push(new Screen2());
addChild(screenshots[0]); // show the screenshots
addChild(screenshots[1]);
}
}
}
"""
If we know that in the given folder there is let say 30 screenshots, how do I automate the embedding of these pictures in the script above ? (or a Flex alternative?)
Or is it just impossible in Action Script 3 :(
Sounds like nobody was able to reply to this guy who had a similar question:
http://www.actionscript.org/forums/showpost.php3?p=637912&postcount=1
Hope it's possible in AS3 or Flex, I'm new to AS/Flex and I already had nightmare with the insane sandbox (I need to setup a proxy just to access a public XML feed...)
Please save me form Silverlight 2 Beta coming out very soon ....:eek:
Thanks