[Flashcoders] Embedded assets

2006-09-04 Thread Samúel Jónasson

Hi,

I am trying to use the Flex Builder 2 to create Action Script projects
(not Flex) so maybe this list is not the one to post this question to.
However...

I was hoping someone could tell me if there are some limitations with
embedded assets created in Flash 9 IDE. In my case stop(); is not
working on assets timelines. It is simply ignored.

Regards,
Sammi
___
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] Best way to pause/play video

2006-08-29 Thread Samúel Jónasson

ns.pause();

to pause...and then...

ns.pause();

to play again.  It works like a toggle. At least in AS3.

Sammi

Mendelsohn, Michael wrote:

Hi list...

How exactly do you pause and play a video?  I'm trying to create a
play/pause toggle button that isn't quite working.  When pausing a
video, should you close the netstream?  And if so, how is the best way
to reopen it to resume play?

Thanks,
- Michael M.


case (playPause) :
// play or pause the video
if (this[_label]._currentframe == 2) {
trace(pause);
_root.userInterface.ns.close();

clearInterval(_root.userInterface._data.intervalIDs.player);
this[_label].gotoAndStop(1);
} else {
trace(play);
trace(_root.userInterface.ns.time);
_root.userInterface.ns.seek(33);
this[_label].gotoAndStop(2);
}

___
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] Fastest way to disable mouse events

2006-08-24 Thread Samúel Jónasson

Hi,

I have a clip with a hierarchy of nested clips inside.  Some of the 
clips have mouse events and I would like to disable them all at once 
(not disable each one manually)


I thought I could somehow just tell the containing clip to ignore all 
events - something like container.mouseEnabled = false but no luck.


What is the recommended way of doing this?

Sammi
___
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] Fastest way to disable mouse events

2006-08-24 Thread Samúel Jónasson

Found it.

container.mouseChildren = false;

Isn't this just the best ActionScript ever :)



Samúel Jónasson wrote:

Hi,

I have a clip with a hierarchy of nested clips inside.  Some of the 
clips have mouse events and I would like to disable them all at once 
(not disable each one manually)


I thought I could somehow just tell the containing clip to ignore all 
events - something like container.mouseEnabled = false but no luck.


What is the recommended way of doing this?

Sammi
___
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] Scrubber for streamed flv

2006-08-24 Thread Samúel Jónasson

Hi,

anyone done a scrubber in as3 for a streamed flv from FMS2?

I am not having any problems with repositioning the playhead.  My 
problem is that while scrubbing I want to display a still frame from the 
video where the scrubber is (as it is dragged).


Wish I could find more samples for as3/fms2 :(

Sammi
___
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] Using assets from external SWF

2006-08-21 Thread Samúel Jónasson

Hi everyone,

I am trying to find out how to use external SWF as a library of assets 
that I can instantiate in my as3 projects. I have gone through several 
articles that almost explain this.  One in particular is Loading Flex 
Skins at Runtime at http://blogs.adobe.com/kiwi/2006/07/


Basically I want to have my assets (skins, icons etc) in this external 
swf (assets.swf ) that I create in Flash 9.  Then load that file with 
the Loader class at runtime in an as3 project and instantiate the 
classes of the assets to add them to the stage, once or more.


Does anyone have a working sample of this?


___
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] Using assets from external SWF

2006-08-21 Thread Samúel Jónasson

His.

thank you for your response.

I had read this article as well but didn't find the solution to my 
problem.  It is really important for me not to have to compile my app 
when the skin changes - so they need to load at runtime.  So if I have 
two files:


- assets.swf
- app.swf

...the symbols in assets.swf have a auto generated classes.  So a 
Star symbol would have a Star class generated on export.
Then app.swf loads the assets.swf at runtime of with some magic ( as 
explained in some of the articles ) has access to the classes in 
assets.swf and can instantiate them.


So if i need a star:

var myStar:Star = new Star();
addChild(myStar);

...and I get the symbol created in assets.swf.


Matthew Ganz wrote:

hi.

i don't have the answer to your question but i did see this post on 
keith peters' blog this morning that may help you out:


