[Flashcoders] Duplicate Nested MovieClips in AS3

2008-08-16 Thread Lair Nicolas
Hi all,

i'm trying to duplicate a nested movieClip in AS3, but it does not work :-(

In my main fla, i've a movieClip named view_main that contains another
movieClip named background_mc
I want to duplicate the background_mc movieClip by using the constructor
property like that :

_currentView = this.view_main as MovieClip;
_currentBackground = this._currentView.background_mc as MovieClip;

_currentBackgroundCopy = duplicate(this._currentBackground) as MovieClip;

public function duplicate(target:DisplayObject):DisplayObject
{
var targetClass:Class = Object(target).constructor;
var duplicate:DisplayObject = new targetClass();

if ( target.parent) {
target.parent.addChild(duplicate);
}
return duplicate;
}

The call to duplicateDisplayObject(this._currentBackground, true) return the
correct movieClip but it doesn't appear on the screen - looks like the
addChild does not work ...

Even better, it works if i call duplicate(this.currentView) and the only
difference between _currentView and _currentBackground is that currentView
is present on the stage ...

Thanks in advance :-)

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


Re: [Flashcoders] Duplicate Nested MovieClips in AS3

2008-08-16 Thread jonathan howe
the only difference between _currentView and _currentBackground is that
currentView
is present on the stage

Aren't you testing for exactly that with the conditional  if (
target.parent) {  } ?

Throw a trace statement inside there and see if that block of code is
actually executed.

-jonathan


On Sat, Aug 16, 2008 at 3:14 PM, Lair Nicolas [EMAIL PROTECTED]wrote:

 Hi all,

 i'm trying to duplicate a nested movieClip in AS3, but it does not work :-(

 In my main fla, i've a movieClip named view_main that contains another
 movieClip named background_mc
 I want to duplicate the background_mc movieClip by using the constructor
 property like that :

 _currentView = this.view_main as MovieClip;
 _currentBackground = this._currentView.background_mc as MovieClip;

 _currentBackgroundCopy = duplicate(this._currentBackground) as MovieClip;

 public function duplicate(target:DisplayObject):DisplayObject
 {
var targetClass:Class = Object(target).constructor;
var duplicate:DisplayObject = new targetClass();

if ( target.parent) {
target.parent.addChild(duplicate);
}
return duplicate;
 }

 The call to duplicateDisplayObject(this._currentBackground, true) return
 the
 correct movieClip but it doesn't appear on the screen - looks like the
 addChild does not work ...

 Even better, it works if i call duplicate(this.currentView) and the only
 difference between _currentView and _currentBackground is that currentView
 is present on the stage ...

 Thanks in advance :-)

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




-- 
-jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Binary Data Question

2008-08-16 Thread Juan Pablo Califano
I haven't used amfphp extensively, but it might be a problem in the type
of data amfphp expects... I'm not sure this is a good idea:

ba.toString()

As with a JPG you'll sure get lots of 0's in the ByteArray; parsed as a char
in a string, a 0 value is what's known as an embedded null, which
traditionally is used to signal the end of the string, so probably at some
point the data is being truncated.

Maybe if you just send the ByteArray object, amfphp will figure out the type
of the object and will be able to deserialize it correctly. I think that's
the whole idea behind amfphp, it automatically serializes and deserializes
native objects using the amf format.


Cheers
Juan Pablo Califano


2008/8/16, Omar Fouad [EMAIL PROTECTED]:

 well I've been trying this amfphp and it does not work. amfphp responds
 back
 an error saying amfphp_runtime_error.

 I have this php file in the services dir which hace this function  that I
 call throuh actionscript

 function getData($image)
 {
$data = mysql_query(Insert into table01 (image) values
 ('$image'));
if($data == null) {
   return false;
}eles{
   return true;
   }
 }

 in the mysql database there is a longblob field image and in fd I wrote:

 [Embed(source = 'mail[1].jpg')]
private var _img:Class;
private var img:Bitmap = new _img();

