English 中文(简体)
闪S2 - 电影 未按预期工作
原标题:Flash AS2 - MovieClipLoader Class not working as expected

我在把影像带入电影院时有问题。

在我的电影装饰上,我依一(无例)附上Movie。

随后,我制作了一个事例的副本(这些文件已准备好印刷,我有这项工作)。

但是,在闪电电影装上并使用以下部分代码制造th时,便会处理这些病例的初创:

myScroll.content.attachMovie("fav_content", "Stadium"+i, i);    
var imgPath = mySharedObject.data["img"+i];    
myScroll.content["Stadium" + i].imageLocation = imgPath;

The movieClip instance Stadium+i has a property/variable imageLocation set to imgPath, the below code then handles loading the path to the image which resides in the movieClip Stadium+i on the first frame:

var myLoader:MovieClipLoader = new MovieClipLoader(); 
myLoader.loadClip(imageLocation, imagePlace);
//imagePlace is the name of the empty movieClip

然而,在一次触发活动上,我想要制作一份除图像外按要求居住的案例副本,我使用的代码非常相似,但出于某种原因没有显示th:

printContainer.attachMovie("fav_content", "Stadium"+i, i);
var imgPath = mySharedObject.data["img"+i];
printContainer["Stadium" + i].imageLocation = imgPath;
var myLoader:MovieClipLoader = new MovieClipLoader(); 
myLoader.loadClip(imageLocation, imagePlace);

The class is called multiple times once then when triggered in a duplicate movieclip but fails somehow - maybe the clue is duplicate tho tried that (duplicateMovieClip..)

我追踪了图像途径,正确回归。

问题回答

如果图像途径对异构体相同,则在阵列中首次收集途径,然后从该阵列中提取以满足以后的需要。

排外:

var imgPathArray:Array = new Array();

之后:

myScroll.content.attachMovie("fav_content", "Stadium"+i, i);    
var imgPath = mySharedObject.data["img"+i];
imgPathArray.push(imgPath);   
myScroll.content["Stadium" + i].imageLocation = imgPath;
var myLoader:MovieClipLoader = new MovieClipLoader(); 
myLoader.loadClip(imageLocation, imagePlace);

之后:

printContainer.attachMovie("fav_content", "Stadium"+i, i);
var duplicateImgPath = imgPathArray[i];
printContainer["Stadium" + i].imageLocation = duplicateImgPath;
var myLoader:MovieClipLoader = new MovieClipLoader(); 
myLoader.loadClip(imageLocation, imagePlace);




相关问题
Using QCView and iSight to capture image

I have a QCView that loads a Quartz file which gives you iSights feedback (basically like a QTCaptureView) Everything displays fine The button simply takes a snapshot using the following simple ...

Taking picture with QTCaptureView

Is it possible to simply take a picture and save it somewhere using a QTCaptureView and Apple s built-in iSight? I ve seen lots of tutorials on recording video but none on simply taking a picture. Any ...

Transform rectangular image into trapezoid

In .NET how can I transform an image into a trapezoid. The Matrix class supports rotation, shear, etc, but I can t see a trapezoidal transformation. I m using the usual System.Drawing.* API, but I m ...

Rotate image through Y-axis on web page

What are my options for rotating an image on a web page through the Y-axis? I m not sure if I even have the terminology right. Is this called a rotate or a transform. Most of the searches that I ve ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

Editing a xaml icons or images

Is it possible to edit a xaml icons or images in the expression design or using other tools? Is it possible to import a xaml images (that e.g you have exported) in the expression designer for editing?...

Convert from 32-BPP to 8-BPP Indexed (C#)

I need to take a full color JPG Image and remap it s colors to a Indexed palette. The palette will consist of specific colors populated from a database. I need to map each color of the image to it s "...

热门标签