http://www.bit-101.com/blog/?p=853
- Original Message - From: Samúel Jónasson 
[EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Monday, August 21, 2006 10:31 AM
Subject: [Flashcoders] Using assets from external SWF



Hi everyone,

I am trying to find out how to use external SWF as a library of 
assets that I can instantiate in my as3 projects. I have gone through 
several articles that almost explain this.  One in particular is 
Loading Flex Skins at Runtime at http://blogs.adobe.com/kiwi/2006/07/


Basically I want to have my assets (skins, icons etc) in this 
external swf (assets.swf ) that I create in Flash 9.  Then load that 
file with the Loader class at runtime in an as3 project and 
instantiate the classes of the assets to add them to the stage, 
once or more.


Does anyone have a working sample of this?


___
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


Re: [Flashcoders] Using assets from external SWF

2006-08-21 Thread Samúel Jónasson

Solved it.

Actually I was complicating things when trying to use the samples in 
other articles.  Do this if you are interested in checking:


- Create a skin.swf
- Create one symbol and export it as Button_up
- Publish to build the swf.
- Use the following to include the skin at runtime.

package {
  
   import flash.display.*;

   import flash.errors.*;
   import flash.events.*;
   import flash.system.*;
   import flash.net.*;


   public class SkinTest extends Sprite{
  
   private var theSkin:Loader;
  
   public function SkinTest(){   
   loadSkin();   
   }   
  
   private function loadSkin():void{
  
   theSkin = new Loader();
   theSkin.contentLoaderInfo.addEventListener(Event.COMPLETE, 
skinLoadedHandler);

   theSkin.load(new URLRequest(skin.swf));

   }   
  
   private function skinLoadedHandler(event:Event):void{


   // try to use symbol from skin.swf
   var asset:Sprite = getSkinAsset(Button_up);
   addChild(asset);
  
   }   
  
   private function getSkinAsset(skinAsset:String){
  
   var assetClass:Class = 
theSkin.contentLoaderInfo.applicationDomain.getDefinition(skinAsset) as 
Class;

   var asset:Object = new assetClass();
  
   return asset;
  
   }
  
   }
  
}



I hope this helps someone.

Sammi


Samúel Jónasson wrote:

His.

thank you for your response.

I had read this article as well but didn't find the solution to my 
problem.  It is really important for me not to have to compile my app 
when the skin changes - so they need to load at runtime.  So if I have 
two files:


- assets.swf
- app.swf

...the symbols in assets.swf have a auto generated classes.  So a 
Star symbol would have a Star class generated on export.
Then app.swf loads the assets.swf at runtime of with some magic ( as 
explained in some of the articles ) has access to the classes in 
assets.swf and can instantiate them.


So if i need a star:

var myStar:Star = new Star();
addChild(myStar);

...and I get the symbol created in assets.swf.


Matthew Ganz wrote:

hi.

i don't have the answer to your question but i did see this post on 
keith peters' blog this morning that may help you out:


http://www.bit-101.com/blog/?p=853
- Original Message - From: Samúel Jónasson 
[EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Monday, August 21, 2006 10:31 AM
Subject: [Flashcoders] Using assets from external SWF



Hi everyone,

I am trying to find out how to use external SWF as a library of 
assets that I can instantiate in my as3 projects. I have gone 
through several articles that almost explain this.  One in 
particular is Loading Flex Skins at Runtime at 
http://blogs.adobe.com/kiwi/2006/07/


Basically I want to have my assets (skins, icons etc) in this 
external swf (assets.swf ) that I create in Flash 9.  Then load that 
file with the Loader class at runtime in an as3 project and 
instantiate the classes of the assets to add them to the stage, 
once or more.


Does anyone have a working sample of this?


___
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@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] Using assets from external SWF

2006-08-21 Thread Samúel Jónasson

Yes this is easy in Flex 2.

And it's not just the assets that you can use.  You can use anything in 
the loaded swf as if it was in the main movie.


Sammi


Marcelo de Moraes Serpa wrote:
Hmmm... it seems that AVM2 has solved the classic problem we had with 
Flash
that forced us to use RSL to do this kind of thing? I mean, we 
couldn´t just
load a swf and use it´s assets on the parent context and vice-versa... 
is it

possible with flex 2?

Marcelo.

On 8/21/06, Samúel Jónasson [EMAIL PROTECTED] wrote:


Solved it.

Actually I was complicating things when trying to use the samples in
other articles.  Do this if you are interested in checking:

- Create a skin.swf
- Create one symbol and export it as Button_up
- Publish to build the swf.
- Use the following to include the skin at runtime.

package {

import flash.display.*;
import flash.errors.*;
import flash.events.*;
import flash.system.*;
import flash.net.*;


public class SkinTest extends Sprite{

private var theSkin:Loader;

public function SkinTest(){
loadSkin();
}

private function loadSkin():void{

theSkin = new Loader();
theSkin.contentLoaderInfo.addEventListener(Event.COMPLETE,
skinLoadedHandler);
theSkin.load(new URLRequest(skin.swf));

}

private function skinLoadedHandler(event:Event):void{

// try to use symbol from skin.swf
var asset:Sprite = getSkinAsset(Button_up);
addChild(asset);

}

private function getSkinAsset(skinAsset:String){

var assetClass:Class =
theSkin.contentLoaderInfo.applicationDomain.getDefinition(skinAsset) as
Class;
var asset:Object = new assetClass();

return asset;

}

}

}


I hope this helps someone.

Sammi


Samúel Jónasson wrote:
 His.

 thank you for your response.

 I had read this article as well but didn't find the solution to my
 problem.  It is really important for me not to have to compile my app
 when the skin changes - so they need to load at runtime.  So if I have
 two files:

 - assets.swf
 - app.swf

 ...the symbols in assets.swf have a auto generated classes.  So a
 Star symbol would have a Star class generated on export.
 Then app.swf loads the assets.swf at runtime of with some magic ( as
 explained in some of the articles ) has access to the classes in
 assets.swf and can instantiate them.

 So if i need a star:

 var myStar:Star = new Star();
 addChild(myStar);

 ...and I get the symbol created in assets.swf.


 Matthew Ganz wrote:
 hi.

 i don't have the answer to your question but i did see this post on
 keith peters' blog this morning that may help you out:

 http://www.bit-101.com/blog/?p=853
 - Original Message - From: Samúel Jónasson
 [EMAIL PROTECTED]
 To: flashcoders@chattyfig.figleaf.com
 Sent: Monday, August 21, 2006 10:31 AM
 Subject: [Flashcoders] Using assets from external SWF


 Hi everyone,

 I am trying to find out how to use external SWF as a library of
 assets that I can instantiate in my as3 projects. I have gone
 through several articles that almost explain this.  One in
 particular is Loading Flex Skins at Runtime at
 http://blogs.adobe.com/kiwi/2006/07/

 Basically I want to have my assets (skins, icons etc) in this
 external swf (assets.swf ) that I create in Flash 9.  Then load that
 file with the Loader class at runtime in an as3 project and
 instantiate the classes of the assets to add them to the stage,
 once or more.

 Does anyone have a working sample of this?


 ___
 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@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