private var gw:NetConnection;
private var res:Responder;
private var TF:TextField = new TextField();

private var ba:ByteArray;
private var encoder:JPGEncoder;
private var bd:BitmapData;

public function Main():void {

TF.autoSize  = TextFieldAutoSize.LEFT;
addChild(TF);

bd = new BitmapData(img.width, img.height);
bd.draw(img);
encoder = new JPGEncoder(90);
ba = encoder.encode(bd);

gw = new NetConnection();
gw.connect(http://localhost/amfphp/amfphp/gateway.php;);
res = new Responder(onResult, onFault);
gw.call(Test.getData, res, ba.toString());
}

private function onResult(responds:Object):void {
TF.text = String(responds);
}

private function onFault(responds:Object):void {
for (var i:* in responds) {
TF.text = String(responds[i]);
}
}

 Is there something I missed in the AS or PHP?

 Thanks



 On Sat, Aug 16, 2008 at 2:16 AM, Omar Fouad [EMAIL PROTECTED]
 wrote:

  Thanks.. I will try this now and feed you back.
 
 
 
  On Sat, Aug 16, 2008 at 1:41 AM, Juan Pablo Califano 
  [EMAIL PROTECTED] wrote:
 
  Yes. Using that particular class I mentioned, from the php side you'd
  receive the data like a regular html form post with multipart-encode,
 that
  means, you can retrieve the text variables you want to send with
  $_POST['someVar'] and the file (or files) with $_FILES['varName'] (or
 the
  name you choose). Treat it like if it were a html form.
 
  To add a text field to the form use the add
 addField(varName,varValue)
  method; to add a file, use addFile(varName, jpgByteArray,
  originalFileName, imageMimeType);
 
  For originalFileName, use whatever you want, like image.jpg, it
  doesn't
  really matter. That's what you'll get with $_FILES['varName']['name'].
 For
  the imageMimeType, use the constant in the class for JPG.
 
 
  Cheers
  Juan Pablo Califano
 
  2008/8/15, Omar Fouad [EMAIL PROTECTED]:
  
   I guess I can send the ByteArray to the php that will handle its
  insertion
   to the database. Right?
  
   On Fri, Aug 15, 2008 at 7:07 PM, Juan Pablo Califano 
   [EMAIL PROTECTED] wrote:
  
With the newest player, I think, it's possible to save data into the
   USER's
hard drive without a trip to the server, but you want to store the
  data
   on
the server side, you need to send it to the server...
   
You have to post that data using a URLLoader object, and specifying
  the
input as binary data.
   
I've wrapped up some code to do that and being able to pass
 variables
  as
well. If you want to check it out:
   
http://pastebin.com/f11a897cf
   
(Sorry, comments are in Spanish, but the indentifiers are in
 English)
   
A example of use (it's a copy  paste from some wortking code, just
 to
   give
you an idea):
   
   
import ar.com.califa010.utils.FormData;
   
  // getEncodedImg() is a method that returns a JPG as a byteArray
   
  var rawJpg:ByteArray = getEncodedImg();
  var formData:FormData = new FormData();
   
  var imageMimeType:String = FormData.JPG_FILE;
  var fileName:String = imageFile.jpg;
   
  formData.addFile(imageFile, rawJpg, fileName, imageMimeType);
   
   
  formData.addField(sFormat,imgFormat);
  formData.addField(idImagen,_idImagen);
   
  var req:URLRequest  = new URLRequest(url);
   
  req.method   = POST;
  req.contentType  = formData.contentType;
  req.data   = 

Re: [Flashcoders] Duplicate Nested MovieClips in AS3

2008-08-16 Thread Lair Nicolas
Hi, thanks for the response,

i already tested it, and it's executed but strangly not displayed on screen
:(

On Sat, Aug 16, 2008 at 7:48 PM, jonathan howe [EMAIL PROTECTED]wrote:

 the only difference between _currentView and _currentBackground is that
 currentView
 is present on the stage

 Aren't you testing for exactly that with the conditional  if (
 target.parent) {  } ?

 Throw a trace statement inside there and see if that block of code is
 actually executed.

 -jonathan


 On Sat, Aug 16, 2008 at 3:14 PM, Lair Nicolas [EMAIL PROTECTED]
 wrote:

  Hi all,
 
  i'm trying to duplicate a nested movieClip in AS3, but it does not work
 :-(
 
  In my main fla, i've a movieClip named view_main that contains another
  movieClip named background_mc
  I want to duplicate the background_mc movieClip by using the constructor
  property like that :
 
  _currentView = this.view_main as MovieClip;
  _currentBackground = this._currentView.background_mc as MovieClip;
 
  _currentBackgroundCopy = duplicate(this._currentBackground) as MovieClip;
 
  public function duplicate(target:DisplayObject):DisplayObject
  {
 var targetClass:Class = Object(target).constructor;
 var duplicate:DisplayObject = new targetClass();
 
 if ( target.parent) {
 target.parent.addChild(duplicate);
 }
 return duplicate;
  }
 
  The call to duplicateDisplayObject(this._currentBackground, true) return
  the
  correct movieClip but it doesn't appear on the screen - looks like the
  addChild does not work ...
 
  Even better, it works if i call duplicate(this.currentView) and the only
  difference between _currentView and _currentBackground is that
 currentView
  is present on the stage ...
 
  Thanks in advance :-)
 
  Niko
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
 ___
 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] Binary Data Question

