Attach mc's from parent SWF to loaded SWF
I've got a movie (parent) that loads several other SWFs
(children). I need for the parent SWF to attach movie's to the
child SWFs from it's library - but i can't get it to work.
Is there a way to do this?
If the children are loaded into empty clips, they can be
addressed via the instance name of the empty MC, and you can use
holderMC.attachMovie("linkageID","newName",depth);
to attach the symbol with "linkageID" to the MC loaded into
the instance "holderMC".
hth,
blemmo
Similar Messages
-
Open swf in new window from parent swf
I'm making a gallery for some flash banners that I had
created in AS3. When I click on a "launch" button, I wanted the
flash banner swf to open in a new window separate from the parent
swf (the gallery). I also wanted the parent swf to remain open.
Is this possible and what would the code look like for
something like this?ok, I should've also mentioned this, the flash gallery I'm
making is not for the web, it's more for just opening in a flash
player. So I don't really want it to open in a new browser window,
but rather a new swf window, if there is such a thing. -
AS3 pass variables-values from loaded external swf to parent swf
Hi,
I am working on an eLearning project that uses a main SWF (SWF1) and a second SWF (SWF2) with 2 quizzes in it. Published to AIR for Desktop and Android, SWF1 and SWF2 are packaged together in the AIR desktop or AIR APK exports.
I can use a loader in SWF1 to call and run SWF2. What I am having difficulty with, need some help, is how to get the 2 scores from the 2 quizzes in SWF2 and load these values (each is a Number) back into SWF1. Once back in SWF1, they will be written to String and then displayed in a text box using textbox.text.
While I've searched online and found examples for sending variables from parent to child SWF's, so far not able to find an understandable/useable AS3 script example for getting variables from child to parent SWF.
Any help appreciated.
Best Wishes,Hi,
Still stuck. Can't get SWF2 to go back to SWF1 frame 2.
SWF1, based on Kiran's AS file with the class AppEvent (class is not called in SWF1 until frame 2, and is called in SWF2 frame 9) loads SWF2 using:
//SWF1, frame 2
stop();
import flash.display.Loader;
expB100.addEventListener(MouseEvent.CLICK, L1, false, 0, true);
function L1(e:MouseEvent):void {
loaderL1.load(new URLRequest("Hotspot13.swf"));
loaderL1.contentLoaderInfo.addEventListener(Event.COMPLETE, onChildLoaded);
addChild(loaderL1);
expB100.visible = false;
function onChildLoaded(evt:Event)
var child:DisplayObject = evt.target.content as DisplayObject;
child.addEventListener(AppEvent.CHILD_DATA, getChildData);
addChild(child);
function getChildData(evt:AppEvent):void
trace(evt.data.var1,evt.data.var2);
tTest.text = String(evt.data.var1);
tTest2.text = String(evt.data.var2);
I wonder if there is some confusion between MovieClip and DisplayObject when SWF2 tries to return to SWF1 frame 2, using MovieClip(parent.parent).gotoAndStop(2); and gets an error?:
Error #1034: Type Coercion failed: cannot convert flash.display::Stage@2f1ef71 to flash.display.MovieClip.
at Hotspot13_fla::MainTimeline/onClick()[Hotspot13_fla.MainTimeline::frame9:124]
Hotspot13 is SWF2; SWF2 frame 9 uses the following to try to return to SWF1 frame 2, causing the above error:
function onClick(event:MouseEvent):void
trace(this,this.parent,this.parent.parent);
dispatchEvent(new AppEvent(AppEvent.CHILD_DATA,{var1:score1,var2:rbselectedT},true));
MovieClip(parent.parent).gotoAndStop(2);
Or maybe the AppEvent.as file is imported in frame 1 when it should be imported in another later frame like SWF1 frame 2 where it is first used?
Best Wishes, -
FAQ: How do I load an external SWF file into a parent SWF file?
A ton of Flash users visit Adobe’s we site every month wondering about how to load an external SWF file from within another SWF.
Adobe's own TechNote on the subject attempts to answer the basic question, along with some common follow-up questions, including:
How do I load more than one SWF?
How do I load a SWF into a specific location in the display list?
How do I resize the loaded SWF?
How do I set its X and Y location?
Here are some additional resources that elaborate on loading content and on working with the display list:
Sample files for the above TechNote. A set of 3 FLA and 3 corresponding SWF files, including a parent SWF and 2 SWFs that the parent loads.
Help > AS3 Developer’s Guide > Loading an external SWF file
Help > AS3 Developer’s Guide > Loading display content dynamically
Loading multiple external SWFs within a main SWF – CreativeCow.net forums
Video tutorial: ActionScript 101 – Episode 6: Adding named objects to the Stage. By Doug Winnie. An example of how to add the loaded external asset to the Stage and modify its location or other properties.
Video tutorial: Preloading in ActionScript 3.0. By Lee Brimelow. A slightly more complicated example, showing how to make the parent SWF display information about the progress of loading the external SWF.
Tutorial: Loading and unloading SWFs - FlashAndMath.com
This article provides several examples of how to communicate between a parent SWF file and the loaded SWF:
SWF to SWF Communcation via ActionScript 3.0 (by kglad)quote:
Originally posted by:
NedWebs
You now seem to want to get rid of the swf once it has loaded
and played itself thru. To do that you would need to have something
in the swf itself that triggers its removal in its last frame. The
following might work...
MovieClip(this.parent).removeChild(this);
Unfortunately I couldn't get this to work. I placed it on the
last frame of the SWF to be called - is that right?
I am not sure I am doing it correctly... -
Any way to disable quiz click boxes from a parent SWF?
We've got a parent SWF that serves as a navigational shell, allowing users to move between different Captivate slides which are essentially embedded SWFs. Some of these SWFs are Captivate hot spot quizzes. We've run into a fairly significant issue - when a Captivate slide has a click box, it sets up an event listener for that box. Unfortunately, when a user moves off of that SWF, the event listener is still in place (note: we're not actually unloading the SWF, we're simply hiding it and showing the next SWF). Once a user clicks into the new SWF, the following exception gets thrown:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at captivate.veela_as3::rdClickHandler/CheckSpriteClick()
at captivate.veela_as3::rdClickHandler/CheckAllClicksDown()
at captivate.veela_as3::rdClickHandler/onMousePress()
We've narrowed this down to the click boxes and the event listeners associated with them. I need to know if there's some way that our parent SWF can call into the Captivate quiz SWF in order to disable those click boxes once the user moves off of the SWF. I know that we can disable them from within the quiz itself using an advanced action, but I'm just not sure if the same can be done from an external SWF (ideally, we would just call an advanced action from the parent SWF - I have no idea if this is possible).
Any help would be much appreciated.
- TerenceFirst question, why are you simply hiding and not unloading them?
If you can hide, I am assuming through a visible false or alpha = 0; then it seems like you would have the ability to relocate them as well, and since the loaded swf is housing its own buttons and hit areas they would move with their parent...
So a cheap fix if you can access the objects would be to move them out of view, like to
.x = -5000
.y = -5000
That might work...and might be the easiest way to "Re-add them to the stage without losing info, I am assuming the hide and not unload is for keeping score or something?
You could then move them back to 0,0 if you needed them again...
might help you -
RemoveChild in parent.swf from child.swf (AS3)
Hi! How do I remove a child from a parent timeline with an externally-loaded swf? Specifically, I have a main.swf that loads movie_1.swf and movie_2.swf. In the movie_1.swf, I have a button to remove movie_2.swf from main.swf.
//--------- main.swf code:
var loader1:Loader = new Loader();
var loader2:Loader = new Loader();
loader1.load(new URLRequest("movie_1.swf"));
loader2.load(new URLRequest("movie_2.swf"));
addChild(loader1);
addChild(loader2);
//------------- movie_1.swf code:
removeMovie2_btn.addEventListener(MouseEvent.CLICK , removeMovie2);
function removeMovie2(event:MouseEvent):void
this.parent.parent.removeChild(this.loader2); // this does not work (get error code 2007, "Parameter child must be non-null")
// Thank you!Here's how your code will change:
//--------- main.swf code:
var loader1:Loader = new Loader();
var loader2:Loader = new Loader();
loader1.contentLoaderInfo.addEventListener(Event.COMPLETE, assignMovie1Listener);
loader1.load(new URLRequest("movie_1.swf"));
loader2.load(new URLRequest("movie_2.swf"));
addChild(loader1);
addChild(loader2);
function assignMovie1Listener(evt:Event):void {
MovieClip(evt.currentTarget.content).addEventListener("eventTriggered", removeLoader2);
function removeLoader2(evt:Event):void {
loader2.unloadAndStop();
removeChild(loader2);
//------------- movie_1.swf code:
removeMovie2_btn.addEventListener(MouseEvent.CLICK , removeMovie2);
function removeMovie2(event:MouseEvent):void
dispatchEvent(new Event("eventTriggered")); -
Loading library assets from external .swf
Ok, so here's what I want to do. I'm creating an application
that has optional classes that it can instantiate based on what the
needs are. These classes operate things like Session Logging
utilities, etc. These items obviously have assets that they need
available such as movieclips and buttons. For example, the Session
Logger has a sessionLog_mc clip that has a log window with buttons
and the log display. I want to be able to have my class load the
external .swf that contains the assets for the Session Logger and
then use attachMovie(), once the .swf is loaded, to attach the
sessionLog_mc from the library of the loaded external .swf file.
This does NOT seem to work at all. This seems like it has to be
possible. I don't want to be forced to put all my code into
external .swf's too. I just want some external asset .swf's (or
maybe just one large one) that I can load. Is this possible? I am
wanting to have the ability to show the progress of loading each of
these components while the application is starting up and loading
the asset files. Thanks so much!
Here is an example of what I'm trying: (the attachMovie does
NOT work at all)I see now how to import and display a library class object
using:
var MovieClipClass:Class =
Class(loader.contentLoaderInfo.applicationDomain.getDefinition("myLibraryAsset"))
var movieClip:Sprite = new MovieClipClass();
addChild(movieClip)
But this seems to only work for SWF's published for AS3 Flash
Player 9.
I need to do the same for SWF's published with AS2 Flash
Player 7.
Any ideas? -
Loading an external swf into my parent swf?
Does anyone know how I can load an external .swf file into my
parent file? I have tried to use loader actionscript but think I am
using the incorrect script or putting it in the wrong place? If
anyone can tell me the script and where to/how to use it that would
be amazing? Thanksthanks GWD!
I am using the unloadMovieNum(); command, i have loaded the
child into level 5 of my parent swf. the parent has multiple scenes
this one with a layer with a stop(); action and another layer with
the loadMovieNum("portfolioone.swf", 5); script. it loads the child
perfectly. The child has a number of pictures in it and a back
button at the end. I have been adding the
on (release) {
unloadMovieNum(5);
script to the button which unloads the child but stops
because of the stop action in the first frame of the particular
scene within the parent. I want to be able to add a script to this
button which will take me back to a labeled frame in a particular
scene of the parent, I tried the this.removeMovieClip(); but
doesn't seem to be working for me, Thanks for the reply, hope you
can help me further?? -
Loading library movie symbol from external swf
Hi, I have a Flex/Air Application and I want this application
to load in an external SWF and display a particular asset from the
SWF library (just like attachMovie in AS2). I dont want to embed
the SWF into the Air application. For the life of me I can't find
any tangible info on how to do this. My second problem is that the
assets sit in an SWF published for AS2 (is that an issue?). All
content resides locally.
Can anyone help or point me in the right direction?I see now how to import and display a library class object
using:
var MovieClipClass:Class =
Class(loader.contentLoaderInfo.applicationDomain.getDefinition("myLibraryAsset"))
var movieClip:Sprite = new MovieClipClass();
addChild(movieClip)
But this seems to only work for SWF's published for AS3 Flash
Player 9.
I need to do the same for SWF's published with AS2 Flash
Player 7.
Any ideas? -
Loading font from external *.swf
So!
I have 3 movies.
1)Main movie - index.swf
2)Movie with created & checked in linkadge "Export for
runtime sharing" fonts in library - fonts.swf
3)movie with text fields which need embeded fonts to work in
a proper way. Fonts in the library checked in linkage as "import
for runtime sharing" - content.swf
What happens:
I strike CTRL+ENTER and run movie index.swf.
on the (for ex.) 10 frame it loads fonts.swf with
movieClipLoader class..
then in the same way on (for ex.) 100 frame, i load content
swf
BUT!!! before it starts loading process IT DOWNLOADS FONT.swf
again
SO HOW DO I PRELOAD fonts from external *.swf..
maybe there is yhe way without using runtime sharing..
but i've heard that loaded whith movieClipLoader movies don't
adds objects from their library to main movie liblary...
HOW DO I SOLVE THIS PROBLEM!can you give your erroe source code,and then i will give you the success code.
in the function
private function onLoadComplete(e:Event):void {}
ApplicationDomain.currentDomain.getDefinition("com.scottgmorgan.ExternalMovie") ;
use like this:
var EMClass:Class=loader.contentLoaderInfo.applicationDomain.getDefinition("com.scottgmorgan.ExternalMovie") ;
then you can new a instance :
var emInstance:Object=new EMClass();
emInstance.alert("hello word");
and we also can use other method. so email me [email protected] -
Using Actionscript 3, how do I code a button in a parent file to load another swf file at a specific frame?
You can either place the loading code in the desired frame of the parent file, or continuously monitor the currentFrame proiperty of the parent file and do the loading when the value matches the desired frame number.
-
Imported swfs getting data from main swf
Hi everybody,
I'm struggling shaking my old school AS2 mindset here. I've got a main swf which loads a bunch of subordinate swfs. I need my loaded swfs to see some variables in the main. For instance (example simplified for conversational purposes), let's say I've got a swf loading (we'll say littleSwf), which needs to set its rotation based on a variable (we'll say swfRotation) in the main. The rotation code is inside of the little swf. How does that little swf get told / find out what its rotation number is?
How would I do that? I've tried everything I can think of and done some digging, but apparently not in the right places.
Any input appreciated.
Dan P.If you are loading the swf into another, chances are you are using a Loader. So the Loader becomes the parent of the loaded swf. And the main swf is the parent of the Loader. So using the more common AS2 mindset, you would want to get any variable in the main swf by targetng the parent.parent... which in AS3 can be done using... MovieClip(parent.parent).
A more OOP correct way of getting the rotation value to the child is to assign it to it from the main swf after it has completed loading the child. To do this you assign a listener to the Loader to determine when the file has been loaded, and then you have the main file target the child thru Loader.content property. You could then have some function in the child that the main calls and passes the rotation value to as an argument, or just have the main file perform the operation on the child using the rotation value if that is suitable. -
Having problem controling resizing of a swf from another swf
I'm trying to build a site where all the pages are full browser and maintain aspect ratio. I would like to control the resizing from the menu page. The resizing works fine from the page that's being resized but when I try to let the parent swf do that it has issues.
Here's what the home page looks like with the controls built in http://www.mespinach/example1/
This example is the site it has a menu page that I open the others from I remove the resizing code from the home page and try to resize from menu.swf.
here's the code from menu.swf
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
var holder:btnHolder = new btnHolder();
addChild(holder);
stage.addEventListener(Event.RESIZE, moveHolder);
moveHolder();
function moveHolder(e:Event = null):void {
holder.x = stage.stageWidth - (holder.width +25);
holder.y = 50;
holder.mcHome.buttonMode = true;
holder.mcAbout.buttonMode = true;
holder.mcMovies.buttonMode = true;
//holder.mcLocation.buttonMode = true;
holder.mcStore.buttonMode = true;
//var objFileToLoad:URLRequest = new URLRequest();
var swfLoader:Loader;
addListeners();
function addListeners():void {
holder.mcHome.addEventListener(MouseEvent.CLICK, homePage);
holder.mcAbout.addEventListener(MouseEvent.CLICK, aboutPage);
holder.mcMovies.addEventListener(MouseEvent.CLICK, moviesPage);
// holder.mcLocation.addEventListener(MouseEvent.CLICK, locationPage);
holder.mcStore.addEventListener(MouseEvent.CLICK, storePage);
var currentPage:*;
var xImage:Sprite = new Sprite();
homePage();
function homePage(event:MouseEvent = null):void {
SoundMixer.stopAll();
addListeners();
if(swfLoader){this.removeChildAt(0);}
holder.mcHome.removeEventListener(MouseEvent.CLICK, homePage);
var loadRequest:URLRequest = new URLRequest("home.swf");
swfLoader = new Loader();
swfLoader.contentLoaderInfo.addEventListener(Event.INIT, positionContent);
swfLoader.load(loadRequest);
this.addChildAt(swfLoader, 0);
function positionContent(e:Event):void {
currentPage = swfLoader.content;
var loadedImage = currentPage.onStage;
xImage = loadedImage;
// loadedImage.x= 0;
// loadedImage.y= 0;
fillBG();
function aboutPage(event:MouseEvent):void {
SoundMixer.stopAll();
var objFileToLoad:URLRequest = new URLRequest("about.swf");
loader.contentLoaderInfo.addEventListener(Event.INIT,positionContent);
loader.load(objFileToLoad);
this.addChildAt(loader, 0);
function positionContent(e:Event):void{
loader.x= 0;
loader.y= 0;
function moviesPage(event:MouseEvent):void {
addListeners();
holder.mcMovies.removeEventListener(MouseEvent.CLICK, moviesPage);
SoundMixer.stopAll();
if(swfLoader){this.removeChildAt(0);}
var objFileToLoad:URLRequest = new URLRequest("Movies.swf");
swfLoader.contentLoaderInfo.addEventListener(Event.INIT,loadedHandler);
swfLoader.load(objFileToLoad);
this.addChildAt(swfLoader, 0);
function loadedHandler(e:Event):void {
currentPage = swfLoader.content;
xImage = currentPage;
function locationPage(event:MouseEvent):void {
SoundMixer.stopAll();
var objFileToLoad:URLRequest = new URLRequest("location.swf");
loader.load(objFileToLoad);
this.addChildAt(loader, 0);
function storePage(event:MouseEvent):void {
SoundMixer.stopAll();
var objFileToLoad:URLRequest = new URLRequest("store.swf");
loader.load(objFileToLoad);
this.addChildAt(loader, 0);
holder.addEventListener(MouseEvent.MOUSE_OVER, over);
holder.addEventListener(MouseEvent.MOUSE_OUT, out);
holder.addEventListener(MouseEvent.MOUSE_DOWN, down);
holder.addEventListener(MouseEvent.MOUSE_UP, up);
holder.mcAbout.buttonMode = true;
holder.mcHome.buttonMode = true;
holder.mcMovies.buttonMode = true;
holder.mcStore.buttonMode = true;
//holder.mcLocation.buttonMode = true;
var myColor:ColorTransform = transform.colorTransform;
function over(e:MouseEvent):void {
myColor.alphaMultiplier = 3;
e.target.transform.colorTransform = myColor;
function out(e:MouseEvent):void {
myColor.alphaMultiplier = 1;
e.target.transform.colorTransform = myColor;
function down(e:MouseEvent):void {
myColor.alphaMultiplier = 5;
e.target.transform.colorTransform = myColor;
function up(e:MouseEvent):void {
myColor.alphaMultiplier = 1;
e.target.transform.colorTransform = myColor;
//var cpc = this.child.child.getChildByName("onStage");
//trace(cpc);
var ratio:Number;
var rRatio:Number;
ratio = xImage.height/xImage.width;
rRatio = xImage.width/xImage.height;
var newRatio:Number;
function fillBG(evt:Event = null):void {
trace("width: " + xImage.width);
trace("height: " + xImage.height);
trace("ratio: " + ratio.toString());
trace("rRatio: " + rRatio.toString());
trace("newRatio: " + newRatio.toString());
newRatio = stage.stageHeight/stage.stageWidth;
holder.x = stage.stageWidth - (holder.width +25);
holder.y = 50;
if (newRatio > ratio) {
trace("newRatio > ratio: ");
xImage.height = stage.stageHeight;
xImage.width = stage.stageHeight * rRatio;
} else {
trace("else");
xImage.width = stage.stageWidth;
xImage.height = stage.stageWidth * ratio;
stage.addEventListener(Event.RESIZE, fillBG);
messages from trace statements here:
width: 939
height: 704
ratio: NaN
rRatio: NaN
newRatio: NaN
else
width: 561
height: 704
ratio: NaN
rRatio: NaN
newRatio: 0.49376114081996436
else
The height never changes
retio and rRatio are NaN even though they are the Quotient of numbers.First, it is too much code to go through so I don't think I will give a complete answer. I assume this is a timeline code.
Here is what I was able to notice:
1. You declare the variables outside the scopes of the functions:
var ratio:Number;
var rRatio:Number;
ratio = xImage.height/xImage.width;
rRatio = xImage.width/xImage.height;
var newRatio:Number;
Naturally, they are NaN because neither xImage.height nor xImage.width are available at this point.
I suspect that you anticipate that when code hits these lines - swf is already loaded but IT IS NOT. Flash executes ALL THE CODE to the end NOT WAITING for swf to load - this is one of the premises of asynchronous event model.
To remedy this you need to place value assignments into the event handler:
Version One:
Declare variable at the top of the code before you start loading:
var ratio:Number;
var rRatio:Number;
var newRatio:Number;
Calculate values in event handler:
function positionContent(e:Event):void {
ccurrentPage = swfLoader.content;
var loadedImage = currentPage.onStage;
xImage = loadedImage;
ratio = xImage.height/xImage.width;
rRatio = xImage.width/xImage.height;
fillBG();
Or do it inside fillBG(); method (version two)
2. Nested functions are evil and I would like to suggest you reconsider using them and bring them outside of other methods' scopes. I am talking about positionContent handlers you use. -
Parent swf call function in Child swf not working
Hi all,
I'm having a problem with this and I just can't figure it out
:( (I've been trying different things and staring at it for hours
and I'm losing my mind...)
So I have a Parent swf that loads a Child swf (this goes
without any problems), but I want the Parent to call a function in
the child, now this is where it goes wrong...
The function the Parent has to call is named "lookupcar" and
needs to give the value "wagen" with it. The problem I think is
that the Parent wants to call the function but it still needs to
load (correct me if I'm wrong). Is there a way to check if the
Child swf is loaded completely before trying to call the function?
Could you give me an example of this please? Or any other
suggestions on what goes wrong?
Code in the Parent
root.inhoud.createEmptyMovieClip("thetext", "thetext",
this.getNextHighestDepth());
root.inhoud.thetext.loadMovie("uitrusting-wagenpark.swf");
root.inhoud.thetext.lookupcar(wagen);
Code in the Child
(the function lookupcar)
_global.lookupcar = function(carnr:String){
trace("LOOKUPCAR, with car nr: " + carnr);
Thanks in advance for all the help.Perfect....just to make sure i m taking care of it in a nice practical way....here is how i learned to access a file located in Child (researching other posts)
is this the way you recommend it?
(LoaderName.content as MovieClip).functionName(new Event("whatever"))
and in Child File we have
function functionName(e:Event)
i have seen other ways of calling a function in Child Swf , like using EmbedSWF and etc. wanna make sure which one is a better practice. Thanks -
How to attach a document from cloudOn to my online application form or website
How to attach a document from cloudOn to an online application form or website?
You will need an app (web browser) capable of both storing a document and accessing the site's functionality sufficiently enough to upload a file. Safari can't do this (and I'm pretty certain CloudOn can't either). A couple of options:
iCab Mobile - store documents in the Downloads section and has settings to both change the BrowserID to a non mobile browser to unlock site functionality, and has a setting for uploading files from its storage rather then iOS in general. Its not free, but not very expensive and is a pretty could all around web browser in its own right. I've been using it for quite some time.
iUploader - has both free (trial) and paid versions. I've only experimented with it a bit, but works fairly well. Like iCab, has its own file container that you up load from.
In both cases you would need to transfer your files from the source app (CloudOn, in this case) to the file storage, and then access the website.
Maybe you are looking for
-
Why can't I get instagram on my ipod 5th gen
I tryed to get instagram on my ipod but it did not work I searched for it and it showed up just wouldn't let me get it
-
AFS & MDM (update...)
Hi all i have been looking for some SAP official documentation about scenarios between SAP Apparel Footwear Solution and SAP MDM to material/article master data; my questions below: - Does exist some documentation about the real scenarios where it co
-
HT5544 I have deleted a book from iBooks but I also want to delete the cover
How do i delete the cover of a deleted book from ibooks?
-
BAPI to read classification of Material Variant
Hi experts, In our customer we are using material with a reference product KMAT (Material Variant), and we need a BAPI to read the configuration of the materials. Does anyone knows which BAPI can we use to read the configuration of the material varia
-
REG selective and % inspection for 03 and 04 types for batch material
Hello Gurus, The scenariois: 1. Material is batch managed and 03 & 04 types activated. 2. Against a production order, several batches will be generated. Client requirement is: 1. After the relase of PO, only the first batch will be inspected. 2. Afte