2008-08-16 Thread Omar Fouad
When I use ba without toString() amfphp says Object of class ByteArray
could not be converted to string.
I think there is something to be done in the php to convert the data back
from string into binary data, but I cannot find it out.

Ideas?

On Sat, Aug 16, 2008 at 9:02 PM, Juan Pablo Califano 
[EMAIL PROTECTED] wrote:

 I haven't used amfphp extensively, but it might be a problem in the type
 of data amfphp expects... I'm not sure this is a good idea:

 ba.toString()

 As with a JPG you'll sure get lots of 0's in the ByteArray; parsed as a
 char
 in a string, a 0 value is what's known as an embedded null, which
 traditionally is used to signal the end of the string, so probably at some
 point the data is being truncated.

 Maybe if you just send the ByteArray object, amfphp will figure out the
 type
 of the object and will be able to deserialize it correctly. I think that's
 the whole idea behind amfphp, it automatically serializes and deserializes
 native objects using the amf format.


 Cheers
 Juan Pablo Califano


 2008/8/16, Omar Fouad [EMAIL PROTECTED]:
 
  well I've been trying this amfphp and it does not work. amfphp responds
  back
  an error saying amfphp_runtime_error.
 
  I have this php file in the services dir which hace this function  that I
  call throuh actionscript
 
  function getData($image)
  {
 $data = mysql_query(Insert into table01 (image) values
  ('$image'));
 if($data == null) {
return false;
 }eles{
return true;
}
  }
 
  in the mysql database there is a longblob field image and in fd I wrote:
 
  [Embed(source = 'mail[1].jpg')]
 private var _img:Class;
 private var img:Bitmap = new _img();
 
 private var gw:NetConnection;
 private var res:Responder;
 private var TF:TextField = new TextField();
 
 private var ba:ByteArray;
 private var encoder:JPGEncoder;
 private var bd:BitmapData;
 
 public function Main():void {
 
 TF.autoSize  = TextFieldAutoSize.LEFT;
 addChild(TF);
 
 bd = new BitmapData(img.width, img.height);
 bd.draw(img);
 encoder = new JPGEncoder(90);
 ba = encoder.encode(bd);
 
 gw = new NetConnection();
 gw.connect(http://localhost/amfphp/amfphp/gateway.php;);
 res = new Responder(onResult, onFault);
 gw.call(Test.getData, res, ba.toString());
 }
 
 private function onResult(responds:Object):void {
 TF.text = String(responds);
 }
 
 private function onFault(responds:Object):void {
 for (var i:* in responds) {
 TF.text = String(responds[i]);
 }
 }
 
  Is there something I missed in the AS or PHP?
 
  Thanks
 
 
 
  On Sat, Aug 16, 2008 at 2:16 AM, Omar Fouad [EMAIL PROTECTED]
  wrote:
 
   Thanks.. I will try this now and feed you back.
  
  
  
   On Sat, Aug 16, 2008 at 1:41 AM, Juan Pablo Califano 
   [EMAIL PROTECTED] wrote:
  
   Yes. Using that particular class I mentioned, from the php side you'd
   receive the data like a regular html form post with multipart-encode,
  that
   means, you can retrieve the text variables you want to send with
   $_POST['someVar'] and the file (or files) with $_FILES['varName'] (or
  the
   name you choose). Treat it like if it were a html form.
  
   To add a text field to the form use the add
  addField(varName,varValue)
   method; to add a file, use addFile(varName, jpgByteArray,
   originalFileName, imageMimeType);
  
   For originalFileName, use whatever you want, like image.jpg, it
   doesn't
   really matter. That's what you'll get with $_FILES['varName']['name'].
  For
   the imageMimeType, use the constant in the class for JPG.
  
  
   Cheers
   Juan Pablo Califano
  
   2008/8/15, Omar Fouad [EMAIL PROTECTED]:
   
I guess I can send the ByteArray to the php that will handle its
   insertion
to the database. Right?
   
On Fri, Aug 15, 2008 at 7:07 PM, Juan Pablo Califano 
[EMAIL PROTECTED] wrote:
   
 With the newest player, I think, it's possible to save data into
 the
USER's
 hard drive without a trip to the server, but you want to store the
   data
on
 the server side, you need to send it to the server...

 You have to post that data using a URLLoader object, and
 specifying
   the
 input as binary data.

 I've wrapped up some code to do that and being able to pass
  variables
   as
 well. If you want to check it out:

 http://pastebin.com/f11a897cf

 (Sorry, comments are in Spanish, but the indentifiers are in
  English)

 A example of use (it's a copy  paste from some wortking code,
 just
  to
give
 you an idea):


 import ar.com.califa010.utils.FormData;

   // getEncodedImg() is a method that returns a JPG as a byteArray

   var rawJpg:ByteArray = 

Re: [Flashcoders] Duplicate Nested MovieClips in AS3

2008-08-16 Thread jonathan howe
So, are you saying that the _currentBackground has a parent but is not on
the stage?
It's obviously possible if _currentBackground is nested inside something
else that is not on the stage, but in the simplest scenario, if it doesn't
have a parent, it's not going to run this block

   if ( target.parent) {
   target.parent.addChild(duplicate);
   }

So what does this output when you run it on _currentBackground:

   if ( target.parent) {
   target.parent.addChild(duplicate);
   trace(duplicate():target.parent:,target.parent);
   }

-jonathan


On Sat, Aug 16, 2008 at 8:27 PM, Lair Nicolas [EMAIL PROTECTED]wrote:

 Hi, thanks for the response,

 i already tested it, and it's executed but strangly not displayed on screen
 :(

 On Sat, Aug 16, 2008 at 7:48 PM, jonathan howe [EMAIL PROTECTED]
 wrote:

  the only difference between _currentView and _currentBackground is that
  currentView
  is present on the stage
 
  Aren't you testing for exactly that with the conditional  if (
  target.parent) {  } ?
 
  Throw a trace statement inside there and see if that block of code is
  actually executed.
 
  -jonathan
 
 
  On Sat, Aug 16, 2008 at 3:14 PM, Lair Nicolas [EMAIL PROTECTED]
  wrote:
 
   Hi all,
  
   i'm trying to duplicate a nested movieClip in AS3, but it does not work
  :-(
  
   In my main fla, i've a movieClip named view_main that contains
 another
   movieClip named background_mc
   I want to duplicate the background_mc movieClip by using the
 constructor
   property like that :
  
   _currentView = this.view_main as MovieClip;
   _currentBackground = this._currentView.background_mc as MovieClip;
  
   _currentBackgroundCopy = duplicate(this._currentBackground) as
 MovieClip;
  
   public function duplicate(target:DisplayObject):DisplayObject
   {
  var targetClass:Class = Object(target).constructor;
  var duplicate:DisplayObject = new targetClass();
  
  if ( target.parent) {
  target.parent.addChild(duplicate);
  }
  return duplicate;
   }
  
   The call to duplicateDisplayObject(this._currentBackground, true)
 return
   the
   correct movieClip but it doesn't appear on the screen - looks like the
   addChild does not work ...
  
   Even better, it works if i call duplicate(this.currentView) and the
 only
   difference between _currentView and _currentBackground is that
  currentView
   is present on the stage ...
  
   Thanks in advance :-)
  
   Niko
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
 
 
 
  --
  -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
  ___
  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 :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Binary Data Question

2008-08-16 Thread Juan Pablo Califano
Maybe you don't have a version of amfphp that supports AS 3.0 objects...

Check this out:

http://www.sephiroth.it/tutorials/flashPHP/amfphp_bytearray/

On the other hand, if using amfphp is not a requirement, you could just use
the class I posted, and handle things from the php side as if it were a
regular html form post.

Cheers
Juan Pablo Califano

2008/8/16, Omar Fouad [EMAIL PROTECTED]:

 When I use ba without toString() amfphp says Object of class ByteArray
 could not be converted to string.
 I think there is something to be done in the php to convert the data back
 from string into binary data, but I cannot find it out.

 Ideas?

 On Sat, Aug 16, 2008 at 9:02 PM, Juan Pablo Califano 
 [EMAIL PROTECTED] wrote:

  I haven't used amfphp extensively, but it might be a problem in the type
  of data amfphp expects... I'm not sure this is a good idea:
 
  ba.toString()
 
  As with a JPG you'll sure get lots of 0's in the ByteArray; parsed as a
  char
  in a string, a 0 value is what's known as an embedded null, which
  traditionally is used to signal the end of the string, so probably at
 some
  point the data is being truncated.
 
  Maybe if you just send the ByteArray object, amfphp will figure out the
  type
  of the object and will be able to deserialize it correctly. I think
 that's
  the whole idea behind amfphp, it automatically serializes and
 deserializes
  native objects using the amf format.
 
 
  Cheers
  Juan Pablo Califano
 
 
  2008/8/16, Omar Fouad [EMAIL PROTECTED]:
  
   well I've been trying this amfphp and it does not work. amfphp responds
   back
   an error saying amfphp_runtime_error.
  
   I have this php file in the services dir which hace this function  that
 I
   call throuh actionscript
  
   function getData($image)
   {
  $data = mysql_query(Insert into table01 (image) values
   ('$image'));
  if($data == null) {
 return false;
  }eles{
 return true;
 }
   }
  
   in the mysql database there is a longblob field image and in fd I
 wrote:
  
   [Embed(source = 'mail[1].jpg')]
  private var _img:Class;
  private var img:Bitmap = new _img();
  
  private var gw:NetConnection;
  private var res:Responder;
  private var TF:TextField = new TextField();
  
  private var ba:ByteArray;
  private var encoder:JPGEncoder;
  private var bd:BitmapData;
  
  public function Main():void {
  
  TF.autoSize  = TextFieldAutoSize.LEFT;
  addChild(TF);
  
  bd = new BitmapData(img.width, img.height);
  bd.draw(img);
  encoder = new JPGEncoder(90);
  ba = encoder.encode(bd);
  
  gw = new NetConnection();
  gw.connect(http://localhost/amfphp/amfphp/gateway.php;);
  res = new Responder(onResult, onFault);
  gw.call(Test.getData, res, ba.toString());
  }
  
  private function onResult(responds:Object):void {
  TF.text = String(responds);
  }
  
  private function onFault(responds:Object):void {
  for (var i:* in responds) {
  TF.text = String(responds[i]);
  }
  }
  
   Is there something I missed in the AS or PHP?
  
   Thanks
  
  
  
   On Sat, Aug 16, 2008 at 2:16 AM, Omar Fouad [EMAIL PROTECTED]
   wrote:
  
Thanks.. I will try this now and feed you back.
   
   
   
On Sat, Aug 16, 2008 at 1:41 AM, Juan Pablo Califano 
[EMAIL PROTECTED] wrote:
   
Yes. Using that particular class I mentioned, from the php side
 you'd
receive the data like a regular html form post with
 multipart-encode,
   that
means, you can retrieve the text variables you want to send with
$_POST['someVar'] and the file (or files) with $_FILES['varName']
 (or
   the
name you choose). Treat it like if it were a html form.
   
To add a text field to the form use the add
   addField(varName,varValue)
method; to add a file, use addFile(varName, jpgByteArray,
originalFileName, imageMimeType);
   
For originalFileName, use whatever you want, like image.jpg, it
doesn't
really matter. That's what you'll get with
 $_FILES['varName']['name'].
   For
the imageMimeType, use the constant in the class for JPG.
   
   
Cheers
Juan Pablo Califano
   
2008/8/15, Omar Fouad [EMAIL PROTECTED]:

 I guess I can send the ByteArray to the php that will handle its
insertion
 to the database. Right?

 On Fri, Aug 15, 2008 at 7:07 PM, Juan Pablo Califano 
 [EMAIL PROTECTED] wrote:

  With the newest player, I think, it's possible to save data into
  the
 USER's
  hard drive without a trip to the server, but you want to store
 the
data
 on
  the server side, you need to send it to the server...
 
  You have to post that data using a URLLoader object, and
  specifying
the
  

Re: [Flashcoders] AS2 Dispatch Custom Event of loaded clip

2008-08-16 Thread Juan Pablo Califano
Assuming that modifying the custom application is not possible, but that you
can change mySWF.swf, you can use an event manager that acts as a proxy
for dispatching events. So, instead of dispatching the event directly from
your object, you use the service of a third party. You register to that
same third party to listen for events.

In order to get it working, you have to make sure that you have just one of
these proxies, so you could use a singleton. Really, that's like using a
global object, but nevertheless a bit more clean than a plain old enter
frame to check whether a propertie is defined, IMHO.

In code, it could be something like this:
(I'm using GDispatcher, and I'd advise you to use it as well as it has more
features than the mx.events.EventDispatcher class, but if you want to go
with the mx class, just change the function declarations accordingly, and
adjust the parameters in addEventListener when registering for some event)

import com.gskinner.events.GDispatcher;

class EventManagerProxy {

 /* event dispatcher API declarations */
 public function
addEventListener(sEvt:String,oHandler:Object,sFnc:String):Void {}
 public function
removeEventListener(sEvt:String,oHandler:Object,sFnc:String):Void {}
 public function dispatchEvent(oEvt:Object):Void {}
 public function removeAllEventListeners(sEvt:String):Void {}


 public static var STUB_LOADED:String = stubLoaded;

private static var _instance:EventManagerProxy = null;

private function EventManagerProxy() {
  GDispatcher.initialize(this);
}

public static function getInstance():EventManagerProxy {
if(!_instance) {
_instance = new EventManagerProxy();
}
return _instance;
}


}

// In your loader fla...


import EventManagerProxy;

var evtMgrProxy:EventManagerProxy = EventManagerProxy.getInstance();

function handleStubLoaded(evt:Object):Void {
 for(var field:String in evt) {
  trace(field +  :  + evt[field]);
 }
}

evtMgrProxy.addEventListener(EventManagerProxy.STUB_LOADED,this,handleStubLoaded);

code.customApplication.load(mySWF.swf, myClip_mc);



// In the loaded stub swf, dispatch the event when needed


import EventManagerProxy;
var evtMgrProxy:EventManagerProxy = EventManagerProxy.getInstance();

evtMgrProxy.dispatchEvent({
  type:   EventManagerProxy.STUB_LOADED,
  target:  this,
  stubId:  someId -- if you happen to need this!
});

Hope it helps.
Cheers
Juan Pablo Califano



2008/8/16, Helmut Granda [EMAIL PROTECTED]:

 I have the following:

 code.customApplication.load(mySWF.swf, myClip_mc);

 now the custom application does not dispatch any events such as onComplete,
 this wasnt built in the original application so what I want to do is
 dispatch an event from mySWF.swf but of course when it is loaded into
 myClip_mc the ability to add the event listeners is not there since they
 are
 not part of myClip_mc but of mySWF.swf.

 Is there anyway to go around it? I know one way to do it is to have an
 onEnterFrame checking for one of the properties of mySWF.swf once is
 loaded

 TIA...
 ___
 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] Full Screen issue on a Mac

2008-08-16 Thread chas warn
Could someone with a Mac check if this is working in fullscreen?

http://venturawave.com/fs/fullscreen.html

This site crashed on my client's  Mac.  The problem was likely that I didn't
include or nest the the embed tags within the object tags in my html page
when I modified for full screen.  Here's my new code in the html (which
hopefully works) ...


object
data=fullscreen.swf type=application/x-shockwave-flash width=640
height=510
param name=movie value=fullscreen.swf /
param name=allowFullScreen value=true /
embed
src=fullscreen.swf
quality=high
bgcolor=#ff
width=640
height=510
name=stage
align=middle
allowScriptAccess=sameDomain
type=application/x-shockwave-flash pluginspage=
http://www.macromedia.com/go/getflashplayer;
/
/


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


Re: [Flashcoders] Full Screen issue on a Mac

2008-08-16 Thread Dave Wood

Could someone with a Mac check if this is working in fullscreen?



Sorry, no. And clicking your go full screen button does nothing. No  
crashes though.


Intel Max OSX 10.5.4, Safari 3.1.2, Flash player version 9.0.124.

Cheers

David






http://venturawave.com/fs/fullscreen.html

This site crashed on my client's  Mac.  The problem was likely that  
I didn't
include or nest the the embed tags within the object tags in my html  
page
when I modified for full screen.  Here's my new code in the html  
(which

hopefully works) ...


object
   data=fullscreen.swf type=application/x-shockwave-flash  
width=640

height=510
   param name=movie value=fullscreen.swf /
   param name=allowFullScreen value=true /
   embed
   src=fullscreen.swf
   quality=high
   bgcolor=#ff
   width=640
   height=510
   name=stage
   align=middle
   allowScriptAccess=sameDomain
type=application/x-shockwave-flash pluginspage=
   http://www.macromedia.com/go/getflashplayer;
   /
/


carlos
___
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] Full Screen issue on a Mac

2008-08-16 Thread Ashim D'Silva
Fine on Firefox, doesn't work on Safari for some reason.
Intel Mac Book Pro.

And you should really look into SWFObject for embedding your flash content
in html. Will help you integrating and make things easier.

2008/8/17 Dave Wood [EMAIL PROTECTED]

 Could someone with a Mac check if this is working in fullscreen?



 Sorry, no. And clicking your go full screen button does nothing. No
 crashes though.

 Intel Max OSX 10.5.4, Safari 3.1.2, Flash player version 9.0.124.

 Cheers

 David





 http://venturawave.com/fs/fullscreen.html

 This site crashed on my client's  Mac.  The problem was likely that I
 didn't
 include or nest the the embed tags within the object tags in my html page
 when I modified for full screen.  Here's my new code in the html (which
 hopefully works) ...


 object
   data=fullscreen.swf type=application/x-shockwave-flash width=640
 height=510
   param name=movie value=fullscreen.swf /
   param name=allowFullScreen value=true /
   embed
   src=fullscreen.swf
   quality=high
   bgcolor=#ff
   width=640
   height=510
   name=stage
   align=middle
   allowScriptAccess=sameDomain
 type=application/x-shockwave-flash pluginspage=
   http://www.macromedia.com/go/getflashplayer;
   /
 /


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




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders